#development-advanced
1 messages · Page 34 of 1
we're stuck with cameras/rendertex, and they're local
I could have an additional camera watching _Time and setting its output to white iff the other camera's rendering should redraw
(and storing the time into its output too, in the usual way)
so then I'd have three render textures, one for inputs, one for state, one for clock
(insert NO CLOCKS meme here)
I think this is what I'll go with because when you have a hammer
But that would be more costly way since _Time is local and synced
_Time is not synced at all
Betweem cameras it is not?
it doesn't need to be synced between cameras, it just needs to be in the same units for all shaders
synced meaning between players
_Time is given to shaders by client, so no need to store it anywhere
I could get it between players if the animator properties could somehow be passed into a material
no need to store _Time but you need to get lastTime somehow
we are talking about having stuff happen at the same time for everybody
and late joiners catching up
this technique will be out of sync by 250ms but the lag in this game is already more than that half the time anyway
late joiners I think is .............. too hard ™
though if I could get animator properties directly into a material property, it would be easy
I mean, someone made time shaders
Oh fuck
Nvm those work on web panels ugghghgh
Otherwise you could get a constant synced website
(insert link to my tweet from yesterday)
this is why we're talking about this 😉
Right
I dunno, even that would not resolve the sync for late joiners, but, if I had web panels, I could do the entire thing inside a web panel and just render it
they won't be coming back any time soon
this little project started as a shader project anyway, not a web panel thing
it was my initial prototype for gpu particles before those got so popular they stopped being interesting
and any tricks on getting people synced up across a world would be very welcome
apart from using animation states
I think assuming everyone in the world is there at the start, and they clear the board before they start moving things around, everything should sync up sort of OK if I use _Time and a third camera
the sync on the objects being used for input is actually a bit shady too, so let's also assume people hold the objects in place for long enough for sync to work
yeah buffered object sync is not really frame sync
it's more like catch up every handful of frames
and if people want to draw complicated patterns on the floor I might want to put special pens in the world to draw whole patterns at once
if only there was a steady global timer but somebody in vrc staff seems to hate clocks but doesnt understand the need for it outside of telling time in vr
rip 90% of my ideas
an input like _Time0 which is floating point time in UTC would be really helpful
yes
whole numbers are days since start of julian calendar, fraction is the fraction of day
I dont even care what format tbh
then if someone is masochistic enough to want to turn that into a readable wall clock, they can go and have fun
usually people use double for this instead of float 🤔
just some way to pin down passing of time
honestly if I got any kind of reliable global time in a shader I would even write a time zone parser and evaluator in hlsl just to get a working clock
Double because of incoming 32bit overflow. Using fraction is ugly, just int bits as float would be better
using fraction is actually pretty convenient for clocks though
because guess how to compute the position of the hour hand
yep and for shaders
literally fractionOfDay * TAU
and then every other hand is just frac(hourAngle * gearRatio)
Waste of bits :p
OTOH the JS API I have to get the time gives it to me in separate fields for h : m : s and I have to compute the fraction of day given that
I was toying with the idea of writing a complete time zone tool in udon but until I can get my hands on it I just have to dream about it
theres global time in udon, but it will be a long while before it rolls out
grumble
an actual scripting language would have been so fast to implement but they had to go with a huge graphical flowchart thing
its way better than playmaker already
I've implemented both before and my impression is 1-2 months for a scripting language and 10-12 months for a graphical thing
and its not huge
just because making a good model for a graphical thing and doing all the editor stuff is more work
that's already done
but every time someone makes a new operator, you have to make a new editor 😐
that's not how that works
that was what killed me when I was implementing one
I don't believe it's better than Playmaker tbh
I have seen Playmaker and worked with it
I've used udon, playmaker is terrible
The way you can find game objects, find components and loop over collections of objects is very useful
I don't see Udon replicating that
I'll have to wait and see until it comes out
it is better in a sense - when playmaker stop developing for an old version of unity vrc is stuck on and someone finds a security hole in it, --
udon has all that too
Stop teasing >.>
I swear though, I will find something Playmaker has and Udon doesn't
Such as character controller support
I have a video of something I did as an experiment
is udon completely replacing triggers or are we going to be stuck with triggers on some components like video players to get events into udon?
Since it's made by the VRC devs, it will probably be able to seamlessly integrate with components we have now.
Triggers will probably become legacy equipment.
I have this large unsolved project of automating the video player and the animator approach is essentially impossible without breaking sync in some fashion
because you have to sync both the animator and the video player and the animator is triggering the video player as well, so it just gets hairy
I want to load the playlists from a file as well so hopefully there is some kind of file import node
although, the data I used to store in a file, I recently started storing in airtable, so that gets a bit interesting
What if Someone sets up a 16x16 pixel livestream (whatever the smallest allowed resolution is) of a clock in binary format and you run that through a video player aim a camera and read the time
Are livestreams allowed in video players (youtube or twitch)?
Problem might be the buffering delay I guess 😦
it wouldn't fully replace webpanels but im curious if people would be interested in this "https://docs.unity3d.com/560/Documentation/ScriptReference/Networking.UnityWebRequest.GetTexture.html" as a temp solution.
it would solve some uses people were using web panels for.
So for anyone who had the problem I had
I recalculated the normals and removed the Ngons
And it fixed everythiiiing
Ye getting a web texture loader could be cool
They all use that in Tabletop Simulator
Yup, a stream would work, done a proof-of-concept audio visualizer that way
I would settle for a way to get the system time in UTC from a shader
I'd have to implement the entire time zone database inside a shader but at least it would be possible to get a clock
first off, not sure if it's the correct channel. Does anyone know who made the new version of the original MMD dance world? Or maybe does anyone know what method they used to make the use of emotes unecessary?
Seats still give control to your upper body. Somehow, the MMD dance world makes you perform dances without this happening
with animations
It is, but when I tried that, it was super broken for VR and FBT users
the mmd dance world is broken for me in fullbody
I havent tried it for a few weeks
Because they used emotes to get around that, and now apparently they're a step further
ah
I haven't been there in a while so I wasn't aware of that
What do they do now?
I went there like 4 days ago. Somehow, it just plays the animation on you instantly
No emoting necessary
So still stations?
Yes, i mean i don't think there is a way to make it work without stations
It's definitely stations somehow
It must be some option or something that takes control away from you
Does anyone know if you're still in first person while on stage?
If you move the camera far enough away the IK stops doing its thing
I'm guessing just making an animation is the best way to simulate a day cycle
Yes
If you use Unity's procedural skybox then rotating the directional light will move the sun
Ok
You'll need to use a real-time directional light
Shadows will add quite a few draw calls so you'll want to make sure you have static batching setup and share materials as much as possible.
Including creating atlases for meshes that aren't using tiled materials.
Ok I'll make sure to do that
and make sure occlusion culling is setup.
Just can't wait tell I'm done this map
Let alone I still might have to add animals
But I'll probably keep animals out until eating is a public script we can use
@rough sleet is there any way to have the trails module in particle systems generate proper normals? there's no 'generate lighting info' checkbox like in later versions
I've been stuck trying to find out why the normals are broken, turns out it doesn't even generate them 😦
@warm niche I don't know I've never used trails.
this is an outrage ✊🏼 why doesn't it have normals?!?
ah okay, thanks
how can I even light them properly? I'm honestly shocked it's missing
I'm not sure if they're really meant to be anything more than billboards
@warm niche
well, they're geometry more than billboards, and lighting them is a thing in newer unity versions, but it seems to be missing in 5.6.3p1 😦
Hmm, yeah, that could be the case
They tend to add features to particles pretty gradually.
I know what you mean, they're special effects usually just doing little additive trails, but it's ridiculous they don't have normals
2017.1 added it
There's a setting "Generate Lighting Data" that enables normals and tangents.
I was kinda hoping there'd be a workaround somewhere else in the particle system's settings, but there really seems to be no option for lighting trails at all
yeah that one, I don't know how they never implemented that before
2017.1 was apparently a big particle update
hmm, this kills a bunch of things I was planning 😦
Too bad. Eventually we'll get an engine upgrade.
I'll write my own trails shader, with normals, hookers and blackjack
Lol
wasting cycles because unity devs forgot about lighting
2017.1 also added the ability for particles to apply forces to the colliders they hit.
They didn't forget
It was added in the following major version
even the particles have normals
but not trails
lol yeah true, but they went for years forgetting about them
Maybe, there was enough of a use case to justify adding them in 2017.1
Which was <1 year after 5.5 released
ah, yeah I'm no unity historian, but it's oddly absent
I figured if there was a workaround, you'd be the one to know
That's the demo video they made when they released trails.
oh that looks so bad
Ah, I don't really use particles but I do tend to pick up random bits of info so it's not impossible that I'd know something.
that's all standard options
The only suggestion I have is the custom vertex stream data
But that's probably only for the particle itself not the trail.
how would I use that to add something that isn't calculated anywhere?
where should I ask questions related to the web api ?
The Web API is unsupported, so would be here probably. But don't expect to get a answer for it.
okay, well, all I really would like to do is log into my account, pull my friends list and get theire statuses
Oh, you can do that
I roughly know what to do, it's just that I can't seem to find how the query's are supposed to be structured
"put auth token in header" um... need to know how it's supposed tp be formated
That you would have to search for. The setup is different from language to language and framework to framework
It's the same params, but how it's done depends on the language
crap, I'm trying to do it in python with pyqt4
I've been sniffing on the .net code, but there are almost none to no coments in the code at all, so not easy to follow
found this: https://github.com/amausagi/IsAnyoneInVRC
so far it looks usefull, but now I'm trying to figure out why it's failing to log in
got it working
HEY HEY HEY ANYONE ON?
@little cipher It's probably a bit nasty and includes some kind of unneeded overhead, but I've had a 'online friends check' script for ages now and I used curl to do the login and keep the session cookie and use that a second time to pull the json then stuff that through a parser I threw together in python.
Hey Gallium, are u pretty well versed in VR development? 😮
I do much more with the 3D modeling side of things.
Darn
I'm developing a super simple VR glove and need help putting the inputs into the VR chat inputs
Know anyone who could help?
I had a vague idea that I never got round to doing for something similar, and using OpenVRInputEmulator to map inputs of my own device to Vive controller states for VRChat.
Anything beyond that, all I can think is getting in touch with vrchat themselves and asking. hello@vrchat.com is where to email them about something like this.
no no that's exactly what i wanted to do
but i have oculus, so i'm sure it's a bit different
can you tell me more about openVR input emulator?
here is the github link for it. https://github.com/matzman666/OpenVR-InputEmulator
sweet, thanks Jetdog
dang, seems like it's specifically for oculus
err...specifically for vive*
InputEmulator should be as HMD-agnostic as steamVR is, which is very.
I almost need a Leap Motion emulator
I believe there's one of those as well, can't remember the name of it off the top of my head, but it exists.
alright, i shot an email their way
hopefully there's a simple SDK which will allow me to adjust the euler angles of the avatar's Armature
there is no voice room,?
VRchat fetches controllers from OpenVR. And ImputEmulator does what its name says - thats how people use custom tracking solutions for VR
Guess I'll download and play around with it today and see what I can do 😃 thanks guys
Hmm.... So they responded to my email and it seems like they don't actually have a way of doing it which is curious
I also took a look at leap motion in VRChat but the hands have basically a set number of pre-defined positions that we're used to
So for now I'll just keep playing around with it in Unity until I can get a proper setup
okay, I'm thinking about putting animals into a world and also looking at some AI engines for them in the asset store.
This is all ok, but I'm wondering about sync when there is more than one player in the world.
If one player sees an animal (not predetermined positioned), would a new player be able to see the animal at the same place preforming the same action(s) as what the first player is "experiencing" ?
Just add object sync on them
@little cipher lol I just made a world that does exactly that.
Object sync will take care of it unless you have a lot of triggers telling them what to do, in which case you need to be more careful.
If you tell me more details I can help you figure out if you need to separate the object sync from the animator or not. I’m guessing you will be fine with just Object Sync on the same object as the animator.
oh ay, misssed the messages earlier abotu the dance world.
If you guys are curious i did look from very closely at the world and i mean probably too closely for the community guidelines, maybe, who knows, but it was after trying to whiteroom it for like 5 hours and it doesnt do anything special, like for real, it's the classic enable collision mesh -> trigger sendrpc->UseStation. Nothing special as far as everything triggers go. Nothing special on the animator either (even simpler than my world's... litteraly one layer with just the default arguments from the example animator in the vrcsdk, though i may have missed something). The only small weird thing i spotted is some reference to finalIK in the animation (which afaik dont show up when i look at my converted animations), but i cant really look at it closely for reasons.
as far as i know, it should require emotes too, except the animator doesnt have the support for them so they wouldnt even work...
I don’t have final IK to check, but what if they turn it off while you are seated.
well maybe, but i litteraly dont know what having those things in the editor do because i dont want to spend money on them
Do you want to, uh, find out more, so we can finally answer all these questions?
Oh, nevermind then.
the only thing i havent been able to look at are the animations, but i did skip looking at the scripts, maybe it's in there
though that would be kinda concerning
oh, and a funny thing which makes me really want to know who remade that world is that the name of the layer in the animator is very close to the one i used in the screenshot of the animator i use which i sent to people when they asked how my world worked
@sand canyon I'm thinking about some wolfs, bears, elks, foxes etc. and putting an ai engine on them so they could rome around, with that, I am not sure if the engine would pass it's current actions on to others if they join after the first player
what I'm "worried" about is that when player 1 enters, an animal is in one place, when player 2 enters, the same animal is in a different place
and if this ai engine uses custom scripts, than you aren't allowed to upload them
if you are making this as vrc world
yes, only existing triggers
you can make walk for animals with animation, and switch between anim
to follow the player theres some ways to do this tho, something with canvas on player cameras and empty object inside, and Configurable Joints on animals to this empty 🤔
i think you need canvas on player cameras, box for trigger configurable joint that applied to empty object inside of this canvas and off animation for walking from animator, and sync it
security related reasons ?
well, then my idea is mute
so, I can't "cobble together" some of the triggers to make an "behaviour" for an entety ?
this sounds very limiting when thinking about what the unity engine can do
Just think about what C# code can do and you understand why 😛
that's why this is not allowed)
the only thing for this is:
https://medium.com/@vrchat/vrchat-node-graph-playmaker-and-soon-1a958672688d
but this is abandoned or not yet (doesn't know)
yeah, I understand :/
Ai is still possible though. Unity has it built on. Check out HardLight’s toybox prefabs for a working walking synced ai. You can find it pinned in the #world-development channel.
@copper acorn that looks very promesing!
@summer berry I'll take a look at it, thanks 😃
can't find it 😕
@little cipher http://vrcworld.wiki.fc2.com/wiki/Toybox
@little cipher it isn’t hard, you put AI character control script on and either use the Target or waypoint. If you have object sync on, everyone will see the same. I made a system that randomly changes the target every so often but only by the Master.
No custom scripts but you can get what you want with animators and workarounds.
You need to install Standard Assets also.
is that a reason that i doesn't have some scripts on Toybox? )
Yep
Don’t use that link. The new version is V2.1 I think
And my message is still the last pinned for toybox.
@little cipher https://twitter.com/JasonL663/status/1012799892425588736
and nope, looks like before link downloads v2 as well )
As usual with downloaded prefabs, read the included readme!
Did someone already ask the devs if it is possible to disable the controls overriding the VRC_Station animator ones though?
ok so you know how some people have scripts that shoot out random objects? Have it send out animals, and when they collide with a player, do a "follow" script
that way they follow whoever they collide with last. Including people who pet it
I'm pretty sure there's a "look at target" premade script, then just have it walk forward
Scripts don't function in VRChat.
^ That is true and false. Standard Asset scripts work in VRChat
^ in worlds, not avatars
You can do a lot with particles and shaders but we'd have to see a video of what you're talking about to tell what it is
ah, so you can't put standard asset scripts on partical effects?
You can put them anywhere if it's in a world. There are several scripts that you can use to make NPC's that follow you around, although they're not a complete package they're just one piece of the puzzle, and you'll need to build the rest with animation states.
If it's an avatar, you can't use those scripts but most importantly you can't use custom animations to make your own state machines. If the effect you're talking about was on an avatar, I would assume it was a particle manually controlled like an rc car
If you saw his hand pointing the direction of where he wanted it to go, that's a pretty common effect and I can walk you through that
Would there be any way to make one of these work on an avatar? https://imgur.com/a/LhiiIKH
Not directly, but you could separate all the frames and play it like a texture sheet or a gif then have the audio synced
oh my okay, so there isn't any way to get a video playing script to work on an avatar
Not the video player component specifically, no
ripp okay, thanks for the help yo!
can you guys change the font of usernames so it isnt forced to be all caps, so sick of being called "MAN" because my username looks like this |MAN|
Ask for a rename
Is there any way to discard all pixels in a shader if a condition fails?
From within a CGPROGRAM block
Preferably in a way that doesn't still write to the Z buffer or anything
Never mind, I got it. Had to call clip(-1)
Can also hide vertices in vertex shader or not pass any in geometry or do discard in fragment ;)
Wait, discard is an actual call you can do?
Ohh, it is. Wow, that's probably easier lol
I had a shader that only showed up when a specific condition was true, but it was just returning an empty float4 if the test failed
But due to ZWrite it was still writing to the Z Buffer so I had to somehow discard the pixels entirely
Does the WebPanel allow javascript and WebRTC?
It did allow javascipt, but web panels are dead now.
damn tupper
What
Is this where i can get support with Unity and SDK?
What's wrong
having trouble finding a log in for SDK in Unity
Type out your problem, don't just ask!
the tab at the top doesnt give me a log in option
Ohhhhhh
okay okay! 😰
Bad SDK install.
It's in the settings
^
Look at the most 2nd most recent post in #vrchat-support
What options do you see in the vrchat tab
Is that one option or do you see a few?
Should see settings if not close unity and delete the vrcsdk and plugin folder
clear cache
In the project folder under assets ofc
where would i find the two folders.
Then relaunch the project and open the newest sdk unitypackage
Under your project location
Close unity
Go to project assets folder
okay
Delete VRCSDK and plugins
Open project in unity
Open latest sdk unity project
import it?
Sorry
or just run it
Unity package yes
import it?
Import
kk
Sorry
Now you should have settings in the vrchat menu at the top
?
?
Second
Wait did you guys take it to dms or...?
(falls face first onto the ground)
I seem to recall the existence of a shader variable that was specific to VR. Does anyone know what that is?
Something like stereo index
Ah, that's exactly it. Thanks.
jinx
I'm not sure if it exists in desktop mode
I'll probably test that out real quick. I'm making a shader but I don't want it to look weird on desktop
left eye is supposed to be working for desktop
If that's true then optimizing this for both desktop and VR will be difficult
Was hoping the stereo eye index might either not exist or be -1
Since a VR user's left eye is not the same as a desktop window at all
TCL's 3D shader uses this and works fine in both vr and desktop https://github.com/TCL987/UnityShaders/blob/master/Shaders/3D/3DScreen.shader
Interesting, will check it out thanks
What's the easiest way to make a Pass block that allows me to write a fragment shader, but without having the pass block actually visibly render anything?
Having the frag function return float4(0,0,0,0) still seems to give me a white appearance
ColorMask is 0 in the pass block already
Nvm, I did something else wrong. Returning an empty fixed4 worked
@drifting egret #ifdef USING_STEREO_MATRICES <-- true if in VR and not looking at a mirror. In the mirror I do not yet know of a reliable way to detect VR
Ooof
@proud meadow thanks my dude, that's exactly what I'm looking for!
The mirror issue might be circumventable using stencils
Just write a stencil value if in VR
For vr effects I recommend not using unity_StereoEyeIndex but instead take average of the values for each eye, like 0.5 * (unity_StereoWorldSpaceCameraPos[0]+unity_StereoWorldSpaceCameraPos[1]) for example
Hmm, I could try that
I'm not sure how you would write a stencil value in the mirror though. The mirror world is not in VR
Will ifdef work though? I thought that's a compile time thing
Yes, some sets of ifdef can be made "multi_compile" - this particular one is built-in so it happens that way automatically.
Explicit ColorMask RGBA may help when 0 alpha does not work
Player for other players, PlayerLocal for yourself.
ok
Player does not have any colliders on its own though @cold minnow
In case you're wondering about that
no, it's just for lights
Does anyone know how the Trash Can in the Hangout House works exactly? Because I cant figure out how to make an ObjectSpawner with an associated Prefab that has an OnEnterTrigger trigger, which is suppossed to basically delete/reap the GameObject but not the Prefab when activated.
I think the trigger might be on the pickup object itself.
When the object touches the trash can, the object deletes itself.
Yeah but its not that easy to delete self
It should be.
An ObjectSpawner requires a Prefab
I know
You just make a pickup that has the capability to delete itself, then make a prefab out of it. You should be able to spawn that prefab.
As long as it only tries to delete something within its own hierarchy, it should work fine
Thats why I like traditional programming more than Drag n' Drops :P
@proud meadow that didn't work unfortunately. While that constant works in the editor, ingame it's not showing up at all. I think that constant is just set to true even on desktop.
The USING_STEREO_MATRICES constant
My shader just always acts as if it's in VR
It works in mirrors though, and only in mirrors for some reason. Not in desktop mode.
For some reason, the desktop camera and handheld photo camera still act like USING_STEREO_MATRICES is true, but mirrors act like it's false
@proud meadow @drifting egret This is the code I use for getting VR camera centre position.```
#if defined(USING_STEREO_MATRICES)
float3 leftEye = unity_StereoWorldSpaceCameraPos[0];
float3 rightEye = unity_StereoWorldSpaceCameraPos[1];
float3 centerEye = lerp(leftEye, rightEye, 0.5);
#endif
#if !defined(USING_STEREO_MATRICES)
float3 centerEye = _WorldSpaceCameraPos;
#endif
Alright, interesting
It seems like USING_STEREO_MATRICES is still defined on desktop so that's kinda odd. It only seems to be false in mirrors
Hmm
The above has worked fine for billboarding consistently between each eye.
But that might just be graceful failure if USING_STEREO_MATRICES is always set
If Unity populates both values in unity_StereoWorldSpaceCameraPos with the same thing in Desktop then it'll end up the same.
Even then you probably wouldn't notice if it was a little off.
Also the UnityShaderVariables.cginc file has a lot of useful stuff.
You can get it in the Built in shaders package https://unity3d.com/unity/qa/patch-releases/5.6.3p1
What is the Proximity Slider in the VRC_Pickup Script used for? Couldn't find anything in the documentation and changing it has no obvious effect, maybe unused?
It seems to be unused
it is supposed to make it so that you can change the distance at which you can reach the object, but messing with it, it does nothing.
So prolly not implemented yet
I think the only way to increase the pickup distance is by giving it a larger trigger collider
Ive seen an Object once that would maintain its Orientation when picked up, so it wouldnt rotate when looking around while having it equiped, I guess that it works with having another object inside it that is the physical root, but I didnt get how physical roots work quite yet...?
That's an interesting one. I know the Pug does that to make glasses with liquids look better
Not sure if it's a physical root, it might be a weird joint setup that keeps it always upright
I do that with follow target script
Using that technique you can even have object snapping
I haven't found a way to use Physical Root in the pickup script yet. Just using joints or scripts seems to work
Ive seen it used for chess pieces so they wouldnt fall over every time you move them around
I think the Hub does that with Is Kinematic
Just disables gravity on them etc
Freezes stuff in the air where you left it
No but thats something different
Do you want the rotation frozen?
yes basically
Import standard assets. Have the pickup object with no visuals on it, have another object with the model for visuals. Put a follow target script on the visual and have the target be your pickup
so the pickup would ideally be a sphere right?
But wouldnt it mess up the highlighting outline then?
Yes, it will mess that up. There are ways to fix it, but they are way too complicated to explain right now. It involves reparenting...
I mean we could do a feature request for that, but I guess its not too commonly used
I doubt they would get to it since I don't see many world based cannies being implemented.
/udon
Who on the development team for this game knows the most about how the cache is mounted / handled :p. I've got a question about it
Is it possible to see the name of somebody’s shader they have on their avatar within the VRChat client?
Like even a hacked one
One of my friends came to me about a hacker mentioning my shader which he had applied
unfortunately it's very easy to examine memory of other processes, and so yes it would be possible to see quite a lot of information by examining memory. As a premise, if something shows up in the unity editor within your avatar assume it will be uploaded as part of your avatar.
It's also a part of d3d11 where you can assign friendly names to resources, and Unity automatically sets this to the shader's name when it creates shader resources
Aye lyuma it’s not a big deal really I just was surprised when I was told
It’s not really usable without the editor script since all the unlocks need editor functions to configure right
@proud meadow you were right btw, I was wrong about that one constant not working
It does differentiate between desktop and VR pretty well, I was just being stupid in a different way
OnAvatarHit detects when a avatar enters a collider?
You probably want OnEnterTrigger instead
OnAvatarHit is used for combat systems I believe
OnAvatarHit detects when a collider touches the avatar collider. It does not work with trigger colliders, so people can't walk through it. If you want to detect when a player walks into an area, it is better to use a trigger collider, OnEnterTrigger looking for playerlocal
Ah
okay, I'm trying to make a teleporter that teleports players when the walk into a area if that helps any
This explains the basics. You can have whatever visuals you want.
https://youtu.be/vfJiyDoCFng
Is there a way to delete all instances of an ObjectSpawner's spawned objects at once?
There are ways. I show one towards the end of this video:
https://youtu.be/6AMbbrFMvjM
Cheeky self-promotion :^)
Hahaha cheeky cyan
It is, but I also no longer need to explain thing twice
Like and subscribe!
Don't expect me to say that
dont forget comment :^)
Though, I do tell people to come to this official discord at the end
oof youre definitely more resource efficient with the broadcasts, gotta give you props there
I don't remember what I did in the video, but most of my triggers are actually local.
In my projects* I forget sometimes to mention it in my tutorials
Well yeah it makes sense, I just didnt think about it till now... welp time to redo all of my Triggers 😑
I still haven't updated this, but it might help with some details. https://cdn.discordapp.com/attachments/424536392459223044/464125930525294608/Ownership_and_Trigger_Broadcasts_V0.2.txt
Hmm gonna look into that later
Sadly the format is bad since I wrote it on a mac and not windows. I'll put it in a real doc later.
Also you have any idea why my image got flipped when applied onto a cube directly (with auto-converting to a material)?
They don't have proper uvs. You might need to look from another side
I was using the standard unity cube object tho?
and it was exactly the same on every side
Not really sure then
Also why would UVs flip the image?
Maybe it had to do something with scaling
Yup just looked in my project and the scales are negative 🙄
Custom animations not working - I duplicated the Controller so I could put different animations on each hand. After making the animations, I applied them to the proper places in the controller, put the controller on the avatar, and built the avatar. Instead of my custom animations being there in game, only the default animations would play. I even tested this further by deleteing some default animations, yet they would still play. Does anyone know why this would be happening?
Probably because they replace the animator, but I haven't messed with this.
what do you mean?
I used the same method for a different avatar yesterday and it worked, I've done it for dozen of avatars but it's only happened twice so far
Yep
Feel free to sign the canny if you want custom animators back https://vrchat.canny.io/feature-requests/p/custom-animator-controllers-on-humanoid-avatars
@sterile cipher why does vrchat provide so little exception data (just the exception) and an empty stack trace? PLS
What exception are you even getting?
Also why are you pinging Tupper lol
He probably doesn't know, he's not in charge of the programming.
Detailed stack traces provide too many internals at times
Well, you can easily label and decypter iy
It
But.. cough.. cough.. against the rules.
PSA EVERYONE
WE FOUND HOW TO FIX THE IK GOING NUT IN STATIONS
in a nutshell: get final IK
and get VRIK or all the IK (vrchat also uses limbIK and a few others)
in the top of yoru avatar
animate disabled the IK
Boom
magic
and in a shellnut: not requiring people to press emote, illustrated : https://www.youtube.com/watch?v=yjcy0cdcUfo (yes i have to fix expressions for MMD on my avatar, the bindings are wrong + missing a lot)
turned out it's not really advanced dev but eh
You shouldn't need to buy final ik to add one animator key
But how do you add an animation key for a component that doesn't exist yet
If someone who did that work can save out the anim file with just that keyframe then you can download it and copy pastr
Anim files are text so you might be able to make an anim file enabling something else like MeshRenderer and edit the anim file as text and change MeshRenderer to the internal component name possibly VRIK
Sorry if it sounded like I am criticizing. that's a really cool discovery.
Don't share those links here.
Yeah the mods might not be okay with that
You don't need final IK to generate one line in an anim file. Also sharing pirated content is a good say to get banned from this discord. You may want to delete your msg
also a good way to have your unity account suspended or deleted
I didn't know anim files were just text lol. That makes it a lot easier. So I guess the assumption is, VRChat adds a FinalIK component to avatars and disabling it fixes the IK?
mods killed the link rip
Well what did you expect
You're damn right I did. Consider this a warning. @cold minnow
also >unity account
? yes your unity account
unity doesn't know what you use
and even if it did, just create another account
0 problems
not true at all, they just like any other service provider can track your ip, mac and even HWID
dyn ip is balls
and you cnat change HWID
you can but bye bye windows install
I've never met someone with a legit windows license
vrchat doesnt appear to support mixing the animations in a controller thougjh
pisses me off cuz that mean i have to manually add the key change to every goddam dance
if only vrc_stations worked correctly
wink wink
Use layers I think? Default animation controller actually mixes animations
Vdragon what exactly are you trying to do
simply having 2 animations mixing with each others in animator
If one animation doesn't move bones or muscles then you can make it legacy from thr debug menu and put it in an animation component separate from animator
a good idea, except it's for a station
which is probably why it is not working in the first place
Ah I see. But how do you want it mixed
well simply playing one over each other
one moves humanoid avatar things, the other one toggle a element
There are blend shapes, layers. Do they both touch the same stuff (muscles/bones)? Or they are touching separate things
Ok so I think you can make a layer with an emptu avatar mask
if i put the layer with the toggle on top, the avatar goes to contracted mode, if i put the one with dance on top, it doesnt disable the element
i already tried that
used a empty layer mask and it didnt work either
i also tried additive
Did you set weight to 100%
yes
it worked perfect in unity but failed in vrchat
(tested on a normal animator, in unity, of course)
Oh crap then I have no idea
why would a depth blend shader only work in certain worlds and not in others
@silk horizon I think you need a realtime or mixed directional light for that to work.
presentation room
If the shader is only visible on a gesture or emote, try putting a directional light on your avatar with hard shadows and intensity 0.001
Presentation room probably doesn't have any realtime lights (it shouldn't)
am i to assume to turn on and off the light and not the game object right
@drifting egret
When enabling/disabling the light? I don't think it matters. I usually just have one object for the light that I enable/disable entirely.
@silk horizon
ok
i just know with camera components if you shut off the game object it makes it not visible to others(friends)
anyone able to point me in the right direction of a shader to render quads at every vertex of an object
Depends what you're going for, but particles could totally do that @silk horizon
Shader would probably be more efficient if that's all you want, but particles can do more if necessary
i just want them to spawn and face cam no need for particle system as id like it all tied to gpu
Look at this guys: https://imgur.com/wY7b3HJ https://imgur.com/2ZEbRDS
but it hangs game for a half second when cells processed
As for using directional lights on avatar to activate depth channel, this shows optimised(I hope) values: https://github.com/netri/Neitri-Unity-Shaders/
has anyone got issue with disable object ?
@oak pollen those values are good. They are as optimized as you can make them. This will still lag people in some maps, most notably maps that already have a realtime directional light. If he has a lot of gesture slots free, he could consider making a separate gesture that activates the object with the shader, without activating the light.
I need help with trying to modify a shader.
What I'm trying to do, is modify my Dragon Ball FighterZ Shader to have multiple layers of lighting. Currently it only has 2. The side with light, and the side with shadows. I want multiple layers of shadows that get darker and darker each layer, and possibly even an extra layer of light that's a bit brighter than the main light.
Basically, I make A LOT of Super Saiyan models, and I'm too much of a perfectionist to settle with what I have. My profile image is the main model I've worked on a lot, and I would hope to improve all my models even further with this. I have also already made this shader a stencil shader to make my auras appear behind the model too.
Another thing I'd like to possibly do is have a Dragon Ball Xenoverse 2 shader if it's possible, because the shader used in that game functions far better in my opinion, since the shading is the same no matter what direction you look at if from.
(For example, if you look at it from the back, it looks like the sun is shining on it from behind you a bit to the right. If you look at the front, it still looks like the sun is shining on it from behind you a bit to right, even though you are looking at it from a different angle.)
(It's a shader forge shader, btw.)
thats due to it having multi lighting you need it set to single lighting
how do you count the passes in a shader, is that literally the "pass {" 's in the code?
Yes
@silk horizon
Also, the game uses single pass stereo rendering
So a pass block is only executed once, rather than once per eye
You're basically drawing to one very wide screen rather than two smaller ones
Beware of additive lighting passes though "LightMode" = "ForwardAdd"
I usually just assume that to be 4
@drifting egret The version of single pass stereo we have now still renders each eye separately as far as the GPU is concerned but it renders each object once in each eye one after the other which is cheaper, almost half the CPU cost but not quite.
Oh, alright
It renders the object to the left eye and then the right
Interleaving each eye lets Unity render the right eye without having to switch shaders or change any other settings besides the projection matrix.
From the main thread's perspective it's one draw call but it's actually still two as far as the GPU is concerned.
Not really sure where this belongs, but I found a registry key in HKEY_CURRENT_USER\Software\VRChat\vrchat and the key is VRC_INPUT_FRIENDS_ONLY_SHADERS_hxxxxxxxxxx. Does anyone know how this functions or if it is deprecated? Ping me if you know.
Deprecated at the moment.
click the search bar in the top right of Discord and search for VRC_INPUT_FRIENDS_ONLY_SHADERS.
You'll see the post Tupper made.
Ah okay, thanks.
I have a shader forge question
If this is the right place for it
There's a way to make a shader that is lit even in worlds with bad lighting or no reflection probes, right? Where do I start, or is there an example I can straight copy?
@crisp pendant https://github.com/Xiexe/Xiexes-Unity-Shaders/blob/master/Xiexe's Unity Shaders/Main/XSToonBase.cginc#L152-L162
Here's an example of testing if the light isn't set in code. Unsure of how to convert that to nodes
This might be helpful. There's a node that allows filling in code
Might even be as easy as replacing the LightDir node with this snippet
yea that's pretty much what you want to do
But there are also the variable declarations
I must not be getting them all because I keep getting pink texture in the unity editor
float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) ) is probably what you are missing
well actually just use float3 ase_worldlightDir = _WorldSpaceLightPos0;
I didn't miss that one
well what error is it giving you?
No error, the material just shows up as blank pink in the editor
Hello ! I guess we're speaking shaders there
I have a problem with a shader I own, in VR it's displayed at two different positions in each eyes
Any idea ?
It's stereo incorrect - meaning you're treating both eyes as a different camera - there's a macro you can use to replace your view direction with - let me grab it.
float3 StereoWorldViewDir( float3 worldPos )
{
#if UNITY_SINGLE_PASS_STEREO
float3 cameraPos = float3((unity_StereoWorldSpaceCameraPos[0]+ unity_StereoWorldSpaceCameraPos[1])*.5);
#else
float3 cameraPos = _WorldSpaceCameraPos;
#endif
float3 worldViewDir = normalize((cameraPos - worldPos));
return worldViewDir;
}```
Basically put this after your structs, and call it in your frag or wherever you need it, and then feed in the worldPos to it.
so something like
```glsl
float3 viewDir = StereoWorldViewDir(worldPos);
...
whatever you need viewDir for.
@hexed flower
You can see an example of it being used in my shader here
@midnight quest just make an unlit shader and feed in the texture. If you want to still go dark in dark rooms, you'll need to grab the ambient light color from light probes.
to do that youll need to use the ShadeSH9 function.
float3 ShadeSH9( float3 normal )
{
return ShadeSH9(half4(normal, 1.0));
}
then in your frag you can do
...
float3 ambient = ShadeSH9(float4(0,0,0,1));
float4 mainTex = tex2D(...)
float4 c = mainTex * ambient;
return c;
and that will sample the ambient color and make you properly bright, instead of just pure unlit, and since the 'normal' is 0, you wont get any directional shading, only color and intensity.
I'll take a look ! thanks you. weird that only this one does this kind of thing tho :(
It depends on the effect you're going for. In general if you're using viewDirection anywhere itll probably need it, depending.
Yeah that definitely needs it.
Is there anyways to render the 2 VR viewpoint in unity ? 🤔
Do you have a headset?
Yep
If you go to "Edit > Project Settings > Player"
then go to the "Other Settings" panel, and drag OpenVR up to the top. Then if you hit play, it should make your main camera looking through your HMD if you put it on.
VRC's SDK will change this setting back so youll either need to keep setting it occasionally when you want to test or youll need to make an editor script that just force sets it every time you hit play.
Oh well ; I though I had the skillz to do it but I guess I don't.
Well ; More than 2 hours to try to fix it ; i'm giving up Kappa
If anyone here is knowledgeable about vertex face attributes shaders, please ping me !
I need a particle additive shader that can show through walls. (And no, it's not malicious, it's for a world). I have no experience with shaders, could anyone help me out with this?
The code for all standard shaders can be found on the Unity website. Just add ZTest Always to the subshader.
That was easy, thanks 😃
is anyone online here that has knolage about the vrc client and the server(s) as well as ray tracing (not cg), the audio system and the collider detection subsystem ?
Just got a thought about audio "privacy"
In a world/room, there are colliders in most cases in the form of walls, so if you take the position of a client that is saying something and do a single ray trace or in some way send an invisible or virtual object toward all other users in the same room/world (within a certain distance?) and if sed object colides with anything like a wall, then it would not transmit the audio to the user "behind" the wall
or do the test the other way around
the client receiving the audio does the test to see if there is an blocking object between the sender and receiver of the voip stream
I'm absolutely in the wrong place to ask about this, aren't I ?
the raytracing you speak of is not out of the question, but controlling the audio at all is
is there a way to get past 20k polys?


World only
@near bronze well, I'm talking about a feature for the client itself, not a sdk option
err, possibly as a option we can turn on or off in the sdk when creating rooms/worlds
that's called audio occlusion, and it's very cpu heavy
It should be easier to implement in a more naive way when it comes to voice chat
Allow us to configure "zones" where voice coming from people in other zones is simply ignored. No traditional audio occlusion necessary, should be light on the CPU. Even lighter than normal since you won't have to process their voice at all.
So, had a fun idea
a map where one person oversees everyone, looking down in a isometric camera kinda, leading people through a maze
But i have no idea if its possible to force like the master of the room in a camera when clicking a button
Hmm, i think i posted in wrong chat 
Couldn't you do it the same way deathrun does it ? A random user is selected after a button is used, and that user is in a room with a screen that is essentially a camera above the maze ?
Things like that are possible, but it takes work to get it properly
My idea was a camera using keyboard controls, that lets you look across the map in isometric
but im bad at anything complicated map wise
Where each player gets a sphere with a special shader that occludes wall objects around it like a fade
Oh boy this gonna take a while
@sour mural check out the world called Beta Maze or something like that
That's very cool, dude haha funny and original joke
Is it allowed to use the apit to display server status?
Apologies if this is the wrong place to ask, but does anybody have any experience with Shader Forge? I'm looking to create a shader utilizing Stencils but there is zero documentation on using stencil buffers with it and nothing seems to work asides from masking shadows of all things
shader forge has some examples and demo scenes that show a functional stencil shader
you don't even have to make them, just have to copy and rework one
or use-as-is
Is it possible to make a shader which reveals how many meshes other avatars have?
@rose nest mimi would know the shader name
she use in avatar testing as flash light thing
There is one on the Unity store or you got the free version https://github.com/Chaser324/unity-wireframe
Not tested the free one, but the unity store one works
So any wireframe shader can show if meshes are combined or not?
Thanks by the way
And the flash light shader is interesting, but I'm not sure if you can see te borders between meshes using it
mimi uses projectors in avatar testing
not a shader to show polys
im pretty sure
The projector needs a material that has a shader
oh damn well there you go
The purple flashlight in avatar testing can reveal how many meshes someone has
However, that is just a side effect of how projectors work.
I don't think there is a way to actually count meshes
Or distinguish them
Other than seeing lighting errors when there's different light probes around
It would be cool if we could count meshes
I'd certainly update my poly police model
Yo Crispy I can only find one example scene, and none of the example shaders have any stencil shinanigans https://i.imgur.com/H4c4xfL.png
Is it possible to send info to objects spawned using SpawnObject action? I mean there is no way to point triggers to runtime-created objects. The only way I found is to make shader that uses rendertexture to pick behaivor, but it's only works with shaders, I can't control animators or object states using this method
Hello, im trying to find water shaders for my world, and i found 1 super cool. The problem with it is that for some reason, it works for desktop users just fine, but when i go into VR, it breaks, and you can see on the screen outside oculus that the game is being divided in 2. Does anybody knows the reason of it? (not the first time this happened, happens the same when i tried the temporal antialiasing)
@stoic holly what you need is a dynamic prefab. It's different from a unity prefab because it allows you to reference things in the scene, outside the prefab. Using this, you can reparent a gameobject inside the prefab into a gameobject outside. Put an onenable trigger on the child and then you can enable the parent and it will subsequently trigger the onenable of the child, which will be able to reference things inside the prefab it's apart of.
To reparent, follow this tutorial but don't do any of the position stuff and don't reparent the object back in afterwards https://youtu.be/cib843oqmSo
To use dynamic prefabs, simply add the gameobject (from the hierarchy directly, not the prefab in assets) to the dynamic prefabs list of the scene descriptor. Make sure this is a unique name that isn't used anywhere else. Then in the spawnobject, you won't be able to drag the dynamic prefab in so you have to go into debug mode and manually type in the name.
One thing to be aware of is that dynamic prefabs currently have this bug: https://vrchat.canny.io/bug-reports/p/dynamic-prefabs-break-most-triggers It doesn't make them unusable, but if you're using triggers inside it they may have to be adapted to custom triggers
@bright dragon your water shader is incompatible with VR.
Try syn's shaders instead
@near bronze ty I'll try
is there something that makes a shader incompatible with VR? I will try that shader, but idk, i like to know reasons haha
Well, for one thing, it could be using the camera position to determine where to render stuff. That doesn't really work in VR. You see this a lot with bad or old screenspace shaders, they render in the same place in each eye which causes double vision. @bright dragon
When you get a bit further down, there are also shaders that do support VR, but they don't support single-pass stereo rendering.
This is an option you can select when you build the game in Unity. You can either have it do a single pass for both eyes, or have it do separate passes per eye.
The game uses single pass stereo rendering, which is a very good thing. It drastically reduces performance impact for VR rendering.
okay, thank you alot for clarification! ^-^ @drifting egret
Allow Collision Transfer: Should ownership of object transfer if it collides with an object owned by another player
does this apply to triggercolliders to collider too? or only collider to collider?
If two object sync objects collide, but are owned by different players, I believe one will switch to being owned by another person.
by the other* person
I don't think this is for trigger colliders
that may be the case, I'm making an overwatch's lucio-ball inspired world, if I use 'sticks' with regular collider, the network ownership goes to the one who hit it.
when I used trigger collider, it didn't transferred the network ownership, so its laggy in perspective of the hitting player 😭
oh. I set the pickup use down trigger to take ownership instead of collisions. hope this wont be laggy in networking 😂
thanks
I will just spam this here again in case someone wants to save some time doing fancy shaders https://github.com/netri/Neitri-Unity-Shaders
-> World position, World normal shaders
anyone know of a way to give an object limited uses? i've tried using custom triggers that disable the object and enable the next to give them sequential order but custom triggers don't seem to care if the object is enabled or not it'll still fire the custom trigger regardless if the event trigger or the object itself is disabled and I don't want to have to make 30 objects disable and enable each other just for one weapon. The gun stats component that the SDK seems to be totally useless despite being clearly what i need.
An animator controller! Use an int and count down for every use. The transition looks for 0, and goes to a clip that disables the thing.
I shall see how that goes for me <3 thanks for the tip
though I've not really touched animators outside of creating looping states
Yay!
@sand canyon i got the third person walking backwards
Ooh yay
@silk horizon any chance you’ll prefab an example?
i may when im done with Project Kinoa
for now just suffice to say it was a shortsight on anyone youve seen a blend tree from
@sand canyon
Nice
I’m not good at animating whole characters so I haven’t messed with blend trees much.
thats ok, most people dont and i dont expect to have more than hard lights example to go on so my finished tree should gove more insight
or i could write you an explanation of blend trees
the latter may be easier as you can extrapolate from there
anyone have insight on setting int in an animation with the animator you are in
Yeah, add a custom trigger to the same gameobject as the animator. Trigger sets the int, then you can then call that custom trigger directly in the animation with animation events
@silk horizon
case "OnConnectedToPhoton": EventType = EventType.OnConnectedToPhoton;break;
case "OnPlayerJoined": EventType = EventType.OnPlayerJoined;break;
case "OnPlayerLeft": EventType = EventType.OnPlayerLeft;break;
case "OnConnectedToMaster": EventType = EventType.OnConnectedToMaster;break;
case "OnPhotonPlayerPropertiesChanged": EventType = EventType.OnPhotonPlayerPropertiesChanged;break;
case "OnJoinedRoom": EventType = EventType.OnJoinedRoom;break;
case "OnPhotonCustomRoomPropertiesChanged": EventType = EventType.OnPhotonCustomRoomPropertiesChanged;break;
case "OnPhotonPlayerConnected": EventType = EventType.OnPhotonPlayerConnected;break;
case "OnPhotonPlayerDisconnected": EventType = EventType.OnPhotonPlayerDisconnected;break;
case "OnMasterClientSwitched": EventType = EventType.OnMasterClientSwitched;break;
case "OnOwnershipTransfered": EventType = EventType.OnOwnershipTransfered;break;
is anyone able to explain to me why we are unable or not permitted to use stereo audio on avatars?
My guess is because stereo audio wont get spatialized unless it's converted to mono.
Is there a specific reason you want stereo audio on an avatar?
that's not true though
stereo audio can be spatialized just fine
and it's been done since early 2000's
there's countless reasons for stereo audio on avatars
i mean
i can simulate stereo using multiple audio sources
but you can only use 2 or 3 before they start breaking
there's so many sound effects i have, and others have had
that sound amazing in stereo
and sound weak as hell in mono
or music animations
the music is so flat because it's not stereo
it's actually harsher on the ears too
but like, spatial blending for stereo sound is like... if it's to your left, if you have say, a 5.1 system, it'll probably play L/R in your rear and front left... if stereo, it'd probably be like 100%, with some right channel mixed in, in left speaker, and like 25% of right channel in right or something like that
dunno details
but i've played with stereo sounds in garry's mod for example
way back before cs:go and new source
i dunno how unity handles it
i'd have to look that up
ONSP, which uses HRTFs. More complex than simple L/R panning or even multi-speaker setups.
Are you familiar with HRTFs and binaural recording for audio spatialization?
i know a lot about sound fields and so on, but i learned form a very unique approach, i dunno much about technical details or jargon
There's loads of info on audio spatialization for VR, it should help explain why spatializing a stereo source without using two sound objects is not a thing.
tl;dr audio sources are assumed to be single points that give off sound, so having one point with two distinct L/R channels is just... what.
nani?
err
most game engines use 3d sound engines
it being vr shouldn't make too much difference
because any decent 3d sound engine already accounts for behind, up and down
so you have 360 spherical
stereo sounds are just applied relative spread
instead of point source, it would be spread to have virtual separation
but something that orients towards you properly
Would anybody here happen to know anything about VRChat handles shaders? For some bizzare reason this shader setup I have in Unity completely fails in VRChat. https://cdn.discordapp.com/attachments/338062377603956749/488722407385989120/unknown.png
https://cdn.discordapp.com/attachments/477294408296038401/488737376525484032/unknown.png
It's using a special kind of stencil buffer that hides the eyeball meshes, then looks for a flat eye mesh to project the actual eyeball on. The flat mesh has a sorting value of 1900, the mask for the left eye is 1988 while the actual eyeball is using 1989
pinpoint uninfluenced mono audio for directional sound is barest bones of the bare bones, earliest most basic implementation of 3d audio, even before all of the environmental effects that are used these days
Even with HRTFs applied?
err, unless the game applies onsp
a lot of the time people's sounds don't even use it
often people just delete or never add the component
if this does what i think, then i've not heard it ingame
because if something is perfectly to the side of me, it's all in one ear and zero leak into other ear like would realistically happen
it's quite uncomfortable
@marsh cedar vrchat is forward render, keep that in mind... set your Main Camera in unity to forward rendering... also, don't use zwrite on transparent shader or grabpass, because anything render queue higher (with exceptions) will not show through. if there's stencils and you don't need them, just remove the stencil buffer part of the shader.
@final wigeon but yeah no, i'm talkign about actual spatialized stereo spread that is blended into the 3d spatialization
kind of like how vr visual is single pass stereo render
spread stereo audio would be "single pass" stereo audio, that has the vector mathing it's relative direction
it would blend as if 2 stereo sources, with the same spatial angle separation front L/R would be designed for
unless other modifiers applied
ii'd think unity should have something like that in it, but maybe too barebones without added scripts
i'm kind of hoping for an expert in unity and/or vrchat to shine some light on stereo audio sources
I just looked through the shaders and can't find any references to a grabpass. I presume the basic "Pass" doesn't count. Zwrite is disabled on the masks, and the shader I'm using for the stencils is opaque so that shouldn't cause problems right? Switching the camera rendering forward didn't change how it appeared in Unity either
So the character I've got has a weird facial structure since the game its from uses UV animations for its eye movements. A basic sphere won't fit in their eye socket. https://i.imgur.com/Rso4Djq.png I found a tutorial online that shows how to make a hole in terrain and technically fill it. Utilizing a standard shader I found that supports stencils, I frankensteined them together to create an eyeball that's reliant on the flat eye mesh. https://i.imgur.com/NC2AyUS.png This way the excess is shaved off and it can appear as a fully functional ball. For some reason though, in VRChat it completely breaks as I posted before despite working perfectly in Unity
This is the tutorial I found
most models eyes are non-spherical... they move iris/pupil on it's own weighted mesh group that has the bone to account for the rotation angle
Like all the anime avatars, correct?
ye
bones so you can use ingame eyetracking, otherwise there's also vilar's eye tracking shader that rotates meshes
I've been hesitant to try that since the mesh is very close to having a proper sphere--heck Source's eyeball shader gives off a pretty convincing ball shape, and I'm hoping to emulate that
Vilar's eye tracking shader? 👀
The example that's used kinda confuses me since that model setup looks compatible with a regular eyetracking setup. Would it work with a mesh such as this? https://i.imgur.com/ivgCV4V.png
it literally rotates the mesh it's applied to
when in the range of looking at viewer, it will rotate the mesh to face camera
you just add more mesh to go back inside the head so when it rotates a bit it sitll looks normal
maybe
i mean... your trying to get eyes moving around in that is going to be interesting to say the least
you could do your indented iris/pupil style as one mesh group, and apply eye tracking shader to that
and stencil it inside the eyeball
like have the iris actually bigger than the eyeball, but the stencil cuts it off
would definitely be interesting to see a proper pixar-style eyeball uike that in vrc tho
just trying to think of exactly how that would all be done... not sure why it wouldn't work in vrc if it's working in unity as you did it
vrchat is a bit scuffed, and at times we just gotta deal with it :/
I actually have a scene of 6 eyeball tests using stencils, and one of them is like that one you described https://i.imgur.com/4mLVIhx.png Unfortunately yeah, I don't think I can utilize any of'em since its all wigged out in VRC. I apprecate ya showing me that shader, but since I can get regular eye tracking working I don't think I'll need it, and yeah... I might just bite the bullet and adjust the character's face geometry if I can't bash my head against this problem 'til its fixed
I appreciate the help
well eye tracking shade behaves differently but ye
i mean i imagine the method is gonna need stencils either way, but yeah, moving the iris/pupil and keeping rest of eyeball stationary seems like the best way to save yourself a lot of grief
Ye... I'll try that if I can't get this working. I'm holding off since there's this one type of character in the game that has this really cool/distorted sclera which is the whole reason I've been persistant on getting the whole ball working https://i.imgur.com/tzwGPiV.png
o
hmm
well i mean
is it actually the shape of an eyeball?
or is is squished/deformed
cuz you could just use basic stencil buffer to hide the back part of the eye that's not meant to be seen, so there's no clipping issues
i haven't experimented enough with stencils to consider depth, i'd have to actually look into that
a possible issue i thought of is, what would the stencil do if looking straight on
I suppose I could try that yeah... My concern is that the shape of the head could cause rendering issues at certain angles
like what if it's zwrite
what if it's 1-sided
well 1-sided should work
i haven't tried to make a stencil wall that things change as they pass through it
like a barrier
with a lot of stencils i've seen it doesn't matter the depth, if the stencil is in that part of your screen, you can see things closer to you than the mask material... but haven't looked to see if that's conditional or if that's just how the stencils are
wellp, anyhow, i wish you luck, and hope to see the finished thing some time
There is one shader tutorial out there that shows off a "portal" that a little parrot avatar can pass through, so that does seem very possible. But yeah, as for the latter is appears that when a stecil is drawn, it marks those pixels with the stencil integer, so I'm not sure if that can be worked around. The only problem I've found currently is if the same character lines up with another one with the same stencils. I find that to be a minor issue though if this can be made functional. I appreciate the good wishes! I'm making one more attempt before I sleep that could hopefully work. 👍 I'll post somethin' if its made functional
nono
i don't mean going through a portal
i mean like a wall
say make a giant wall that's seethrough and has patterns on it
and for example, on one side of the wall a person is like all matrix shader
and as they go through, the past that passes through becomes normal shaders
Ooooohhhh
so if they stand half way, no matter what angle you look
he'd be half matrix half normal
i think that might be just zwriting
but i haven't tested it
because in most stencils i've seen
if you're on the normal side
and looking on with matrix side filling your view, you'd always see them as matrix shader, even if they're well in front of the stencil, and close to you
Try taking a gander at that one I linked. It mentions how its written to do multiple render passes so it can detect and account for depth
...
because im thinking that is something that may cause your eyes to be hidden if not set up right...
also, don't count on depth working properly in vrc without a shadowed directional light to force the depth texture on
Oh dear...
linear depth kinda works without
but no kinds of depth blends work properly without
this intersection highlight is only possible with a d-light to force the depth
Weeellll heck..
I'll have to experiment with this later--I've gotta head out for now. Thank ya so much for your insight on this stuff! It's really super helpful since I'm just kinda fumbling around at this point
~~Also the last test was a flop https://i.imgur.com/K7wEjox.png ~~
don't ztest on the shader itself lol
Does anyone have @atomic shuttle 's gun prefab? @sand canyon 's link from a few months ago seems to have expired
Appreciate it.
Do you know if there's a better/more up to date gun prefab out there? I've been having a hell of a time trying to get bullet collisions to work properly. I have a world where they work but you have to lead your target if they are moving, because the collision seems to take place on the target's end and not the shooters
what is so special about that gun prefab?
I just want to look at it and see how they are doing bullet collisions. Any prefab will work really since I'm having a hard time doing it myself
I could also post my bullet prefab here if you like and anyone would be willing to review it
(https://www.youtube.com/watch?v=JEkbY2_Otsg Here's the map I'm working on btw)
The prefab was made before particle collision I think. There has been discussions about the problem with “favor the shooter” given network latency.
@robust yarrow has the prefab
I’m at work on mobile
Alright, thanks
It doesn't seem to have the AddDamage action. Other than that it's more or less set up the same as mine.
I remember there were a few maps (Sniper Battle, Blood Gulch) which had one-shot snipers that felt pretty good and seemed to have shooter-side based damage (so you dont have to lead your target)
I'll probably mess with it some more and see what I can do.
If anyone here knows how to use vertex data in a shader for texture blend, please ping me, unity's documentation is a bit hardcore on the subject
@stiff lily Are you trying to paint it or just use it?
It's already in the mesh, so just use it
What issues are you running into?
I just know 0 about writing shaders, and i'm supposed to make one from scratch 😔
I've been told it wouldn't be too difficult, but i don't think i'd be able to do it, i made a thread on the unity forums, but so far, got nothing
That would be strictly code i assume https://docs.unity3d.com/Manual/SL-VertexProgramInputs.html
Debug Tangents is probably what i'm aiming for
"Visualizing vertex colors" is a little closer
Do you need lighting?
I'd suggest you use a surface shader instead if you need the model to be lit.
It's a terrain texture, so i can use a self illumin mask, if i have the choice
Ah, is this a mesh terrain or Unity terrain?
terrain mesh, but from Valve's software, shouldn't too different from a regular mesh after all it's been through though