Jump to content

vdb voxel size from fragment color


Recommended Posts

The VDBfromPolygon SOP does not use per-point attributes or variables.

You need another way to get the value from the point or prim.

 

in the voxelsize parameter of the vdbfrompolygons1 SOP, put this expression:

 

point("../each1",0,'vsize',0)

 

That will get the vsize atttribute of point #0 of each incoming piece.

 

You also want to make you vsize smaller. Your volumes are too course.

Edited by xray
  • Like 1
Link to comment
Share on other sites

Also more info on the VDB site:

 

http://www.openvdb.org/documentation/doxygen/faq.html#sAdaptiveGrid

 

'

Is OpenVDB an adaptive grid?

Let's first stress that the term "adaptive grid" is somewhat ambiguous. Some use it to mean a grid that can store data sampled at adaptive voxel sizes typically derived from a so-called "refinement oracle", whereas others mean multiple grids with different fixed voxel sizes all sampling the same data. An example of the former is an octree and of the latter is a mipmap. Since OpenVDB stores both data values and child nodes at each level of the tree, it is adaptive only in the first sense, not the second. The level of adaptivity or refinement between the tree levels is defined by the branching factors of the nodes, which are fixed at compile time.'

Link to comment
Share on other sites

Thank you all for your input!

Maybe I didn't explain my self very well. I meant different voxel size for each fragment assuming that each fragment has only one color value.

Anyway, xray's expression did the trick so everything is good now!

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