Jump to content

Fine control VEX modelling of Voxels with VDB Wrangle

Recommended Posts

Hi Superior brains,

as I approach modelling methodologies, I've turn my attention towards VDB's

In the below example I've used a grid (but this would be an arbitrary shape Convex/concave "2Shape") with a noise pattern to create heights for a later extrude; I then convert to VDB to "cleanup the geo"

My question: is it possible to directly manipulate the VDB via VEX to do something similar without having to go through the conversion process (poly to VDB)

One reason behind this is the shape I wish to extrude can be fairly complex and dense thus making the conversion process slow, so perhaps adding voxels or extruding/expanding/manipulating voxels is possible in some way? ( VDB Wrangle?), feels like this is not possible but never hurts to ask... unless its physical...;)



Share this post

Link to post
Share on other sites

Thanks Tesan,

Seems the Volume Wrangle geometry node might be worth exploring, ideally I'm trying to avoid advanced mathematics but certainly there might be some tricks here that are interesting. I will need to find some some simple examples using this node to get a better understanding. I assume this means there's no direct manipulation of voxels as in VDB only volume voxels.. or are these the same?

thanks again.



Edited by Trilec

Share this post

Link to post
Share on other sites

thanks Konstantin ,

A nice simple example, It seems attribute transfer is problematic  for volumes.

I and trying to roll off at the edge and approched this with getOutsideGroups ...attribtransfer and attribpromote

Is there a good way to get the same or similar with voxels (volumes) (soft rolling off to the lower edge)?

thanks again



Share this post

Link to post
Share on other sites

A signed distance field already is a volume that 'fades out' towards its borders. So as soon as you go VDB-from-volumes and use 'distance VDB' you should get what you want.

Or are you attempting to measure the distance from a voxel to an outline curve or anything?

Share this post

Link to post
Share on other sites


After further investigation, seems harder to control VDB than through pure poly mesh (for something like this)

I was trying for an even roll as the shapes are arbitrary from bottom to top.

Seems you can pass attributes via vdbfrompolygons , but not sure if this is the best solution as the vdb resolution with get very high.


vector rbox = relbbox( @P );

//boost the lower portion
if(rbox.y < 0.06) density = 1;

f@density  -= rbox.y *.2; 


In the wrangle I get a little way but it  removes the top and bottom and falloff not quite there yet.



Edited by Trilec
added code

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now