Jump to content
CinnamonMetal

Particles Density based on Volume

Recommended Posts

I have a sphere which I converted to VDB from Polygons, within a VolumeVOP I'm getting the volume gradient and binding that out to an attribute. 

How do I see volume attributes in the geo spreadsheet and how do I use the attribute within a POPNet so there is less particles where the volume is 1 and more particles where the volume is 0.  I tried inheriting the attribute but it doesn't give me the result which I want ?

 

Share this post


Link to post
Share on other sites

Hi there, 

I don't think you can directly bind out or create an attribute from a volumeVop, and the attribute you created in this way won't show in the spreadsheet as a "volume attributes".

I would suggest do a volume gradient sample with scattered points in a point wrangle or vop.

Something like:

v@grad = volumegradient(1,"density",@P);

Hope this would help.

Share this post


Link to post
Share on other sites

Hi i do not know if you are not accquated with  vex solution. In sop world you can use " attribute from volume" in houdini you can do the same thing in diferent ways or who know.

Cheers

 

Edited by supertwiki

Share this post


Link to post
Share on other sites

I have values on the attribute but I'm not seeing the results on the scattered points; those results should be, whereas where the volume gradient is 0 the particles are dense and as it goes out to 1 the particles become less ?

Share this post


Link to post
Share on other sites

In volume vop.

Use volume sample gradient convert that vector to float ....  then multiply  by density, scatter the points.

Hope that help

Edited by supertwiki

Share this post


Link to post
Share on other sites

 

 manipulating the volume for scatter the points to spread in particles?

So you need to work on volume, volume vop, or volume wrangle ... or who know...

Otherwise why you need the gradient if  N do the same?  

 

If you use the gradient value to fit value for modify the shape of you source particles use volume if you choice that trick.

 

 

 

Share this post


Link to post
Share on other sites

Hi there,

First you don't need to connect the primnum to your volumegradientfile vop, that is for which primitive volume you wanna sample, let's say you have two volumes named density and heat, 0 will be density and 1 will be the heat.

Second, you should connect your volume to your second input, cause you want to sample the gradient from the volume right? You can't sample the gradient from the points.

Third, you can't just bind in the density in a point/prim/vertex/detail vop, you need to do that in a volumevop or you can sample the density from the second input volume using volumesample vop. 

Volume doesn't work like points and primitive, we can't directly grab the density/gradient/surface or any other fields we created in volume and assume it's gonna work, so we need to use the volumesample to sample the density, surface etc and use volumegradient to sample the gradient from a volume. I know it's a bit hard to understand so I found more information here:

 

Also cgwiki has a great topic for understanding volumes, how to modify and sample, how to create field etc.

http://www.tokeru.com/cgwiki/index.php?title=HoudiniVolumes

 

Hope this would help.

  • Like 1

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

×