Using more then one VDB overlapping.
Splatterbaby
Posts: 37
Anyway to use more then one VDB when overlapping? A way to blend multiple?
Hope this is in the right place.
Thanks.
Comments
We a re told it is possible, but that the priority (stack order) is then critical http://docs.daz3d.com/doku.php/public/software/dazstudio/4/change_log_4_20_0_2#4_15_1_95
Trying to do this very thing is how I ended up with this render:
Explosion in the Sky
Awesome thanks for the info. Much appreciated.
Yeah mine just outright intersects like a boolean. But let me try a few things with this new info.
Did I make a mistake? I can't see that this parameter makes any difference at all. I created overlapping volumes and it doesn't matter what I set their Iray Volume Priority to, the render looks exactly the same, regardless of which volume has the higher value. That change log note was from DS 4.15. Is it still correct for 4.20.0.8?
Can you show an example of when this works and how to use it, please? Maybe I just don't know what to look for.
I tried adding that property and rendered three iterations of the same VDB using different fields. I changed the scattering multiplier for each of them (I'm still working out how exactly the two properties are supposed to work, so any color changes I make are just guesses), and here's what the final result looked like:
And here are the three fields separately.
Fuel:
Heat:
Density (smoke):
You can definitely see that all three fields are rendering simultaneously, although I could probably pick a better frame or make a more targeted VDB to better demonstrate the differences.
@Gordig if you change the priorities of the VDBs, does it look any different? If you don't even add the new property, does it look any different? For me, I couldn't see that the new property did anything. That's why I asked if I did it wrong. I wonder if the particular VDBs used makes a difference. I never got those colored rectangles you showed earlier.
The rectangles I got were from physically offsetting the cubes from each other. I can test to see if that still happens with the new properties, but changing the render priority of the different cubes didn't really seem to make a difference. I'm fine with that, if it solves the problem of multiple VDBs canceling each other out.
Well, I tried both changing the render priority of the different fields, and offsetting the cubes that contained the VDBs. As far as I can tell, changing the render priority makes absolutely no difference, but offsetting the cubes no longer creates abstract art. I'll have to try doing it to a regular cube to see if the problem is entirely solved, or if simply adding that property is what makes it possible, even if the property has no other purpose. It might be one of those quirks like renaming the surface to "Volume" in order to prevent clipping to geometry, and is one other reason it would be nice if Daz incorporated a new volume primitive object.
For me, the presence or absence of the new property made no difference. I don't understand when or if the new property is even needed. I couldn't see that adding the property made any change from before I added the property. It appears to be a red herring to me.
So if I try to use more than one VDB it seems that whichever one I show last overrides any others, and I can only get one at a time to show. I'm really not understanding the method to get this render priority property added. I see a render priority property if I show hidden properties, but that doesn't seem to do anything. I've searched, but I'm finding nothing. Can anyone explain, or link to an explanation? Thanks.
This is what I did:
But, this may not be right, because it made no visible difference at all, no matter how I set the priorities.
Do you have Clip to Geometry turned on? It looks to me like clipping one volume clips them all. That might be a bug, I don't know. Clipping one might clip and hide the other in your case of only seeing one of them. Is your volume surface named "Volume"? If not, you can't disable clipping, as I understand it.
You can also right-click to enter edit mode.
Why does clipping one volume to geometry (pink bunny cloud) clip a big hole out of the other volume (cyan explosion)? The explosion volume has clipping turned off. Both volumes were created in primitive cubes. Changing Iray Volume Priority makes no difference. The scene file is attached.
It makes sense in a somewhat backwards sense. Clipping to geometry on the primitive housing the bunny does exactly that: create a solid boundary through which the volume can't pass. It is a logical if unintended consquence that OTHER volumes also also couldn't pass through it.
That seems to be how it is working. I wish all of this were documented someplace in an understandable form. (Yes, I know, that is the universal Daz Studio user's lament.) We waste so much time just trying to figure things out. Daz developers go to a lot of work to add cool new features, but it is like pulling teeth to get any information about how to use those features. Perhaps they only tell PAs.
So I created the new property, named and set everything the way barbult showed in his example, but nothing seems to change. I tried changing the new priority settings to various numbers and still I can only see one VDB at a time.
Gordig You've clearly got this working. Where did you find the info to get it to work? Maybe you can link to that or explain it to me please? I hate to ask questions, but I just can't figure this out or even find any info about it. I've made my own VDBs in Blender, but I need to be able to overlay several of them similar to the way you did the multicolored smoke to get what I'm trying to accomplish.
Disregard all of that maybe. Once I realized that I needed to change the Surface Name to "Volume" using the Geometry Editor in order to turn the Clip To Geometry off, it seems that none of these other steps are needed at all. Now My VDBs overlay each other fine. It seems that was my problem the whole time and that Render Priority is not even needed? I once again feel kind of dumb now that I think I've figured it out.
I asked about your surface name up here. Maybe I didn't phrase it in a way that made sense to you. I don't think you need any of that priority stuff.
I was somehow missing the surface name part, to get clip to geometry off, mostly because I don't think I understood how to change it with the Geometry Editor. I eventually found something on DeviantArt that explained it perfectly and all the problems went away. Thanks for the help either way.
From https://raytracing-docs.nvidia.com/iray/manual/manual.220118.LTR.pdf
15.1.2.3 Defining priorities
While by default an enclosed volume takes precedence over the enclosing volume, for the region of overlap this is actually not strictly defined. The underlying assumption is that the overlap is reasonably small and Iray simply uses one of the two surfaces for media separation and ignores the other.
In case the overlap is larger or in general more complex (e.g. a drinking glass with fine geometric details), priorities can be specified to explicitly define the order. For example, an ice cube floating on water should be assigned a higher priority than the water (such that it realistically displaces the water below it). Similarly, the glass containing both the cubes and water may be assigned a higher priority than the ice.
Volume stack priority is specified using an attribute on exttt{IAttribute_set} :
The priorities apply to ALL volumes, no matter if volume is a VBD or an Iray Uber Base volume and only operates on the actual geometry, priorities ignore the shape of the VBD and seem to only work when "Clip to Geometry" is on.
So, the special "Iray Volume Priority" property can be added to ANY volume, be it "Water", "smoke". Not only to VBDs.
So, the behavior, in plain badly spoken English, when there are clipped to geometry volumes sharing the same space, the one with the higher priority is the one that will be prevail.
Iray Volume Priority, as I created the property based on Richard's change log reference, does nothing. So either I implemented it wrong, or I still don't understand how it is supposet to work, or it is broken in DS 4.20.0.11 Public Beta. Can you demonstrate ANY instance where an added property called Iray Volume Priority does ANTYHING? That would help tremendously.
I finally found an instance where the Iray Volume Priority seemed to make a difference. Thanks to jag11's post about both volumes having to have clip to geometry on and only the container geometry being affected, not the shape of the VDB. (Why does NVIDIA call it VBD in the manual?)
Here is my example with pink and green cloud creator clouds. I believe the cloud volume geometry and the VDB are the same shape. I had to make the pink cloud very low density to see the green one through it.
You nailed it. I made a test scene with two liquid volumes (water, ior 1.333 and ice, ior 1.309) and two VDBs and played with it, but your results are more visually clear.
Alessandro Mastronardi's incoming product "Mesh To Volume... and back" will be very usefull for cases like this, 'cause we need the volumes actual geometry.
Alot of very usefull information here. Thanks Gordig and everyone involved. Really helps. Im going to go test a few things.