Jump to content

Work flow questions: Poly mesh to VDB to Point cloud + attribs

Recommended Posts

TL;DR: How do I transfer/create attributes from geo faces & points to VDB to a point cloud?


Hi all,  I'm working on some vegetation scatter tech on poly objects.  The problem is the input poly objects are non manifold and I need to cull the intersecting areas so vegetation is scattered only on the external surfaces.


This is my currently work flow:
Input Geo -> Poly Cap -> Convert to VDB =

Input Geo -> Poly Cap -> Convert to VDB => Merge VDBs -> Scatter points on VDB for vegetation 


Apart from the poly cap not being the best this works pretty well until I want to create attributes for the vegetation, some need to be sourced from the input Geo and some need to be generated.  What I was hoping to do was generate a point cloud from the VDB, then populated it with data and cache it to disk so I could do fast lookups on the data whenever I needed to spawn vegetation:

                      -> Input VDB, process volumes, write data to point cloud

 Merge VDBs -> Scatter point ----------------------------------------------------> Sample data from point cloud


The most simple example is I want an attribute present in the VDB/ point cloud identifying which areas were created with the poly cap so I know not to spawn points there as these would always be the back sides of the input geo.


I've seen in the Polygon to VDB you can create attributes, and I can see it's created a VDB for each attrib, but how to i visualize this in any way?  The Geometry Spread Sheet doesn't have a volume mode and I can't seem to get volume visualization SOP to do anything.


What I want is something like how the scatter SOP works where it interpolates point attribs across a polygon and assigns the interpolated value to the scatter points, but for polygon -> VDB.


Also, should I be skipping adding attribs to the VDB and assigning them directly to the point cloud?


is there a better way of doing this whole thing?





Edited by GeordieM
Link to comment
Share on other sites

Haha so many colleagues :)


So the Ray sop did the trick.  I wanted to avoid adding the attribs directly to the VDB since it dubes the whole volume per attrib and I might need 15 or so attribs.   I post an example file when I'm done.



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.

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...