keijiro / Smrvfx

Skinned mesh sampling with VFX Graph
The Unlicense
1.08k stars 153 forks source link

Multiple Mesh Renders #12

Closed xubi1993 closed 4 years ago

xubi1993 commented 4 years ago

Hello, Can we use this on multiple mesh renders. Like in this example:

Link: https://www.youtube.com/watch?v=Ka6IIuqQ8Dc

Can I use multiple mesh renders to achieve the same affect with multiple people with each person assigned his own mesh render to be driven by the depth camera?

keijiro commented 4 years ago

Can we use this on multiple mesh renders.

Yes.

Can I use multiple mesh renders to achieve the same affect with multiple people with each person assigned his own mesh render to be driven by the depth camera?

It sounds like possible but depends on your implementation and the specs of the device.

keijiro commented 4 years ago

I'm closing this issue now. Please feel free to reopen for further problems.

xubi1993 commented 4 years ago

Hello Again, I try to combines the meshes before passing it to the compute shader but the mesh combining does not work well and not good for performance.

Than I tried to pass the skinned meshes in form of an array but the compute shader overrides each time its called so only last passed mesh gets processed. Any idea how to combine mesh data before sending it to the shader or keep the position data in the texture until all position data is processed and than override in the next frame. Thanks.

keijiro commented 4 years ago

I think just using multiple instances of SkinnedMeshBaker and VFX is enough for rendering multiple meshes. It might be better than spending a significant amount of process time for combining them before baking.

xubi1993 commented 4 years ago

Thanks @keijiro it works like a charm :)

albertobonanni commented 4 years ago

Hi Keijiro, I am having the same issue but I haven't yet managed to solve it. I have three different avatars: one is rendering motion capture data (depth camera), whereas the other two have different animations applied. I am trying to apply the same VFX graph to all of them, but as mentioned the meshbaker overrides and only renders the first mesh. Do you know how can I list different meshes? I tried to instance multiple baker/vfx game objects with different meshes as sources,, but this is the result. Thank you in advance @keijiro !

Screenshot 2020-01-27 22 59 02

albertobonanni commented 4 years ago

Ok it just took me a while to process what you guys have been talking about.. it actually works. Amazing!!