Using more then one VDB overlapping.

Anyway to use more then one VDB when overlapping? A way to blend multiple?

Hope this is in the right place.

Thanks.

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,747

    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

  • GordigGordig Posts: 10,047

    Trying to do this very thing is how I ended up with this render:

    Explosion in the Sky

  • SplatterbabySplatterbaby Posts: 37
    edited March 2022

    Awesome thanks for the info. Much appreciated.

    Richard Haseltine said:

    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

    Post edited by Richard Haseltine on
  • SplatterbabySplatterbaby Posts: 37
    edited March 2022

    Yeah mine just outright intersects like a boolean. But let me try a few things with this new info.

    Gordig said:

    Trying to do this very thing is how I ended up with this render:

    Explosion in the Sky

    Post edited by Richard Haseltine on
  • barbultbarbult Posts: 24,240

    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.

     

    Iray Volume Priority parameter setting.jpg
    501 x 486 - 60K
  • GordigGordig Posts: 10,047
    edited March 2022

    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.

    VDBtest full.png
    1600 x 1200 - 2M
    VDBtest fuel.png
    1600 x 1200 - 924K
    VDBtest heat.png
    1600 x 1200 - 1M
    VDBtest density.png
    1600 x 1200 - 2M
    Post edited by Gordig on
  • barbultbarbult Posts: 24,240

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

  • GordigGordig Posts: 10,047

    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.

  • GordigGordig Posts: 10,047
    edited March 2022

    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.

    VDBtest 3D.png
    900 x 1600 - 1M
    Post edited by Gordig on
  • barbultbarbult Posts: 24,240

    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.

  • SpaciousSpacious Posts: 481
    edited March 2022

    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.

    Post edited by Spacious on
  • barbultbarbult Posts: 24,240
    edited March 2022

    Spacious said:

    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:

    1. Load your volume object
    2. Put the Parameters pane in to Edit Mode via the hamburger menu
    3. Right click and select Create New Property
    4. Fill out the dialog. You can see how I did it in an image attachment in a post above.

    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.

    Post edited by barbult on
  • GordigGordig Posts: 10,047

    You can also right-click to enter edit mode.

  • barbultbarbult Posts: 24,240
    edited March 2022

    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.

     

    duf
    duf
    Two overlapping volumes one clipped.duf
    14K
    Two overlappin volumes one clipped.jpg
    2000 x 1500 - 651K
    Post edited by barbult on
  • GordigGordig Posts: 10,047

    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.

  • barbultbarbult Posts: 24,240

    Gordig said:

    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.

  • SpaciousSpacious Posts: 481

    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.

  • SpaciousSpacious Posts: 481
    edited March 2022

    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.

    Post edited by Spacious on
  • barbultbarbult Posts: 24,240

    Spacious said:

    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.

  • SpaciousSpacious Posts: 481
    edited March 2022

    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.

    Post edited by Spacious on
  • jag11jag11 Posts: 885
    edited March 2022

    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} :

    • mi::Sint8 volume_priority = 0
      • Determines which objects take precedence over others in the volume stack. The scene-surrounding empty space implicitly uses the minimum priority -128.

    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.

     

     

    Post edited by jag11 on
  • barbultbarbult Posts: 24,240

    jag11 said:

    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} :

    • mi::Sint8 volume_priority = 0
      • Determines which objects take precedence over others in the volume stack. The scene-surrounding empty space implicitly uses the minimum priority -128.

    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.

  • barbultbarbult Posts: 24,240
    edited March 2022

    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.

     

    Pink priority -1 green priority 1.jpg
    500 x 500 - 76K
    Pink priority 1 green priority -1.jpg
    500 x 500 - 70K
    Post edited by barbult on
  • jag11jag11 Posts: 885

     Can you demonstrate ANY instance where an added property called Iray Volume Priority does ANTYHING? That would help tremendously.

    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.

  • jag11jag11 Posts: 885

    barbult said:

    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.

     

    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.

Sign In or Register to comment.