VRChat - Grab your props with Avatar Dynamics !
Vložit
- čas přidán 1. 08. 2024
- This is the updated version of • !!OUTDATED VIDEO pleas... !
It solves most synchronization problems with avatar parameter drivers.
You can still have some inconsistencies about where in the world you left an item, but it's the exact same problem you can have with a toggle menu.
Since the parent constraint of the item will now be driven by expression parameters, it will always be synced with other players!
IMPORTANT: check "islocal" for every vrc avatar parameter driver!!!
Timecodes:
00:00 Intro
00:56 Beginning of the tutorial
01:11 Creating the items container
01:33 Creating the world constraint
02:44 Creating the standard parent contraint
06:17 Creating the animations
08:11 Setting up the PhysBone
10:39 Setting up the contacts
14:40 Introduction to the animator
17:14 Adding the location parameter
17:45 Creating an idle animation
18:53 Setting up the parameter drivers
23:47 Using the driven expression parameter
25:14 Testing the avatar
25:38 Maybe maybe maybe
----------------
Background music by Karl Casey @ White Bat Audio
VR Hardware:
-Valve Index
-Index Knuckles
-4 * Index base stations 2.0
-3 * Vive trackers
Software and avatar-related mods:
-Unity
-VRChat
-OBS
-DaVinci Resolve
-Audacity
-Paint.NET
#vrchat #tutorial #avatar - Hry
ERRATUM: I strongly recommend that you check "islocal" for ALL avatar parameter drivers!!!
Also, completely forgot about that, but you may also want to prevent transitions between the left and right hand! To do so, use the same technique than at 23:34 and add "location not equals 1" to the left hand transition and "location not equals 2" to the right hand transition. Thanks to @vincent Alesci for bringing this up :-)
I've been looking for a guide like this forever, and just randomly stumbled upon this video lol
Than you!
This is an excellent tutorial. I had created props in a similar way to this for my avatar, but always had synchronization issues with other players. Thanks so much for showing the fix!
Glad it helped you out :)
Yes, thank you very much this tutorial really helped me. I combined this with making the sword toggle on and off and it works great!
Awesome video! Thank you so much as a vrchat player!
Very nice video, helped a lot
Thank you so much! Very well explained.
Thank you very much for that good tutorial. I really wanted to do that kind of stuff :3
You're welcome :-)
So I am not one to really comment on tutorials but I honestly think that for any tutorial out there that this has been the easiest one to listen to cause of the way it is structured.
Nicely made video and I feel confident that I can do this on my own but I know that if I get confused I can easily come back! I learned a lot from this alone and it doesn't feel like I was just plain copying but was learning how it works and that if I want to add anything onto it that I can confidently do that!
Please continue making tutorials cause you are REALLY good at it in my opinion and I would love to see the screen touch contacts at some point too!
Thanks a lot for the nice comment!
This is amazing! I wonder if it's possible to make that someone else can grab the prop, for example a creating an avatar that is nothing but a tool box of different objects and any one can grab those, it would be useful to bring objects to any world where I want to make a video and have those objects available, like a cigarettes, a gun, a book, a sword, etc.
It's actually doable, but I didn't try it myself. You could probably take inspiration from VRCRed's among us follower which is grabbable by anyone hfcred.booth.pm/items/3872107
Great tutorial, short and complete with time codes and perfectly edited. I don't know if the making of the Tutorial may have been easier than the Editing of the video. Nice work and thank you for this tutorial I learned a lot of things with it.
However I still can't make the world constraint work and the weapon is always either grabbed or sheathed.
Hello, and thank you for your kind words!
Make sure to recheck the conditions in both layers, and also the parameters' spelling.
As a reminder everything in unity is case sensitive so make sure capitals are at the right place :)
I won't be able to answer much today because I'm dead af, but I'll read your potential answers as soon as I deadn't :D
Amazing video, it worked for me! ^^
Btw, I would love to know how other people can interact with the weapon as well.
I haven't tried it myself, but you could take inspiration from VRCRed grabbable follower! :)
czcams.com/video/s4w2CpK_9tI/video.html
@@LoreliaDeMildiane Thank you so much ^^
@@LoreliaDeMildiane Im sorry I got a few more questions..😅
1. Where exactly can I find the "islocal" button?
2. Why do I have to activate the islocal button?
3. Whats the music called in the backround?😅
@@Gl1tchX. I got the music here czcams.com/video/g6hY7dB54bc/video.html :)
The IsLocal checkbox is inside the "vrc avatar parameter driver" that I add on the animation states "right 1" "left 2" and so on, in the tutorial I leave it unchecked but it's better to check it (I literally learned that today)
@@LoreliaDeMildiane Unfortunately something happend. I was playing just with my vr headset. But now I decided to play with my FBT, and I noticed its not staying in place when Im using FBT. Like if I sit down its not staying in place correctly
Thankyuuuu
I'm trying to achieve this with quest but cant use constraints
Are there more efficient ways to implement this?
Such as achieving the same result without adding additional bones to track the Transform to the object?
Currently, whenever I have to use those separate objects to modify the location of where I want the props to be, the in-scene transform/rotate/scale controls are always offset into a different position to the objects themselves (mainly because the avatar is in a T-pose by default, and not the idle/empty, half-submerged through the floor inanimate position where the hands are held out in front. It's really frustrating because it makes positioning two simultaneous objects very precisely, or mirroring placements for each hand, very unnecessarily difficult.
Hello, yes you can do the same without the bones, which is something I should have mentioned :')
You still need the senders/receivers, but instead of testing if the bone is grabbed you can play with gestures.
So something like "if the pistol is on the hip and my hand is detected and I do the fist gesture, attach the pistol to my hand", that kind of thing.
I prefer using the bones because I sometimes disable the gestures, but it should work as good.
Tutorial has helped great till the VRC Paramater driver and then mine looks completely different than yours I get something else completely there it says Local only, Debug String, Add, Up, Down, Delete
Click on Add :-)
i was having problems with this not working… at all!! it’s been hours and i found out that the only solution was to put the layer you had the animations on,
into the FX layer under the playable layers tab in the avatar’s SDK descriptor. i accidentally put my animation layers into the VRChat Action Layers, so i had to set that as my FX. then it worked perfectly!
also, i’m not sure if you covered this in the video, but is there any way to set some sort of trigger or toggle that puts the items back where they should be? Im imagining what would happen if the props just got… lost LMAO
because they get stuck in one place in the world. Any way to get those back?
Im also thinking of letting other people be able to interact with and grab these props. What settings would I have to enable to let people interact with them as well?
@@laymantime oh sure, you could always create a menu that would reset "weapon location" to 0 if needed. It would be a bit long to explain in a comment, but check how to use a custom vrchat expression menu, there are tons of videos about that :)
@@LoreliaDeMildiane ah yes, thank you. i’ll be sure to look for those tutorials, too. This video was a lot of help and i’m glad you made it. I just have one small question, but this is just someone extra.
so the transition animations are pretty quick. if i set it to like, .25 and such, then the grab animation happens with a little bit of tweening.
Is there any way i could edit the transition of the animation so that whenever i grab the item, it happens quickly, but when i let go of the item, it floats back slowly? I kinda want the items to float back onto my hip, but i don’t know how to change the animation without affecting BOTH item holding animation.
Here’s what i get:
a slow transition when grabbing the item and when letting go of the item/putting it on the hip
but i want to grab the item and have it come into my hand fast, but when i return the item, it goes back slowly.
I dont have the world constraint. so the items automatically teleport back to my hip. i want it to float slowly back.
that’s all. this is a wordy reply, sorry! I just have a hard time trying to make my ideas clear.
NEVERMIND. I JUST FIGURED IT OUT LMAOOOO. TOOK ME LESS TIME THAN THE TIME IT TOOK ME TO TYPE THIS
@@laymantime ah ah I was about to start to answer :D glad you found out yourself! :)
*I AM GOING TO USE THIS… IN ORDER TO GRAB OTHER PEOPLE.
Very awesome tutorial! Does this work for quest tho? Because im curious if quest users will be able to see me move the object around.
Thank you!
I never made quest stuff but as far as I know quest avatars can't use parent constraints, so I doubt it'd work alas.
Hi I followed your steps and yes it works but it's just very hard to grab, like its very finicky. What do i need to increase size of?
While in game you can display all contacts using the quick menu, there you should be able to better determine what to change, be it the physbones radius or the receiver size.
Hello again! i just finished up the additional steps that were needed and everything seems to be working just fine except one thing, when i hold the sword in either the left or the right hand, and then bring the other unoccupied hand into proximity of the sword, it rapidly jumps from one hand to the other but stops eventually. Any ideas as to why this might be? thank you again for this amazing tutorial!
Oh I see, if you want to prevent that, you have to add "location not equals 2" to the transition to the right hand and "location not equals 1" to the one of the left hand. Same system that for the transition to world 3.
I completely forgot about that problem because I never bring my hands together, sorry about that :'D
Randomly stumbling on this tutorial! thankies!
i was wondering if you could maybe do a tutorial on making idle animations for wings and such using the FX layer.
I have made the animation for my wings but for some reason the animation is not playing at all in world
Hello! I actually have a huge to-do list of videos (and other things) but I haven't got the time because of irl problems.
I intend to revive the channel but probably not in the next few weeks :(
Nevertheless I'm adding your suggestion to the list ;-)
@@LoreliaDeMildiane oh thank you very very much. I hope things get better for you.
if you don't mind while we wait did you have a youtuber in mind that might be able to help with my problem?
obviously im still going to watch your stuff lol but it would be nice to find some extra help while
i wait for your videos. Also i'm subscribing!
@@Kunoich1 thank you :)
I remember using @sippbox tutorials when I began. Maybe check their stuff ;-)
@@LoreliaDeMildiane thankies thankies!
By any chance could this setup be edited to work with others being able to grab the prop or do other players need to have a specific contact name
Hello, I haven't tried myself yet, but I know for a fact that it is doable. You could probably take inspiration from VRCRed's among us follower which is grabbable by anyone hfcred.booth.pm/items/3872107
is there a way that you could put this on quest as ive seen it before but never understood it
Hello, as far as I know you can't use parent constraints on quest so people who do that probably play with multiple copies of the prop, and \-this is a wild guest as I don't make quest avatars\- conditioning the toggles with contacts and gestures.
Any idea why when i am holding something using this method. if i let go with my index finger and press it down again it lets go of the whole object? I put this on a gun and it just lets go when i try to press the trigger
Is the firing stuff in another layer? I actually use this system on two guns without problem, tho in my case I fire the gun when I touch the trigger, not when I press it.
I'll check that this weekend, I can't laugh vrc today.
so i have followed this tutorial twice for the same project. and no matter what i do grabbing is non existant. i dont know what im doing wrong at this point. i changed my hand contacts and made sure my hands are properly register in the avatar files themselves. it doesnt register grabbing at all and i dont know why.
Hello, have you checked the debug menu in game? Do you know where it fails?
BTW while I prefer doing it this way, because it "feels" better for me, there is an alternative way that does not rely on the "grabbing" action:
You don't add a physbone at all and only test which gesture the hand is doing when inside the item contact receiver.
So for example the condition to transition from hips to right hand would be something like "if right hand is detected and if right hand is doing the fist gesture and if sword in on hips, transition to sword in right hand". Basically instead of testing if the bone is being grabbed you test the gesture.
Um I’m having difficulties seeing where the bone radius expands
Maybe try either with a really smol value like 0.001 or on the contrary a big one like 100?
Thank you for all of the help! Just curious, how is it that the avatar parameter driver helps with sync issues? Is it that the animation state is constantly firing, so any desyncs are corrected next frame?
Thank you for your comment!
In the very first version of this tutorial, which is no longer public, I didn't use the avatar parameter drivers. And I had a LOT of desyncs with other players. People not seeing the item I had in my hand, or seeing the item at spawn, etc.
So, don't ask me why, but no it's not corrected by the next frame :(
Now every single time I use avatar dynamics I also use avatar parameter drivers to force the sync, and nearly all problems are gone. The only few left are linked to the world constraint (people not seeing the item exactly where I left it) but I think it's unavoidable.
@@LoreliaDeMildiane Thank you for the speedy reply! While I have your ear, do you know of any tool that lets you emulate the way an avatar's finger bones are rotated when doing gestures? I want to position a small item in my hand when I make a particular gesture, it's been hard because I keep having to move it around, upload the avatar and test it in my vr headset.
I keep thinking there's gotta be something that approximates the animations used in game, those proxy animations in the avatar SDK don't seem to come close to the actual animations used in game 🤔
@@MrNargleflex uuuuuh, I understand what you mean but I have no idea if such a tool exists. When I have to adjust an item in my hand I usually do what you described, taking screenshots. :')
@@LoreliaDeMildiane Hahahah, I share your pain then! 😭
lovely tutorial and im sure i wouldnt be having issues if i wasnt dumb but im able to grab the Sword but when i go to let go of the sword it does not go back to the hip
Are you using a world constraint?
@@LoreliaDeMildiane i am not no
@@pastnight is the parent constraint working well within unity when playing with the sources?
@@LoreliaDeMildiane I ended up getting it to work! My big brain forgot to put “false” on one of the parameter drivers, thank you for this tutorial and the responses!
@@pastnight glad you got it to work :)
hello, i have a simple question, is there anyway i could add this to an avatar that uses write defaults on without breaking it?
Hmmm I don't really know tbh. If it doesn't work right away, I *think* write defaults affects the whole animator controller, so *maybe* using another controller than FX and put the grabbing mechanics there?
Those are only hypothesis, I only used write defaults on my very first avatar and didn't have much animations back then.
But I know some ppl like it and still use it for advanced stuff so pretty sure it should be feasible.
@@LoreliaDeMildiane thank you so much for answering, i tried it and it works with absolutely cero issues, once again thanks!
do the props need to be added to unity and not on the avatar on blender?
Never tried to add props in blender but I guess that as long as you can manipulate them in unity that should do the trick.
If you could use them with a toggle menu, it should work here too.
Do you have a discord server I could join if I have any questions? Im asking because I am having a problem and I dont know where I went wrong. The weapon wont be picked up.
Hello, since I don't have much content to justify it (yet) I haven't created a discord, but you can dm me on Twitter @DeMildiane. I'll try to answer outside of working hours.
You can already check the most common mistake which is mistyped parameter names (especially the capital "i" of _IsGrabbed)
@@LoreliaDeMildiane Thanks! Ill Dm you at a later some time then. And look over some mistakes people are talking about in the comments.
Hi, how to grab a weapon with 2 hands without switching between left/right states? Is it possible?
I know for a fact that it is possible but I never tried it myself.
So, sorry but I can't really help you with that atm.
But I *might* try to do it in the near future, no promises tho.
@@LoreliaDeMildiane I found the solution. Go to animator where weapon driver is and add to Left2(weaponright=false) and Right2(weaponleft=false).
@@iamone_ oooh I didn't understand you then, I thought you wanted to two-hand a weapon! Glad you found the solution tho :)
If you set the transition to the "Hip 0" state as not grabbed and intersecting the hip receiver, does that mean that you'll hoover up the prop when it's in the world and you move your hip over it?
Yup, you can of course prevent it and in a more general way have more control over the transitions by not using the "any" state
@@LoreliaDeMildiane I had a weird issue, I have a dropoff location on my head, which works visually fine but the physbone and contacts on the prop get snapped to the base of my neck.
I remembered that VRChat scales the head bone and anything under it to 0 for the avatar instance you're wearing. But when you look into a mirror you're actually looking at a different instance! So the mirror clone looks fine but the physbones and contacts are reflected from the real - busted - instance.
I haven't tried it yet but the fix should be just rotation-position-constraining the head container to the head bone, thus ignoring the scale factor that comes with parenting.
PS: The physbone is really good for index finger tracking compared to guessed gestures.
@@g_glop yup, that or a parent constraint targeting the head
@@LoreliaDeMildiane Doesn't a parent constraint copy over the scale as well?
@@g_glop it's just rotation and location iirc
I have everything working, but for some reason while its in my hand, its reacting to what my leg does (the gun holster happens to be on the leg so thats one of the parent constraints locations). So when i move around, the gun moves around too....not sure if theres a new layer that i need
Check your animations, sounds like the weight of the parent source pointing to the holster isn't set to 0 when the one pointing to your hand is set to 1.
@@LoreliaDeMildiane I do have the holster animation set to 0 while hand is set to 0 for the constraints (and the reverse).
wait i mean holster to 0 while hand is 1, sorry for confusion
@@nanabosho weird... Maybe check if there are no interference from another layer and animation? I Hope you can figure it out
@@LoreliaDeMildiane I had a similar issue with my toe constraints vs phys bones and i had to make sure that one wasnt on before the other or it would freeze them in place...not sure if that has anything to do with it
what if i want to allow others to grab?
I haven't done that yet, there are multiple ways to achieve this as far as I know. Like either using a player tracker (which can be complicated) or a clever use of physbones but don't quote me on that.
If I ever do it I'll make a tutorial about it too!
Hello so I followed every single step of your video also added the islocal and added the technique at 23:34 you wrote in the comments and still it doesn't work. I went through the whole tutorial again, I have everything the same and nothing happens ingame when I try to grab the sword. I really don't know what to do anymore I would be so thankful for help.
Hello, maybe try to use the in game debug screen, there you could check your variable values and the state of each layer.
Additionally you can also display the contacts with the avatar overlay and see if they work properly (a contact sphere turns green when triggered)
@@LoreliaDeMildiane Hey thanks for your fast response I have to admit that I really don’t understand what you mean >~< i am so sorry is it maybe possible to contact you on discord if you don’t mind helping me? ._.
@@hannahquinn1526 I'm at work right now I'll only be available in like 6 hours or so :')
@@hannahquinn1526 hey do you still need help? I won't be on discord today but you can dm me on Twitter @DeMildiane. Send me some screenshots of the physbone, the expression parameters and the animator parameters and I'll check them out when I can
@@LoreliaDeMildiane hey yes i am still waiting sadly I don’t have twitter do you also have instagram maybe?
Tutorial doesnt work at all. Cant grab the weapon at all. Followed the tutorial exactly
obviously you didnt
any chance that other people can interact with my props ?
I know that it's feasible but I haven't tried it myself yet
While this worked great for me, I am finding this is now causing things like ears and tail on the avatar from no longer animating from gestures and such.
Hmmm could be a misplaced physbone root or if you touched to write defaults in other layers maybe?
@@LoreliaDeMildiane I'm not sure what to make of the misplaced physbone root suggestion. As for the other point, none of the elements used for this have the Write Defaults option turned on as I did turn it off as was mentioned in the video.
@@arctacia yes but did you turn it off on other animations? If your own animations, non related to grabbing stuff, had it checked, unchecking it there could break stuff
Hello!
So Ive been trying this too, followed the tutorial twice, in the debug menu I can see the isgrabbed and right hand both go to True when I try to grab it, however the Location stays at 0 no matter what.
It is set to change to 1 when I grab it and my hand is on it, local only as well, but as mentioned it stays at 0 : /
The Conditions to set to 0 are also isgrabbed false and hipcontact true.
So theres no way it gets overriden by that.
Hello, can't help you much right now because I'm going to sleep, but in the debug menu you can also check the state of the animation layer. I'll read your answer tomorrow, tell me if you still need help :)
@@LoreliaDeMildiane Do you mean under the FX Layer? That also doesnt change ;/ same as the parameters
@@AyataHiragi if you can dm me some screenshots on Twitter (@DeMildiane) I'll check them out when I can.
I would need the expression parameters, the animator parameters, the list of the layers, the avatar descriptor and the detail of one of the transitions
Don't send me the blueprint ID from the descriptor tho ;)
@@LoreliaDeMildiane Thank you, sent.
Hi does the prop need to be just the mesh and not armature on it?
your props can have an armature, actually the guns of the avatar I'm using during the tutorial have an armature, particle emitters etc etc :)
@@LoreliaDeMildiane do i put the grab and receivers on the armature or the mesh?
@@theunicornops2855 I usually put everything on the armature
@@LoreliaDeMildiane do i have to have gestures on in game for this to work?
@@theunicornops2855 iirc since it's based on physbones grabbing gestures shouldn't have any impact
After six hours, I give up.
The box is triggered (green in debug), everything seems okay, but when I go and grab my item, it's just stuck to my hips (but item_isGrabbed) DOES go off so what the heck...
You can dm me on Twitter if you want @DeMildiane. Send me a screenshot of your animator parameters :)
@@LoreliaDeMildiane I don't have twitter but also see my own reply to my comment. I didn't know that and it was a painful experience. However, now that I have hopes again, I'm trying to add a reset button. Imagine you leave the prop somewhere and want to 'respawn' it - so far, 5 attempts failed. Do you maybe have any suggestions how to properly go about that?
@@dianagraf9174 yeah sure, just have the reset button set the location parameter to the value corresponding to where you want to reset the prop:)
@@LoreliaDeMildiane ... in dumbass terms again please. I haven't quite figured out the logic of this layout. New layer? If not, where can I add it to? Your equivalent to "weapon" or "weapon driver"? I tried multiple things here already and it won't budge lol.
@@dianagraf9174 easiest way to create a reset is by making it a toggle in the radial menu that sets the location parameter to the value of your choice, no need to add anything in the animator. I don't have a tutorial on how to make a toggle but there are plenty on youtube :).
I followed the tutorial exactly but it not working for me , I dunno why my location int value always in 0
Recheck the transitions, and also all the spellings, (parameters and tags).
@@LoreliaDeMildiane location value will change when one of the transition in weapon driver was successful because of avatar parameter driver?
@@xyi6137 yes the value of the location parameter is only changed by the parameter driver, btw I strongly advise to check the "IsLocal" box in the parameter driver
@@LoreliaDeMildiane I wonder why my avatar parameter driver is no working I try to make local but same
@@LoreliaDeMildiane I think I found the problem , my receiver is at different place when in game n unity
I don’t understand, I followed the video and it doesn’t work :0
Hello, the most common mistake is in the spelling of the parameters. Check the capitals :)
E.g: It's "IsGrabbed" not "isGrabbed"
in need hlep