Need Help with Underwater Scene in Iray.

WilmapWilmap Posts: 2,917
edited July 2015 in The Commons

I am trying to render an underwater scene using Ziggagraphs Water Camera, but I can't get it to work. It just renders as if it were in daylight - no caustic water patterns or anything.

Can anyone give me a step by step guide on how to get this render to work as I want it please.

Post edited by Wilmap on

Comments

  • Oso3DOso3D Posts: 15,085

    I believe the water cam is a 3Delight thing? If so, it won't work in Iray at all.

     

  • WilmapWilmap Posts: 2,917

    So is there a way to render an underwater scene in Iray?

  • Testing6790Testing6790 Posts: 1,091

    I have this product but I have not tried it in iray yet:

    http://www.daz3d.com/underwater-ambiance-for-daz-studio

    If I remember I can give it a quick render tonight, but no promises. I have a pretty lousy track record for remembering!

  • Oso3DOso3D Posts: 15,085
    edited July 2015

    Being really clever? :)

    I did a scene underwater, using godrays and fog.

    The fog effect: make a large volume encompassing your scene but not covering your camera. Set it perfectly transparent (Refraction weight 1, refraction 1). You want SSS: transmitted distance/SSS measure distance around 50 (adjust this to get the depth effect you want), set transmitted color to be almost white but with a little bluish tint, SSS amount ~.1 or less.

    Have a spotlight pointing into the scene above and out of frame, then make sure to put a gel (plane with a ripply or spotty pattern on it) in front of it to get a good ray patterns. Theoretically you can use Sun to do this, but I've had trouble getting distinct enough rays (if you try Sun, be sure to change disk size down to .5 or something; that helps makes the rays sharper)

    My result:

    Post edited by Richard Haseltine on
  • nDelphinDelphi Posts: 1,920

    No product that is for 3Delight is going to work for you in iRay. Which is why even for textures you have to apply the iRay shaders.

    It is only a matter of time for underwater scene products for iRay to hit the market.

    For now, timmins has a great solution there for an underwater scene.

  • Testing6790Testing6790 Posts: 1,091
    nDelphi said:

    No product that is for 3Delight is going to work for you in iRay. Which is why even for textures you have to apply the iRay shaders.

    Sorry to get a little off topic, but what do you mean exactly? I rendered a scene using iray yesterday using my normal shaders I've always used for 3Dlight (I think human uber skin or something and the default shaders for the furniture / walls).

  • BejaymacBejaymac Posts: 1,942
    nDelphi said:

    No product that is for 3Delight is going to work for you in iRay. Which is why even for textures you have to apply the iRay shaders.

    Sorry to get a little off topic, but what do you mean exactly? I rendered a scene using iray yesterday using my normal shaders I've always used for 3Dlight (I think human uber skin or something and the default shaders for the furniture / walls).

    The default surface shader and I think AOA's SSS shader have been "reworked" to work in both 3DL and Iray, but things like USS and HSS are pure Renderman Shader Language and wont work in Iray as it uses a different language.

  • WilmapWilmap Posts: 2,917
    edited July 2015

    Being really clever? :)

    I did a scene underwater, using godrays and fog.

    The fog effect: make a large volume encompassing your scene but not covering your camera. Set it perfectly transparent (Refraction weight 1, refraction 1). You want SSS: transmitted distance/SSS measure distance around 50 (adjust this to get the depth effect you want), set transmitted color to be almost white but with a little bluish tint, SSS amount ~.1 or less.

    Have a spotlight pointing into the scene above and out of frame, then make sure to put a gel (plane with a ripply or spotty pattern on it) in front of it to get a good ray patterns. Theoretically you can use Sun to do this, but I've had trouble getting distinct enough rays (if you try Sun, be sure to change disk size down to .5 or something; that helps makes the rays sharper)

     

     

    Thanks for the info, but I really don't understand the first bit. I've no idea how to do the things you said.frown

    Post edited by Wilmap on
  • bytescapesbytescapes Posts: 1,905

    I did a scene underwater, using godrays and fog.

    That's a nice image, and a very helpful description.

    Can you give a little more information about the settings that you have for your volume material? I set up a cube using the settings you gave (I had to apply the Iray Water preset to the cube first in order to get the subsurface scattering and other parameters to show up). However, when I render it, I just get a flat blue image; objects within the cube are invisible. Any tips you can give would be very much appreciated.

    Also, has anyone had any luck with caustics? There's a 'Caustic Sampler' switch in the Render:Optimization settings, but it's not clear to me exactly what properties an object or shader needs to generate caustics (specifically, watery caustics).

  • Oso3DOso3D Posts: 15,085
    edited July 2015

    Make sure Refraction Index and Refraction Weight are 1, and Glossy Roughness is 0 (or Glossiness is 1? I think)

    Ok, let's see... this is a big cylinder, and it looks like I have Transmitted Weight at 150, SSS measure at 15, SSS Amount at .008, and SSS Direction at .5

     

    The transmitted color is 227 240 243, or .77 .88 .9

    Note that Glossy Color will change the color of transparent objects, but I wouldn't touch it. I also have Glossy weight at 0

     

     

    Post edited by Oso3D on
  • nDelphinDelphi Posts: 1,920
    Bejaymac said:

    Sorry to get a little off topic, but what do you mean exactly? I rendered a scene using iray yesterday using my normal shaders I've always used for 3Dlight (I think human uber skin or something and the default shaders for the furniture / walls).

    The default surface shader and I think AOA's SSS shader have been "reworked" to work in both 3DL and Iray, but things like USS and HSS are pure Renderman Shader Language and wont work in Iray as it uses a different language.

    I didn't know about this. But, overall, I will never use a non iRay shader or material with iRay. Not unless I am willing to bog down the rendering.

    What I meant, is that all these scenes, like the underwater scenes have been designed for 3Delight. The techniques used to mimic caustics in a biased render engine, for example, are never going to yield results in an unbiased render engine.

    Just like techniques or even the thought to hide shadows or stop an object from casting shadows doesn't belong in a render engine designed with real life lighting in mind.

  • Testing6790Testing6790 Posts: 1,091

    Delphi are you saying that iray shaders will increase the render speeds? I've been trying to figure out how to take less than 10 minutes to get to 1% convergance in one of my current scenes, using all old shaders.

  • mjc1016mjc1016 Posts: 15,001

    Delphi are you saying that iray shaders will increase the render speeds? I've been trying to figure out how to take less than 10 minutes to get to 1% convergance in one of my current scenes, using all old shaders.

     No...applying the actual Iray materials to every item in a scene will REDUCE render times.  It's when Iray has to 'autoconvert' or deal with non-Iray materials that render times can (and very often do) spike to the astronomical...

  • WilmapWilmap Posts: 2,917

    I've given up trying to do an underwater scene in Iray.  I just don't understand what you are all talking about.

    Thanks for the help.

  • nDelphinDelphi Posts: 1,920
    Wilmap said:

    I've given up trying to do an underwater scene in Iray.  I just don't understand what you are all talking about.

    Thanks for the help.

    Sorry, Wendy. timmins.william is the only one who pretty much showed and explained what he did. You will have to study the shader parameters if you don't understand his explanations.

    Maybe he can post again with detailed step by step instructions. I pretty much understand what he did and can mimic it.

  • Testing6790Testing6790 Posts: 1,091
    edited July 2015
    mjc1016 said:

    Delphi are you saying that iray shaders will increase the render speeds? I've been trying to figure out how to take less than 10 minutes to get to 1% convergance in one of my current scenes, using all old shaders.

     No...applying the actual Iray materials to every item in a scene will REDUCE render times.  It's when Iray has to 'autoconvert' or deal with non-Iray materials that render times can (and very often do) spike to the astronomical...

    I think you may have misread me! Increasing render speeds == reducing render times. Thanks for the answer though! I have a very basic render that takes two hours to filly converge that only takes ~10 minutes in 3Delight. Probably the reason.

    Post edited by Testing6790 on
  • mjc1016mjc1016 Posts: 15,001
    mjc1016 said:

    Delphi are you saying that iray shaders will increase the render speeds? I've been trying to figure out how to take less than 10 minutes to get to 1% convergance in one of my current scenes, using all old shaders.

     No...applying the actual Iray materials to every item in a scene will REDUCE render times.  It's when Iray has to 'autoconvert' or deal with non-Iray materials that render times can (and very often do) spike to the astronomical...

    I think you may have misread me! Increasing render speeds == reducing render times. Thanks for the answer though! I have a very basic render that takes two hours to filly converge that only takes ~10 minutes in 3Delight. Probably the reason.

    Yep...read 'time' instead of speed... blush

     

    So, that 'no' should be 'yes'...

    And the rest is still true.  wink

  • bytescapesbytescapes Posts: 1,905

    OK, my hat is off to timmins.william. Getting underwater scenes to look even halfway convincing requires a substantial amount of trial and error.

    Using the tips provided, I've been able to create my own scene (see below: there's lots of noise in the attached image, because this stuff drives render times way, way up, so I didn't render to completion).

    It contains a single large cylinder: about 20m high, by 20m in diameter. To set the shaders for the cylinder, I first applied the Iray Water shader. I then tweaked the settings, using the guidelines given by timmins.william.

    The parameters that I set (the 'Currently Used' subset) are as follows:

    Base Color: 0.50 0.50 0.50

    Translucency Weight: 0.75

    Base Color Effect: Scatter & Transmit

    Glossy Layered Weight: 0.00

    Glossy Color Effect: Scatter & Transmit

    Glossy Reflectivity: 0.00

    Refraction Index: 1.00

    Refraction Weight: 1.00

    Thin Walled: Off

    Transmitted Measurement Distance: 300.00

    Transmitted Color: 0.74 0.98 0.83

    Scattering Measurement Distance: 15.00

    SSS Amount: 0.0080

    SSS Direction: 0.50

    Angle: 90.00

    I believe that applying those numbers to a cylinder to which the Water preset has been applied will get you some of the way there. My water is greenish, by the way, whereas timmins.william's was blue. 

    Next, the lighting. I have the lighting set to Scene Only (on the Render settings panel, set Environment:Environment Mode to Scene Only). My light comes from a single spotlight that is actually immersed near the top of the water cylinder. For reasons I have not yet understood, I always have to crank the Luminous Flux for scene lights way up above the default 1500.00 lumens that DAZ seems to think is adequate. Officially, 1500 lumens is about the output of a 23W compact fluorescent. In DAZ Iray world, 1500.00 lumens seems to correspond to about the amount of light you'd expect to get from a particularly feeble glow worm feeling exhausted at the end of a hard day doing glow worm stuff. Usually I end up turning up the lumens for scene lights to a few hundred thousand lumens. To punch through my soupy water, I needed to turn the spotlight up to 20000000.0 lumens. Shome mishtake, shurely?

    Finally, to get those nice light and dark patterns in the water, I had to put a gel in front of the spotlight. 

    I used Photoshop to draw a white square, then used the brush tool to create it with lots of black circles (some of which had white circles inside them). I saved this as a PNG. I then made a plane primitive object in the scene, and then edited the plane's Iray shader. I clicked the little rectangle on the right of Opacity:Opacity Strength control to bring up a menu of available maps, chose 'Browse ...' and selected my newly-created PNG. I also set the Opacity Strength slider to about 75%.

    I then positioned the plane a little way in front of my spotlight. To get the positioning right, it's very helpful to use the Spotlight as a camera, i.e. from the views menu at the top right of the Viewport pane, choose 'Spotlight 1', and then move stuff around so that the gel pane is filling the view, and you can see whatever it is that you want to illuminate through the holes in your gel.

    You might get better results by moving the gel closer to the spotlight, changing the size of the spotlight etc. My rays come out almost parallel, and I think things might look better if you could get them to spread out a bit. Not entirely sure how to do that, though.

    I've attached a scene file which might be helpful to anyone who wants to play around with this stuff.

    Gel06-01.png
    1600 x 1600 - 534K
    duf
    duf
    IrayWaterTest03-01.duf
    30K
    Iray Water Test 02-01.png
    720 x 540 - 769K
  • bytescapesbytescapes Posts: 1,905

    Correction: please use this .duf file, not the one in the comment above. The other one contained a reference to a figure that you may not have, so it may not load in your DAZ Studio. This one contains only primitives, so I think it should work for everyone.

    duf
    duf
    IrayWaterTest03-02.duf
    28K
  • nDelphinDelphi Posts: 1,920

    Correction: please use this .duf file, not the one in the comment above. The other one contained a reference to a figure that you may not have, so it may not load in your DAZ Studio. This one contains only primitives, so I think it should work for everyone.

    Cool beans, bytescapes.

    A tip, instead of using huge numbers for lumens use the kcd/m^2 scale instead.

  • Oso3DOso3D Posts: 15,085

    Thanks for the gel texture. I've used various ripple patterns which haven't been as good as I'd hoped.

     

    Also, if the lighting seems inadequate, reminder you may want to go into Tone Mapping and boost Film ISO to 800 or so. I find that's a good starting point for most images.

     

  • bytescapesbytescapes Posts: 1,905

    Also, if the lighting seems inadequate, reminder you may want to go into Tone Mapping and boost Film ISO to 800 or so. I find that's a good starting point for most images.

    D'oh. I am a photographer (of sorts). I should have thought of that. Thank you.

    Does using higher ISOs cause any noticeable increase in noise in the image (as it would with a real-world digital camera)? Or does Iray assume a perfect image sensor that responds the same at all values for ISO?

  • Oso3DOso3D Posts: 15,085
    It assumes perfection. I think the reason they have shutter speed and ISO is to make it easier to replicate the values of desired photo set ups. As for noise, I think you'd need to add it in post or limit samples. I've had some images come out grainy, generally with low light levels. Not entirely sure how to replicate it
  • MariaTortilliaMariaTortillia Posts: 47
    edited April 2016

    yep thanks for that gel gobo texture, works much better than lots i have tried or made so far, I used the file above (thanks bytescapes ) and added my own subject matter and camera view, In the 2nd image I repaced the spotlight with  a projector light from Colm Jackson's render studio and used a water surface caustic map (8mb zip) as the gobo texture

    full size images here  (warning my deviant art page contains nudity)

     

     

    Post edited by MariaTortillia on
Sign In or Register to comment.