Jump to content

problem with SDF volumes inside foreach


anupamd

Recommended Posts

Guys, quick question. I have a bunch of voroni cells generated with the voroni fracture sop. I want to fill each cell with an SDF volume.

The problem is if I just do it bruit force and just feed the entire set of cells to an isooffset, often this produces errors in the volume (wierd stretching artifacts).

Turning off ray-intersect or laserscan does not help. Doing it per-cell in a foreach works (with merge results). The problem is it creates multiple volumes (one for each piece). As you can imagine this blows the memory out the water if you are dealing with 100 cells...etc. yes, I can copy the resulting volume into a new volume, and delete the previous volumes, but you still eat up memory either way.

I just want one SDF volume representing the cells at the end of the process.

How can I inside the for each sop merge the previous volume with just one reference volume so that in the end, all I get is one volume?

I guess Im just not that good with foreach :) Or there is a way to do this without using foreach? A quick example hip would help. ;)

Thanks

Link to comment
Share on other sites

On a foreach you need to untick "merge results" to get a feedback loop happening.

The foreach is set to 'each number' .. I have put a blank volume into the foreach (with the bounding box of all volumes), the volumes to merge go in the second input. A blast with a stamp expression deletes all but the current volume, then a volume mix maxes the volumes together.

For an SDF you would combine with minimum.

have fun!

EDIT: I guess you can put your geo into the foreach and blast on that, and isooffset inside the foreach. Also, it might be good to do the isooffset in 'div size' mode so that small pieces don't have many voxels.

volumeCombine.hip

Edited by sam.h
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...