VFX Graph Blend pCache files

Hey VFX wizards!

I’ve been fiddling around with VFX graph for a while know and we are trying to setup a workflow between Houdini and Unity and one thing that we were thinking of doing was either finding a way of reading a sequence of pCache or blending the values between two pCache files and connect the result on a “Set [property] from Map” block.

I found out that a pCache file can be sample as a Texture2D but then I am completely lost on how to interprete that sample, like what’s the width of the resulting texture2D (so I can make a UV lookup) or how to feed the resulting value onto the particles. If there’s any example I can refer or someone that can shed some light onto this I’d really appreciate it.

Thanks a lot!

Have you taken a look at Keijiro’s Smrvfx?

I think it might be a good starting point for understanding how to pack points into a texture.
I do not really understand it myself, but I am pretty illiterate with code.

Here is the basic solution I ended up with to blend pCaches, if you want to check it out.
https://drive.google.com/open?id=1YJY6wJ6o_HZ0tbjgaSTu8lALZv1UVdkL

2 Likes

Here’s something that might help you out:

Its a talk on using Houdini to generate Pcaches. You can paint the vertices of your mesh and sort the points using the color values.
Once imported into Unity you can use the sorted values to index your particles.
Anyway, I would be really interested to see your results!

Cheers!

1 Like

This looks really cool!
I found an english translation here.

Hope to have some time to dig into it soon.

2 Likes

Hey guys!

Thanks a lot @eran and @Hungry4Apples for the ideas and direction, I will definitely dig into all the information. This is really helpful insight.
@eran your example is really good, never came to mind that I could just storage those values inside the color or position and then pass them to a custom attribute. Brilliant!!!

Really helpful stuff, I’d definitely share with you guys whatever relevant progress I make.

Cheers!

1 Like