keijiro / HdrpVatExample

VAT (Vertex Animation Texture) with Unity Shader Graph and Visual Effect Graph
The Unlicense
884 stars 86 forks source link

Benefit of VAT with RBD over standard anim? #9

Closed MostHated closed 4 years ago

MostHated commented 4 years ago

Hey there, I saw you added the rigid body variation of the vertex animation texture. I had originally tried that out myself with no luck but was attempting to use the cloth shader just to see if it would work. Great to see this example. I had a question though, in your opinion, is there a benefit to using this method over just exporting with the RBD_to_FBX node? In my current project, I did it using that node and then just added the animation to Timeline as I wanted to use a Substance material on the RBD object, which it didn't look like I could export out of Houdini directly, so I had to add it on after importation into Unity.

By the looks of your shader, one could simply add the additional channels for textures to end up with a similar output as just using the lit node, so I am wondering if there might be some sort of performance benefit or what situation it might be best to use VAT over standard RBD_to_FBX animation?

Thanks again for all the work and amazing samples you put out for the community. Not sure what we would do without you. :D -MH

keijiro commented 4 years ago

That's just a CPU vs GPU problem. When using RBD_to_FBX, you'll end up with playing it back via Animator, so it spends CPU time. On the other hand, VAT spends GPU time. So if you have lots of room in CPU and the system memory, FBX would be a preferable option. If you're trying to offload things to GPU, VAT might be helpful.

MostHated commented 4 years ago

Ah, perfect. Thank you much for the explination.