#development-advanced

1 messages · Page 34 of 1

drifting egret
#

Otherwise you could animate a property to set it back to 0 and have it increment the time by the delta time

#

So you could "resync" it at any point

warm niche
#

we're stuck with cameras/rendertex, and they're local

normal aurora
#

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

oak pollen
#

But that would be more costly way since _Time is local and synced

normal aurora
#

more costly than what though

#

so far it's the only viable option I've seen

warm niche
#

_Time is not synced at all

oak pollen
#

Betweem cameras it is not?

warm niche
#

it's very local

#

it's player bound

normal aurora
#

it doesn't need to be synced between cameras, it just needs to be in the same units for all shaders

warm niche
#

synced meaning between players

oak pollen
#

_Time is given to shaders by client, so no need to store it anywhere

normal aurora
#

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

warm niche
#

we are talking about having stuff happen at the same time for everybody

#

and late joiners catching up

normal aurora
#

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

drifting egret
#

I mean, someone made time shaders

#

Oh fuck

#

Nvm those work on web panels ugghghgh

#

Otherwise you could get a constant synced website

normal aurora
#

(insert link to my tweet from yesterday)

warm niche
#

this is why we're talking about this 😉

drifting egret
#

Right

normal aurora
#

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

warm niche
#

they won't be coming back any time soon

normal aurora
#

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

warm niche
#

and any tricks on getting people synced up across a world would be very welcome

#

apart from using animation states

normal aurora
#

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

warm niche
#

yeah buffered object sync is not really frame sync

#

it's more like catch up every handful of frames

normal aurora
#

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

warm niche
#

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

normal aurora
#

an input like _Time0 which is floating point time in UTC would be really helpful

warm niche
#

yes

normal aurora
#

whole numbers are days since start of julian calendar, fraction is the fraction of day

warm niche
#

I dont even care what format tbh

normal aurora
#

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 🤔

warm niche
#

just some way to pin down passing of time

normal aurora
#

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

oak pollen
#

Double because of incoming 32bit overflow. Using fraction is ugly, just int bits as float would be better

normal aurora
#

using fraction is actually pretty convenient for clocks though

#

because guess how to compute the position of the hour hand

warm niche
#

yep and for shaders

normal aurora
#

literally fractionOfDay * TAU

#

and then every other hand is just frac(hourAngle * gearRatio)

oak pollen
#

Waste of bits :p

normal aurora
#

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

warm niche
#

theres global time in udon, but it will be a long while before it rolls out

normal aurora
#

grumble

#

an actual scripting language would have been so fast to implement but they had to go with a huge graphical flowchart thing

warm niche
#

its way better than playmaker already

normal aurora
#

I've implemented both before and my impression is 1-2 months for a scripting language and 10-12 months for a graphical thing

warm niche
#

and its not huge

normal aurora
#

just because making a good model for a graphical thing and doing all the editor stuff is more work

warm niche
#

that's already done

normal aurora
#

but every time someone makes a new operator, you have to make a new editor 😐

warm niche
#

that's not how that works

normal aurora
#

that was what killed me when I was implementing one

drifting egret
#

I don't believe it's better than Playmaker tbh

#

I have seen Playmaker and worked with it

warm niche
#

I've used udon, playmaker is terrible

drifting egret
#

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

normal aurora
#

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, --

warm niche
#

udon has all that too

oak pollen
#

Stop teasing >.>

drifting egret
#

I swear though, I will find something Playmaker has and Udon doesn't

#

Such as character controller support

warm niche
#

good luck 😉

#

it's more the other way around at the moment

drifting egret
#

I have a video of something I did as an experiment

normal aurora
#

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?

drifting egret
#

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.

normal aurora
#

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

proud meadow
#

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 😦

drifting egret
#

I think livestreams work yes

#

Just a painful workaround compared to web panels

shadow dock
#

it would solve some uses people were using web panels for.

drifting egret
#

Yeah

#

That is actually good

lofty elbow
#

So for anyone who had the problem I had

#

I recalculated the normals and removed the Ngons

#

And it fixed everythiiiing

fierce python
#

Ye getting a web texture loader could be cool

#

They all use that in Tabletop Simulator

oak pollen
#

Yup, a stream would work, done a proof-of-concept audio visualizer that way

normal aurora
#

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

timber sphinx
#

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?

hearty lantern
#

Like it makes you do a dance without having the emote?

#

I imagine its stations

drifting egret
#

Seats still give control to your upper body. Somehow, the MMD dance world makes you perform dances without this happening

hearty lantern
#

with animations

drifting egret
#

It is, but when I tried that, it was super broken for VR and FBT users

hearty lantern
#

the mmd dance world is broken for me in fullbody

drifting egret
#

Oh, hmm

#

Is it still?

hearty lantern
#

I havent tried it for a few weeks

drifting egret
#

Because they used emotes to get around that, and now apparently they're a step further

hearty lantern
#

ah

#

I haven't been there in a while so I wasn't aware of that

#

What do they do now?

drifting egret
#

I went there like 4 days ago. Somehow, it just plays the animation on you instantly

#

No emoting necessary

hearty lantern
#

So still stations?

warm niche
#

Yes, i mean i don't think there is a way to make it work without stations

drifting egret
#

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

merry coral
#

I'm guessing just making an animation is the best way to simulate a day cycle

rough sleet
#

Yes

merry coral
#

Mmm

#

Kk

rough sleet
#

If you use Unity's procedural skybox then rotating the directional light will move the sun

merry coral
#

Ok

rough sleet
#

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.

merry coral
#

Ok I'll make sure to do that

rough sleet
#

and make sure occlusion culling is setup.

merry coral
#

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

warm niche
#

@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 😦

rough sleet
#

@warm niche I don't know I've never used trails.

warm niche
#

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

rough sleet
#

I'm not sure if they're really meant to be anything more than billboards

#

@warm niche

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 😦

rough sleet
#

Hmm, yeah, that could be the case

#

They tend to add features to particles pretty gradually.

warm niche
#

I know what you mean, they're special effects usually just doing little additive trails, but it's ridiculous they don't have normals

rough sleet
#

2017.1 added it

#

There's a setting "Generate Lighting Data" that enables normals and tangents.

warm niche
#

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

rough sleet
#

2017.1 was apparently a big particle update

warm niche
#

hmm, this kills a bunch of things I was planning 😦

rough sleet
#

Too bad. Eventually we'll get an engine upgrade.

warm niche
#

I'll write my own trails shader, with normals, hookers and blackjack

rough sleet
#

Lol

warm niche
#

wasting cycles because unity devs forgot about lighting

rough sleet
#

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

warm niche
#

even the particles have normals

#

but not trails

#

lol yeah true, but they went for years forgetting about them

rough sleet
#

Hmm, trails were only added in 5.5

#

5.4 had a big particle system upgrade

warm niche
#

I'm probably the only person in the world missing them too

#

but it puzzled me

rough sleet
#

Maybe, there was enough of a use case to justify adding them in 2017.1

#

Which was <1 year after 5.5 released

warm niche
#

ah, yeah I'm no unity historian, but it's oddly absent

rough sleet
warm niche
#

I figured if there was a workaround, you'd be the one to know

rough sleet
#

That's the demo video they made when they released trails.

warm niche
#

oh that looks so bad

rough sleet
#

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.

warm niche
#

that's all standard options

rough sleet
#

The only suggestion I have is the custom vertex stream data

#

But that's probably only for the particle itself not the trail.

warm niche
#

how would I use that to add something that isn't calculated anywhere?

little cipher
#

where should I ask questions related to the web api ?

sharp burrow
#

The Web API is unsupported, so would be here probably. But don't expect to get a answer for it.

little cipher
#

okay, well, all I really would like to do is log into my account, pull my friends list and get theire statuses

sharp burrow
#

Oh, you can do that

little cipher
#

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

sharp burrow
#

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

little cipher
#

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

little cipher
#

so far it looks usefull, but now I'm trying to figure out why it's failing to log in

#

got it working

slate canyon
#

HEY HEY HEY ANYONE ON?

final wigeon
#

@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.

slate canyon
#

Hey Gallium, are u pretty well versed in VR development? 😮

final wigeon
#

I do much more with the 3D modeling side of things.

slate canyon
#

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?

final wigeon
#

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.

slate canyon
#

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?

shadow dock
slate canyon
#

sweet, thanks Jetdog

#

dang, seems like it's specifically for oculus

#

err...specifically for vive*

final wigeon
#

InputEmulator should be as HMD-agnostic as steamVR is, which is very.

slate canyon
#

I almost need a Leap Motion emulator

final wigeon
#

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.

slate canyon
#

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

lean pewter
#

there is no voice room,?

slate canyon
#

Hmm... I guess i've never checked

#

Doesn't look like it

oak pollen
#

VRchat fetches controllers from OpenVR. And ImputEmulator does what its name says - thats how people use custom tracking solutions for VR

slate canyon
#

Guess I'll download and play around with it today and see what I can do 😃 thanks guys

slate canyon
#

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

little cipher
#

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" ?

sharp burrow
#

Just add object sync on them

sand canyon
#

@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.

timber sphinx
#

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...

summer berry
#

I don’t have final IK to check, but what if they turn it off while you are seated.

timber sphinx
#

well maybe, but i litteraly dont know what having those things in the editor do because i dont want to spend money on them

summer berry
#

Do you want to, uh, find out more, so we can finally answer all these questions?

#

Oh, nevermind then.

timber sphinx
#

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

little cipher
#

@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

copper acorn
#

and if this ai engine uses custom scripts, than you aren't allowed to upload them
if you are making this as vrc world

little cipher
#

oh ?

#

aaaah

#

ok, so I can't write my own code for the worlds ?

copper acorn
#

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

little cipher
#

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

sharp burrow
#

Just think about what C# code can do and you understand why 😛

copper acorn
little cipher
#

yeah, I understand :/

summer berry
#

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.

little cipher
#

@copper acorn that looks very promesing!

#

@summer berry I'll take a look at it, thanks 😃

#

can't find it 😕

copper acorn
sand canyon
#

@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.

copper acorn
#

is that a reason that i doesn't have some scripts on Toybox? )

sand canyon
#

Yep

summer berry
#

Don’t use that link. The new version is V2.1 I think

#

And my message is still the last pinned for toybox.

copper acorn
summer berry
#

As usual with downloaded prefabs, read the included readme!

timber sphinx
#

Did someone already ask the devs if it is possible to disable the controls overriding the VRC_Station animator ones though?

slate canyon
#

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

fleet dome
#

Scripts don't function in VRChat.

sharp burrow
#

^ That is true and false. Standard Asset scripts work in VRChat

near bronze
#

^ 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

slate canyon
#

ah, so you can't put standard asset scripts on partical effects?

near bronze
#

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

warm niche
near bronze
#

Not directly, but you could separate all the frames and play it like a texture sheet or a gif then have the audio synced

warm niche
#

oh my okay, so there isn't any way to get a video playing script to work on an avatar

near bronze
#

Not the video player component specifically, no

warm niche
#

ripp okay, thanks for the help yo!

modern dawn
#

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|

tardy folio
#

Ask for a rename

drifting egret
#

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)

oak pollen
#

Can also hide vertices in vertex shader or not pass any in geometry or do discard in fragment ;)

drifting egret
#

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

cold minnow
#

Does the WebPanel allow javascript and WebRTC?

summer berry
#

It did allow javascipt, but web panels are dead now.

cold minnow
#

damn tupper

tardy folio
#

What

knotty relic
#

Is this where i can get support with Unity and SDK?

silk horizon
#

What's wrong

knotty relic
#

having trouble finding a log in for SDK in Unity

fleet roost
#

Type out your problem, don't just ask!

knotty relic
#

the tab at the top doesnt give me a log in option

silk horizon
#

Ohhhhhh

knotty relic
#

okay okay! 😰

fleet roost
#

Bad SDK install.

knotty relic
#

??

#

how do i install it correctly

near bronze
#

It's in the settings

silk horizon
#

^

knotty relic
#

?

#

So i make a new project,

#

then what

fleet roost
near bronze
#

What options do you see in the vrchat tab

knotty relic
#

Clear Cache

#

and other stuff

near bronze
#

Is that one option or do you see a few?

knotty relic
#

yu[

#

yup

#

just that one option

silk horizon
#

Should see settings if not close unity and delete the vrcsdk and plugin folder

knotty relic
#

clear cache

silk horizon
#

In the project folder under assets ofc

knotty relic
#

where would i find the two folders.

silk horizon
#

Then relaunch the project and open the newest sdk unitypackage

#

Under your project location

knotty relic
#

ah

#

okay

silk horizon
#

Most likely in my documents

#

Unless you moved the folder manually

knotty relic
#

okay so:

#

right now

#

I just imported SDK into unity

#

so i should close unity now?

silk horizon
#

Close unity

knotty relic
#

okay

#

in the project folder

silk horizon
#

Go to project assets folder

knotty relic
#

okay

silk horizon
#

Delete VRCSDK and plugins

knotty relic
#

the whole plugins folder?

#

or the .meta

silk horizon
#

Delete the meta files associated with those folders

#

And the folders

knotty relic
#

done

#

scenes is all thats left

silk horizon
#

Open project in unity

knotty relic
#

k

#

okay

#

now what

silk horizon
#

Open latest sdk unity project

knotty relic
#

import it?

silk horizon
#

Sorry

knotty relic
#

or just run it

silk horizon
#

Unity package yes

knotty relic
#

import it?

silk horizon
#

Import

knotty relic
#

kk

silk horizon
#

Sorry

knotty relic
#

also yes

#

Ive checked, its the latest one 😄

silk horizon
#

Ok

#

I just say that as I've had people 6 behind

knotty relic
#

lmaoooo

#

hope im not too much of a problem lmaoooooo

#

oof

silk horizon
#

Now you should have settings in the vrchat menu at the top

knotty relic
#

i really appreciate you helping me 😛

#

okay lemme check

#

uh

#

nope...

#

;-;

silk horizon
#

What do you have

#

Cashe

knotty relic
#

?

silk horizon
#

?

knotty relic
#

what

#

the version?

silk horizon
#

Second

knotty relic
#

wut

#

im so confused

#

have of what

silk horizon
#

So yaaaaaa

#

@near bronze @fleet roost he um... Had 2018

near bronze
#

Wait did you guys take it to dms or...?

fleet roost
#

(falls face first onto the ground)

silk horizon
#

Yep

#

He's set now

#

He was running 2018

drifting egret
#

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

sharp burrow
#

unity_StereoEyeIndex, 0 is left eye 1 is right eye, this what you looking for?

hearty lantern
#

oof

drifting egret
#

Ah, that's exactly it. Thanks.

sharp burrow
#

jinx

drifting egret
#

What is this value on desktop?

#

Does it even exist?

hearty lantern
#

I'm not sure if it exists in desktop mode

drifting egret
#

I'll probably test that out real quick. I'm making a shader but I don't want it to look weird on desktop

warm niche
#

left eye is supposed to be working for desktop

drifting egret
#

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

sharp burrow
drifting egret
#

Interesting, will check it out thanks

drifting egret
#

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

proud meadow
#

@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

drifting egret
#

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

proud meadow
#

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

drifting egret
#

Hmm, I could try that

proud meadow
#

I'm not sure how you would write a stencil value in the mirror though. The mirror world is not in VR

drifting egret
#

Will ifdef work though? I thought that's a compile time thing

proud meadow
#

Yes, some sets of ifdef can be made "multi_compile" - this particular one is built-in so it happens that way automatically.

drifting egret
#

Ah, nice

#

Yeah, it seems to be working in the editor.

oak pollen
#

Explicit ColorMask RGBA may help when 0 alpha does not work

cold minnow
#

what layer do avatars use?

#

Player?

drifting egret
#

Player for other players, PlayerLocal for yourself.

cold minnow
#

ok

drifting egret
#

Player does not have any colliders on its own though @cold minnow

#

In case you're wondering about that

cold minnow
#

no, it's just for lights

drifting egret
#

Only if the avatar itself has it, or if there's a combat system component

#

Ah

trail jacinth
#

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.

drifting egret
#

I think the trigger might be on the pickup object itself.

#

When the object touches the trash can, the object deletes itself.

trail jacinth
#

Yeah but its not that easy to delete self

drifting egret
#

It should be.

trail jacinth
#

An ObjectSpawner requires a Prefab

drifting egret
#

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.

trail jacinth
#

Ohh....

#

Ok yeah Im stupid

drifting egret
#

As long as it only tries to delete something within its own hierarchy, it should work fine

trail jacinth
#

Thats why I like traditional programming more than Drag n' Drops :P

drifting egret
#

@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

rough sleet
#

@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

drifting egret
#

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

rough sleet
#

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.

drifting egret
#

Yeah, true

#

I guess that's the way it works then

rough sleet
#

Also the UnityShaderVariables.cginc file has a lot of useful stuff.

trail jacinth
#

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?

drifting egret
#

It seems to be unused

summer berry
#

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.

trail jacinth
#

So prolly not implemented yet

drifting egret
#

I think the only way to increase the pickup distance is by giving it a larger trigger collider

trail jacinth
#

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...?

drifting egret
#

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

summer berry
#

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

trail jacinth
#

Ive seen it used for chess pieces so they wouldnt fall over every time you move them around

drifting egret
#

I think the Hub does that with Is Kinematic

#

Just disables gravity on them etc

#

Freezes stuff in the air where you left it

trail jacinth
#

No but thats something different

summer berry
#

Do you want the rotation frozen?

trail jacinth
#

yes basically

summer berry
#

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

trail jacinth
#

so the pickup would ideally be a sphere right?

summer berry
#

It will move in space, but will not rotate

#

Can be whatever you want.

trail jacinth
#

But wouldnt it mess up the highlighting outline then?

summer berry
#

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...

trail jacinth
#

I mean we could do a feature request for that, but I guess its not too commonly used

summer berry
#

I doubt they would get to it since I don't see many world based cannies being implemented.

#

/udon

thorny lynx
#

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

latent hemlock
#

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

proud meadow
#

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.

stoic socket
#

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

latent hemlock
#

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

drifting egret
#

@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

rose nest
#

Yeah, avatar file names show up in memory

#

It's not really useful information though

lyric osprey
#

OnAvatarHit detects when a avatar enters a collider?

drifting egret
#

You probably want OnEnterTrigger instead

#

OnAvatarHit is used for combat systems I believe

summer berry
#

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

drifting egret
#

Ah

lyric osprey
#

okay, I'm trying to make a teleporter that teleports players when the walk into a area if that helps any

summer berry
trail jacinth
#

Is there a way to delete all instances of an ObjectSpawner's spawned objects at once?

summer berry
trail jacinth
#

Cheeky self-promotion :^)

sand canyon
#

Hahaha cheeky cyan

summer berry
#

It is, but I also no longer need to explain thing twice

sand canyon
#

Like and subscribe!

summer berry
#

Don't expect me to say that

trail jacinth
#

dont forget comment :^)

summer berry
#

Though, I do tell people to come to this official discord at the end

trail jacinth
#

oof youre definitely more resource efficient with the broadcasts, gotta give you props there

summer berry
#

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

trail jacinth
#

Well yeah it makes sense, I just didnt think about it till now... welp time to redo all of my Triggers 😑

summer berry
trail jacinth
#

Hmm gonna look into that later

summer berry
#

Sadly the format is bad since I wrote it on a mac and not windows. I'll put it in a real doc later.

trail jacinth
#

Also you have any idea why my image got flipped when applied onto a cube directly (with auto-converting to a material)?

summer berry
#

They don't have proper uvs. You might need to look from another side

trail jacinth
#

I was using the standard unity cube object tho?

#

and it was exactly the same on every side

summer berry
#

Not really sure then

trail jacinth
#

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 🙄

toxic plank
#

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?

summer berry
#

Probably because they replace the animator, but I haven't messed with this.

toxic plank
#

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

hearty lantern
#

Yep

cold minnow
#

@sterile cipher why does vrchat provide so little exception data (just the exception) and an empty stack trace? PLS

summer berry
#

What exception are you even getting?

drifting egret
#

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

cold minnow
#

doesn't matter

#

decompiling the game and seeing the code is easy as fuck

drifting egret
#

True

#

It's somewhat obfuscated though

clever silo
#

Well, you can easily label and decypter iy

#

It

#

But.. cough.. cough.. against the rules.

timber sphinx
#

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

#

turned out it's not really advanced dev but eh

proud meadow
#

You shouldn't need to buy final ik to add one animator key

hybrid raft
#

But how do you add an animation key for a component that doesn't exist yet

proud meadow
#

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.

cold minnow
#

pssssst

#

here

#

definitely not a torrent of final IK

sharp burrow
#

Don't share those links here.

hybrid raft
#

Yeah the mods might not be okay with that

proud meadow
#

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

silk horizon
#

also a good way to have your unity account suspended or deleted

hybrid raft
#

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?

cold minnow
#

mods killed the link rip

latent hemlock
#

Well what did you expect

final wigeon
#

You're damn right I did. Consider this a warning. @cold minnow

cold minnow
#

also >unity account

silk horizon
#

? yes your unity account

cold minnow
#

unity doesn't know what you use

#

and even if it did, just create another account

#

0 problems

silk horizon
#

not true at all, they just like any other service provider can track your ip, mac and even HWID

cold minnow
#

europe has dynamic IPs

#

mac

silk horizon
#

dyn ip is balls

cold minnow
#

just change it lol

#

HWID

#

just change it lol

silk horizon
#

and you cnat change HWID

cold minnow
#

open regedit

#

yes you can

silk horizon
#

you can but bye bye windows install

cold minnow
#

I've never met someone with a legit windows license

silk horizon
#

also youre arguing in favor of ban evasion XD

#

gg no re

timber sphinx
#

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

latent hemlock
#

Use layers I think? Default animation controller actually mixes animations

timber sphinx
#

yes

#

but when i add layer in a configuration that does work in unity, it doesnt

proud meadow
#

Vdragon what exactly are you trying to do

timber sphinx
#

simply having 2 animations mixing with each others in animator

proud meadow
#

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

timber sphinx
#

a good idea, except it's for a station

#

which is probably why it is not working in the first place

proud meadow
#

Ah I see. But how do you want it mixed

timber sphinx
#

well simply playing one over each other

#

one moves humanoid avatar things, the other one toggle a element

proud meadow
#

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

timber sphinx
#

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

proud meadow
#

Did you set weight to 100%

timber sphinx
#

yes

#

it worked perfect in unity but failed in vrchat

#

(tested on a normal animator, in unity, of course)

proud meadow
#

Oh crap then I have no idea

timber sphinx
#

any way to fix unity animatiopn editor sluggishness?

#

it's mnaking me crazy

silk horizon
#

why would a depth blend shader only work in certain worlds and not in others

drifting egret
#

@silk horizon I think you need a realtime or mixed directional light for that to work.

silk horizon
#

presentation room

drifting egret
#

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

silk horizon
#

ohh

#

add my own

#

okie

#

ty rokk

drifting egret
#

Presentation room probably doesn't have any realtime lights (it shouldn't)

silk horizon
#

iirc no shadows

#

so probly not

silk horizon
#

am i to assume to turn on and off the light and not the game object right

#

@drifting egret

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

silk horizon
#

ok

#

i just know with camera components if you shut off the game object it makes it not visible to others(friends)

silk horizon
#

anyone able to point me in the right direction of a shader to render quads at every vertex of an object

near bronze
#

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

silk horizon
#

i just want them to spawn and face cam no need for particle system as id like it all tied to gpu

stoic holly
#

but it hangs game for a half second when cells processed

stoic holly
oak pollen
warm niche
#

has anyone got issue with disable object ?

drifting egret
#

@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.

silk horizon
#

or i could just make a lit and unlit version

#

:3

#

(aka what i did)

drifting egret
#

What?

#

Oh, you mean of the avatar

silk horizon
#

mhmm

#

realtime lighting

#

and it requires the shadows

#

thats interesting

abstract eagle
#

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.)

abstract eagle
#

(It's a shader forge shader, btw.)

silk horizon
#

thats due to it having multi lighting you need it set to single lighting

silk horizon
#

how do you count the passes in a shader, is that literally the "pass {" 's in the code?

drifting egret
#

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

silk horizon
#

i got that from playing with screenspace

#

ok cool so the passes are easy to count

oak pollen
#

Beware of additive lighting passes though "LightMode" = "ForwardAdd"

latent hemlock
#

I usually just assume that to be 4

rough sleet
#

@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.

drifting egret
#

Oh, alright

rough sleet
#

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.

mossy kraken
#

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.

tardy folio
#

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.

mossy kraken
#

Ah okay, thanks.

crisp pendant
#

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?

golden valley
crisp pendant
#

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

golden valley
#

yea that's pretty much what you want to do

crisp pendant
#

But there are also the variable declarations

#

I must not be getting them all because I keep getting pink texture in the unity editor

golden valley
#

float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) ) is probably what you are missing

#

well actually just use float3 ase_worldlightDir = _WorldSpaceLightPos0;

crisp pendant
#

I didn't miss that one

golden valley
#

well what error is it giving you?

crisp pendant
#

No error, the material just shows up as blank pink in the editor

midnight quest
#

anyone know how to make a shader/scrip shadeless?

#

shadowless

hexed flower
#

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 ?

wintry portal
#

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.

hexed flower
#

I'll take a look ! thanks you. weird that only this one does this kind of thing tho :(

wintry portal
#

It depends on the effect you're going for. In general if you're using viewDirection anywhere itll probably need it, depending.

hexed flower
#

It's an overlay

#

So yeah.

wintry portal
#

Yeah that definitely needs it.

hexed flower
#

Is there anyways to render the 2 VR viewpoint in unity ? 🤔

wintry portal
#

Do you have a headset?

hexed flower
#

Yep

wintry portal
#

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.

hexed flower
#

Got it

#

Thanks 👌🏻

hexed flower
#

Oh well ; I though I had the skillz to do it but I guess I don't.

hexed flower
#

Well ; More than 2 hours to try to fix it ; i'm giving up Kappa

stiff lily
#

If anyone here is knowledgeable about vertex face attributes shaders, please ping me !

near bronze
#

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?

drifting egret
#

The code for all standard shaders can be found on the Unity website. Just add ZTest Always to the subshader.

near bronze
#

That was easy, thanks 😃

little cipher
#

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 ?

near bronze
#

the raytracing you speak of is not out of the question, but controlling the audio at all is

lusty widget
#

is there a way to get past 20k polys?

autumn hatch
hearty lantern
warm niche
#

can you put midi stuff on an avatar

#

or is that world only

autumn hatch
#

World only

little cipher
#

@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

dusky drift
#

that's called audio occlusion, and it's very cpu heavy

drifting egret
#

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.

sour mural
#

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 vrcwow

stiff lily
#

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 ?

summer berry
#

Things like that are possible, but it takes work to get it properly

sour mural
#

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

sand canyon
#

@sour mural check out the world called Beta Maze or something like that

autumn hatch
#

That's very cool, dude haha funny and original joke

warm niche
#

Is it allowed to use the apit to display server status?

marsh cedar
#

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

earnest dune
#

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

rose nest
#

Is it possible to make a shader which reveals how many meshes other avatars have?

runic mauve
#

@rose nest mimi would know the shader name

#

she use in avatar testing as flash light thing

sharp burrow
#

Not tested the free one, but the unity store one works

rose nest
#

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

hearty lantern
#

mimi uses projectors in avatar testing

#

not a shader to show polys

#

im pretty sure

sharp burrow
#

The projector needs a material that has a shader

hearty lantern
#

oh damn well there you go

drifting egret
#

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

hearty lantern
#

It would be cool if we could count meshes

#

I'd certainly update my poly police model

marsh cedar
stoic holly
#

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

bright dragon
#

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)

near bronze
#

@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

drifting egret
#

@bright dragon your water shader is incompatible with VR.

#

Try syn's shaders instead

stoic holly
#

@near bronze ty I'll try

bright dragon
#

is there something that makes a shader incompatible with VR? I will try that shader, but idk, i like to know reasons haha

drifting egret
#

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.

bright dragon
#

okay, thank you alot for clarification! ^-^ @drifting egret

lethal girder
#

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?

summer berry
#

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

lethal girder
#

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 😭

lethal girder
#

oh. I set the pickup use down trigger to take ownership instead of collisions. hope this wont be laggy in networking 😂

#

thanks

harsh nest
wicked walrus
#

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.

sand canyon
#

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.

wicked walrus
#

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

wicked walrus
#

@sand canyon My goodness thank you <33

#

it worked flawlessly

sand canyon
#

Yay!

silk horizon
#

@sand canyon i got the third person walking backwards

sand canyon
#

Ooh yay

sand canyon
#

@silk horizon any chance you’ll prefab an example?

silk horizon
#

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

sand canyon
#

Nice

#

I’m not good at animating whole characters so I haven’t messed with blend trees much.

silk horizon
#

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

silk horizon
#

anyone have insight on setting int in an animation with the animator you are in

near bronze
#

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

silk horizon
#

ah, i did something similar but external

#

all good

#

gotta test

warm niche
#
                            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;
warm niche
#

is anyone able to explain to me why we are unable or not permitted to use stereo audio on avatars?

final wigeon
#

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?

warm niche
#

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

final wigeon
#

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?

warm niche
#

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

final wigeon
#

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.

warm niche
#

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

marsh cedar
#

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

warm niche
#

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

final wigeon
#

Even with HRTFs applied?

warm niche
#

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

marsh cedar
#

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

warm niche
#

i think more the question is

#

what are you trying to do?

marsh cedar
#

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

warm niche
#

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

marsh cedar
#

Like all the anime avatars, correct?

warm niche
#

ye

#

bones so you can use ingame eyetracking, otherwise there's also vilar's eye tracking shader that rotates meshes

marsh cedar
#

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? 👀

warm niche
#

plus it's an amplify shader so it's easy to manipulate

marsh cedar
#

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

warm niche
#

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 :/

marsh cedar
#

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

warm niche
#

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

marsh cedar
#

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

warm niche
#

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

marsh cedar
#

I suppose I could try that yeah... My concern is that the shape of the head could cause rendering issues at certain angles

warm niche
#

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

marsh cedar
#

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

warm niche
#

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

marsh cedar
#

Ooooohhhh

warm niche
#

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

marsh cedar
#

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

warm niche
#

...
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

marsh cedar
#

Oh dear...

warm niche
#

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

marsh cedar
#

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

warm niche
#

don't ztest on the shader itself lol

desert frigate
#

Does anyone have @atomic shuttle 's gun prefab? @sand canyon 's link from a few months ago seems to have expired

sand canyon
#

That prefab is pretty old now

#

Let me see if I have another link

desert frigate
#

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

warm niche
#

what is so special about that gun prefab?

desert frigate
#

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

sand canyon
#

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

robust yarrow
#

wait

#

that link doesnt work

#

i'll get the right one

desert frigate
#

Alright, thanks

robust yarrow
#

sent you a dm with it

#

in the mean time

desert frigate
#

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.

stiff lily
#

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

rough sleet
#

@stiff lily Are you trying to paint it or just use it?

stiff lily
#

It's already in the mesh, so just use it

rough sleet
#

What issues are you running into?

stiff lily
#

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

rough sleet
#

Are you using Amplify Shader Editor or Shader Forge?

#

Or just code?

stiff lily
#

Debug Tangents is probably what i'm aiming for

rough sleet
#

"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.

stiff lily
#

It's a terrain texture, so i can use a self illumin mask, if i have the choice

rough sleet
#

Ah, is this a mesh terrain or Unity terrain?

stiff lily
#

terrain mesh, but from Valve's software, shouldn't too different from a regular mesh after all it's been through though

rough sleet
#

Ah, yeah it's just a normal mesh in that case.

#

A surface shader will probably be a little easier anyways.