Jump to content

Bake 2d particle position to texture


Recommended Posts

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

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

 

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...