papsphilip Posted March 15, 2022 Share Posted March 15, 2022 Sounds simple but i've never done this before. How can i bake particle positions into a texture sequence? the point count is the same through out the animation their position is always on XZ plane and 0 to 1 space Quote Link to comment Share on other sites More sharing options...
ryew Posted March 15, 2022 Share Posted March 15, 2022 Have you tried the technique in the Entagma tutorial https://entagma.com/houdini-baking-point-attributes-to-textures/ ? Quote Link to comment Share on other sites More sharing options...
papsphilip Posted March 15, 2022 Author Share Posted March 15, 2022 yeah i think this doesn't apply to this particular problem because they are rasterizing points in a grayscale texture, what i want is the actual xyz information in an exr sequence so that i can import it into Unity VFX graph. i am using the vertex animation rop for now and it is exporting a really large texture. Each pixel is a point on a particular frame this is probably the way to go although i would prefer if i had separate textures for each frame. Each pixel would have a color that corresponds to its xyz position for one frame. i am not sure what the correct workflow is here Quote Link to comment Share on other sites More sharing options...
ryew Posted March 15, 2022 Share Posted March 15, 2022 Ah, yes, a different use case here. I'm sure someone in the Games subgroup here or on SideFXs forums can offer additional ideas or clarify the Houdini<->Unity best practices for this sort of thing Quote Link to comment Share on other sites More sharing options...
papsphilip Posted March 16, 2022 Author Share Posted March 16, 2022 i managed to export a position map for all my particles - one texture per frame - using a custom but simple solution. i write each particle position as Cd on a grid of points. The grid point count must equal the particle count - if grid points are more its ok. Then in COPS using a VopCopfilter i write the Cd from each grid point as one pixel value. So bottom left pixel 0,0 takes Cd from point 0 then continues right to the end of the row and then to the row above starting left to right. i will upload my solution as soon as i find the time. I am also thinking now maybe a python node would be the best solution of all. i will definitely try that as well - exporting point positions to an image straight from a python node 1 Quote Link to comment Share on other sites More sharing options...
mestela Posted March 17, 2022 Share Posted March 17, 2022 You can't use the labs vat particle export? Quote Link to comment Share on other sites More sharing options...
papsphilip Posted March 17, 2022 Author Share Posted March 17, 2022 well that was my first choice but the texture for 500.000 or 1M particles over 480 frames is pretty huge and heavy. i wasn't sure this was the right workflow to be honest. Also i am still not sure about the resulting precision of these textures from COPs. Even though i export 32bit float exr in my custom solution, when i go over the image in Houdini with the color sampler i can see the numbers are rounded. So a @P.x value of 0.625753 becomes 0.6258 since vat also uses COPs if i am not mistaken i was afraid of losing precision. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.