Jump to content

Are there any resources on volumes alone?


magneto

Recommended Posts

Hi,

Recently I want to learn about volumes but it seems like there is not much info about them that I could find. Are they only a tool for fire, smoke, etc so they don't deserve an introduction by themselves?

It would be good if there was an introduction kind of video/article that teaches you the fundamentals and then maybe shows you some of the dedicated volume sops/vops. But I didn't see this sort of thing anywhere (SESI, Peter Quint, cmivfx, etc).

Or is it because everyone already knows volumes instinctively? :)

Thanks.

Edited by magneto
Link to comment
Share on other sites

Well what do you want to know Ryan?

I'm presuming you know how to use SDF data with geometry/points etc...

Are you wanting to know how to manipulate stuff in volumeVops?

I've made you a little scene that shows you a few nodes you can use with volumes and a volumeVOP that does displacement on a volume (think of it like manipulating normal data, the gradient, but then diving back to sample the volume at a different point).

Hope that helps

Christian

volumesForMagneto.hip

  • Like 2
Link to comment
Share on other sites

Thanks alot Christian, that's a wonderful example I will learn from. I actually used SDF blindly via IsoOffset a couple times when I needed to scatter points inside a geometry, as opposed to just the surface of a geometry, but that's it. I don't know anything else about it or what it actually does.

Basically I don't even know if SDF and the fog volume of IsoOffset are related. Or what are the ways to create/generate volumes, either from scratch or from another object?

I know many different ways to create geometry but volumes, I am not sure of their starting point this way. Also what are the uses of volumes?

Are Houdini's volumes synonymous to say Maya's fields? Should you rely on the viewport display of volumes, or do you need to render them?

Also with volumes MMB seems to show 1 point, so do they need a point to exist?

Stuff like that. So in short I know nothing :)

Edited by magneto
Link to comment
Share on other sites

You can think of the point as simply storing the position of the volume. Volumes can also be translated, rotated and so on like other objects.

A fog volume stores a value representing whether a particular voxel is inside the surface - so 1 if it is fully inside, 0 if fully outside. If the surface cuts through a voxel the value will be between 0 and 1 depending on how much of the voxel is inside the surface. The fog volume naturally extends to representing, er, fog, and similar things where the density of the substance - fog, smoke, flame etc varies from voxel to voxel.

SDFs are the other way of representing a surface as a volume, and make most sense for things like liquids, where there is a well defined inside and outside, rather than fog where what we are interested in is the density at a given point. With an SDF the value at each voxel represents how far the voxel is from the surface, and is positive if we are inside the surface, and negative if we are outside, and 0 if the voxel happens to lie exactly on the surface.

I did a series on Volumes a while back. http://vimeo.com/7049140 Most of it is still valid, though there are some additional tools in H12 that aren't covered in these videos.

Regards

Peter

  • Like 1
Link to comment
Share on other sites

Hey Peter, your video's really helped me out some years ago when I was transferring to Houdini, so thank you very much for those! I'm sure you have helped a hell of a lot of people out over the years!

Ok Ryan,

Don't bother thinking of creating volumes any other way atm than to use the isoOffset, you can do, but there's no point most of the time. So create your shapes in SOP geometry and then turn it into a volume with the isoOffset.

As Peter said, Fogs are like density, SDF stores the distance to surface (positive and negative).

So using the SDF you can move other geometry to the surface of a second geometry. I've included a quick scene to explain it. Also you could use the same exact idea to have particles move over the surface of something, which I do a lot. An ISO surface is just geometry, so I use it to show the surface of the iso, but it still keeps the important information you need, ISO is just for visualizations.

Hope that helps a bit

Christian

sdfForMagneto.hip

  • Like 1
Link to comment
Share on other sites

Sorry I should add:

So in the vop sop the volumeGradient is getting the vector (like a normal) to the surface, so the direction (normalised) and the sample is getting the distance. So if you multiply the vector by the magnitude of the distance you get the information you need to add on top of the current point position to hit the surface. If you add your own constant in there you can see it move between the old shape and new, so multiply by 0.5 to get half the distance to surface...

It's the same idea as displacing along normals, but you're using the volume to give you the "normals".

  • Like 1
Link to comment
Share on other sites

I like to use volumes to create stable booleans (cookie node)

By using iso offset to convert multiple geometry nodes into volumes and adding/subtracting those volumes.

When you convert them back to polygons you basically have done a boolean, but one that doesn't break randomly,

and it gets you a uniformly detailed mesh...

You will have to do the conversion in parts though, if you want hi-res conversions or you will need a high sampling rate and a lot of memory,

(until the improved Houdini volumes are coming)

<Plug>

http://www.twandegra... Graaf 2012.pdf

</Plug>

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

Thanks Twan. If you use volumes for booleans then the new geometry will have completely different topology, right? Just wondering. I will be sure to try it too.

Correct, that was what I meant with "uniformly detailed mesh"

the sharp edges of you model will also change, they will be cut off or slightly beveled depending on the sampling rate of the iso-offset node.

if you want to cut your model into multiple parts, you will have to create them slightly larger (at least 2*(sampling rate/volume max axis size) I think).

Otherwise you will get gaps because of the corners that are cut off, and re-cut them to the wanted size afterwards. (see my document in the Chunks and Voxel chapters)

Also note that this only works correctly on solids, so you may need to use a poly-cap beforehand.

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

Thanks alot guys, now I have a better understanding of volumes.

@Christian:

Your files were very useful. I wonder about a couple things though:

1. I see that there is Volume Gradient and Volume Sample. They only seem to differ in return type, so look very similar to Import Attrib. Why isn't there a single VOP that does both by allowing you to specify the return type? Or am I missing something?

2. Are volumes used to drive different values/parameters of DOP simulations like fuel, heat, visconsity, etc? Is this the central part for their use?

3. Is a noisy volume that's converted from a geometry via IsoOffset is the common starting point? Just out of curiosity, what other ways can you modify them?

4. In your fog volume example you were using AA noise. Is there a reason for this? I just thought some noises are more preferred when using volumes than others due to the nature of them?

5. Am I right to assume SDF volumes are used whenever you want particles, fire, smoke, fluids to interact with another geometry, detecting, colliding, creeping, etc? I know you mentioned creeping but just wondering if SDFs are used this way because of their uniform way to define distances to a surface, instead of conventional 3d ray intersections that you do normally?

That's all, really appreciate the help. Thanks Christian and everyone else :)

Link to comment
Share on other sites

volume gradient returns a vector in the direction that the (scalar) volume changes value, volume sample just retrieves an actual value in the volume.

think of gradient as the first derivative of a scalar function

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

Thanks ikarus. Reason I asked that was because I thought if you wanted to get the value of a vector3 volume, then you would use gradient, otherwise if you just wanted get a float voxel value, then you would use a volume sample VOP.

So my understanding was if a voxel had a Cd[xyz] value of [1,2,3], then volume gradient VOP would give you a vector of [1,2,3]. But for voxels with just single floats, you would use a volume sample VOP.

I assume if you use the volume gradient for something like density, you would get the same value for each vector component, like [value, value, value]. But I am not sure what happens if you try volume sample VOP on a volume with multiple values.

I know these multiple values are represented by separate volumes but I thought they are being accessed simultaneously.

Edited by magneto
Link to comment
Share on other sites

I assume if you use the volume gradient for something like density, you would get the same value for each vector component, like [value, value, value]. But I am not sure what happens if you try volume sample VOP on a volume with multiple values.

No, you would get the vector representing the direction of change in that density field. (Just as Ikarus said above). If the density field is constant, then you would get 0,0,0

As for sample VOP, you would need to sample the separate volumes separately, ie to read the values of vel.[xyz] volumes you would use three sample VOPs.

well a vector is comprised of 3 scalars, so the gradient of a vector field would be a 3x3 matrix field, a vector for each component of the vector function

And that is exactly what the Volume Analysis SOP does in gradient mode - if you run it on vel.[xyz] you get 9 volumes.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Hi Christian - or anyone else who might be able to answer a question for me...

I'm looking at the file volumesForMagneto.hip [here] and trying to unpick what's going on and I'm baffled as to why when the sphere is converted to a fog volume it's size is the same as the input geo but when converting to an SDF it's much bigger, even though the offset is 0.

I'll try and understand the rest of the file but if anyone can shed some light on this I'd be very grateful

Thanks

Link to comment
Share on other sites

...

I'm looking at the file volumesForMagneto.hip [here] and trying to unpick what's going on and I'm baffled as to why when the sphere is converted to a fog volume it's size is the same as the input geo but when converting to an SDF it's much bigger, even though the offset is 0.

...

it's not bigger, the data is correct, but it may look much bigger in your viewport and that's probably a visualisation bug, I'm experiencing that as well ( in some builds in H11 viewport), quite annoying, but if you append convert SOP you will see correct meshed version of the data, which should be about the same size as the original sphere ( or in my case just switching to OGL3.2 viewport works )

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