Tips & Tricks for Iray for newbies......

1202123252641

Comments

  • SzarkSzark Posts: 10,634
    edited December 1969

    K T Ong said:
    One thing I'd really like to know about iray: how do you render human figures (say good old Genesis) so they'll look like they're gleaming all over with grease or sweat -- you know, with high specularity? I tried playing with the 'top coat' settings, thinking it refers to the simulation of a thin layer of liquid covering the skin. No good. I know it can be done -- I've seen at least one example. But how is it done? What are the settings? Any advice will be appreciated, thanks!
    there is a whole thread on this topic http://www.daz3d.com/forums/discussion/54239/
  • stem_athomestem_athome Posts: 516
    edited June 2015

    2nd pic, this time large cube using shader with Absorption.

    Interesting, but more detail is needed; where are you getting that absorption feature from? I don't see a surface parameter for that anywhere once I've applied the water shader. Which shader are you applying to the water cube, and how are you modifying it?

    I used the "Iray > uber > Architectural", then changed as needed.

    The settings I changed for that example.
    Diffuse:
    Color 0.26 0.26 0.26
    Diffuse weight 0.7
    Reflection
    Reflectivity 0.07
    Glossiness 0.52
    Refraction
    Index of refraction 1.19
    Transparency 0.9
    Refraction Glossiness 0.85
    Absorption
    Enable Absorption: On
    Absorption Depth 350 (Note: This setting works by:- lower the number, the quicker light is absorbed)


    I then added a simple bump map.

    Post edited by stem_athome on
  • SnowSultanSnowSultan Posts: 3,507
    edited December 1969

    I’d heard that enclosed environments actually slowed things down. Do skydomes really only lag because of their big textures, then?

    Oh I wasn't using a skydome in my scene. My main question was more about whether it's better to let light escape somewhere or keep it boxed in to cut down on render time.

  • Digital TouchDigital Touch Posts: 187
    edited June 2015

    I’d heard that enclosed environments actually slowed things down. Do skydomes really only lag because of their big textures, then?

    Oh I wasn't using a skydome in my scene. My main question was more about whether it's better to let light escape somewhere or keep it boxed in to cut down on render time.

    Enclosed scene makes lights bounce off endlessly on the same area, make them very intense calculation. I guess it's better to let the light naturally escape the scene or render box

    Post edited by Digital Touch on
  • stem_athomestem_athome Posts: 516
    edited December 1969

    Enclosed scene makes lights bounce off endlessly on the same area, make them very intense calculation. I guess it's better to let the light naturally escape the scene or render box

    An hard_coded sky_dome should not reflect light_rays. (Has anyone checked/tested?)

    If you have a dome that you have loaded, then lower the "Max Path Length" so paths terminate quicker.
    If materials are set correctly, it should not be a problem (paths should terminate when reflected light becomes very low)

  • K T OngK T Ong Posts: 483
    edited December 1969

    Szark said:
    K T Ong said:
    One thing I'd really like to know about iray: how do you render human figures (say good old Genesis) so they'll look like they're gleaming all over with grease or sweat -- you know, with high specularity? I tried playing with the 'top coat' settings, thinking it refers to the simulation of a thin layer of liquid covering the skin. No good. I know it can be done -- I've seen at least one example. But how is it done? What are the settings? Any advice will be appreciated, thanks!
    there is a whole thread on this topic http://www.daz3d.com/forums/discussion/54239/

    Thanks for the info, mate! Will check this out! ;-)

  • SzarkSzark Posts: 10,634
    edited December 1969

    My pleasure. It's a bit of a long read but some good info there.

  • Digital TouchDigital Touch Posts: 187
    edited December 1969

    Enclosed scene makes lights bounce off endlessly on the same area, make them very intense calculation. I guess it's better to let the light naturally escape the scene or render box

    An hard_coded sky_dome should not reflect light_rays. (Has anyone checked/tested?)

    If you have a dome that you have loaded, then lower the "Max Path Length" so paths terminate quicker.
    If materials are set correctly, it should not be a problem (paths should terminate when reflected light becomes very low)

    No, she or he was asking about blocking light with primitive mesh like plane or walls.

  • SzarkSzark Posts: 10,634
    edited December 1969

    well I think I have answered my own q about gloss colour. There is no difference in say setting gloss weight to 1.00 with a darkish grey colour than setting weight to say 0.10 and using white. As for Top Coat colour I haven't tested that yet. But if you set the top coat thin film to a thickness of 100 and higher and keep the colour white you can get some funky colours coming through. In my case various shades of purple depending the thickness so I am not sure why that is happening.

  • SzarkSzark Posts: 10,634
    edited December 1969

    Top Coat Thin Film: As I said above if I set the thickness to 100 - 1000 I get some weird colours but if I set it to 100000 I get the gloss colour back to white. So I tried a wax type of colour and got a nice muted wax gloss finish. So what I don't understand is why am I getting some colour change when the thin film is thinner. I know this is in nanometres but I can't work out why the colour shift.

  • SpottedKittySpottedKitty Posts: 7,232
    edited December 1969

    Szark said:
    But if you set the top coat thin film to a thickness of 100 and higher and keep the colour white you can get some funky colours coming through. In my case various shades of purple depending the thickness so I am not sure why that is happening.

    I think you might be seeing some kind of interference effect where the thin film is a simple multiple of the simluated wavelength of part of the simulated light bouncing off the object. Think of the difference in appearance of a piece of shiny metal when it's clean, and when it's covered in greasy fingerprints.
  • eiliestleiliestl Posts: 100
    edited December 1969

    What is the best way to reduce noise in iray renders? Just rendered this 100% completed yet so unclear...

    Test_shot3_sized.png
    500 x 500 - 458K
  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    eiliestl said:
    What is the best way to reduce noise in iray renders? Just rendered this 100% completed yet so unclear...

    What was the limit that got you to 100%...convergence? time?

    Also, is that the only light source?

    What is the scene comprised of...are the floor and back wall just two planes or are they parts of a cube?

    What about materials...is EVERYTHING set to Iray materials?

  • eiliestleiliestl Posts: 100
    edited June 2015

    mjc1016 said:
    eiliestl said:
    What is the best way to reduce noise in iray renders? Just rendered this 100% completed yet so unclear...

    What was the limit that got you to 100%...convergence? time?

    Also, is that the only light source?

    What is the scene comprised of...are the floor and back wall just two planes or are they parts of a cube?

    What about materials...is EVERYTHING set to Iray materials?

    Aside from the dress ,everything is set to Iray materials.
    I have 3 light sources.Two planes and the cube.
    Left my house while it was rendering . Convergence is unknown . Rendering it a 2nd time right now.
    Right now the Iray message while it's rendering is : Render target canvas was written ..

    Post edited by eiliestl on
  • SickleYieldSickleYield Posts: 7,629
    edited December 1969

    Set the convergence to 100%. That's often the limiting factor if you left it at default 7200 secs (2 hours) but it stops sooner and doesn't look "done."

  • SpottedKittySpottedKitty Posts: 7,232
    edited June 2015

    Set the convergence to 100%. That's often the limiting factor if you left it at default 7200 secs (2 hours) but it stops sooner and doesn't look "done."

    Anyone else having weird problems with this? I've been rendering a bunch of quick figure-only test scenes tonight, and I think every one ran straight past 95% convergence even though that's the (default) Render Settings value. I suspect it's happened in more complex scenes as well, although so far I think they've mostly timed out before either of the other limits were hit.
    Post edited by SpottedKitty on
  • eiliestleiliestl Posts: 100
    edited December 1969

    Convergence at 100% . Rendered to 7% and timed out after 1 hour and 45 min. Still not that clear. What more can I do?

    Test_shot4_sized.png
    750 x 750 - 910K
  • zaz777zaz777 Posts: 115
    edited June 2015

    Szark said:
    well I think I have answered my own q about gloss colour. There is no difference in say setting gloss weight to 1.00 with a darkish grey colour than setting weight to say 0.10 and using white. As for Top Coat colour I haven't tested that yet. But if you set the top coat thin film to a thickness of 100 and higher and keep the colour white you can get some funky colours coming through. In my case various shades of purple depending the thickness so I am not sure why that is happening.

    I'm glad someone else noticed this as I had come to that conclusion as well, but hadn't quite finished playing with it.

    Along those lines, I'm also thinking that what is really happening here is that the actually glossy component is the result of multiplying Glossy Layered Weight x Glossy Color x Glossy Reflectivity, although I expect the Glossy Reflectivity part is a bit more complicated, i.e. probably not linear. Part of the reason I think this is because of a reference I found, since taken down, that used the IOR of a material to create what they called F0/minreflectance/specular-color. and DAZ's documentation for the Iray Uber Shader.

    The equations used on the page for the Specular Cheat Sheet I found were the following:

    
    F0 (linear) = (1-IOR)^2 / (1+IOR)^2
    
    - or -
    
    F0 (sRGB) = ((((1-IOR)^2 / (1+IOR)^2)^(1/2.2)) x 255)
    

    One example value they had was for plastic and they gave it an IOR of 1.46 which generates an sRGB of 56/56/56. Skin IOR varied from 1.41 (low reflectance) to 1.49 (high reflectance) with sRGB values of 51/51/51 and 58/58/58 respectively.

    That correlates with the limited documentation we have from DAZ on the IRAY Uber Shader where they say:

    Glossy Reflectivity - The default setting is 0.50 and should generally be left here in most cases. This property roughly correlates to IOR and the settings of that property. The value is roughly the same as the IOR setting of 1.5, which is a good plastic base.

    They also recommend, directly above what I quoted, that Glossy Layered Weight should normally be 1.0 and Glossy Color should normally be white (sRGB 255/255/255).

    So, if we are to believe the documentation we have, for a plastic material we should set Glossy Layered Weight to 1.0, Glossy Color to 255/255/255 and leave Glossy Reflectivity at its default of 0.50. That means, in a PBR world, that those settings should be equivalent to setting the Glossy/Reflective color to 56/56/56 for a different renderer or shader. The 56/56/56 value is also about in the middle of the range of skin according to that page and other references I've seen.

    It would make perfect sense for the Iray Uber Shader to come with defaults that are close to values for things that might be rendered, like skin and plastic and the other materials whose IORs fall near those. At this point I'm leaning towards setting Glossy Layered Weight and Glossy Reflectivity to 1.0 and using Glossy Color as the only input for the actual strength of the glossy layer or following the documentation's recommendation of leaving Glossy Layered Weight at 1.0 and Glossy Color at white, then using only Glossy Reflectivity as the determining factor for the strength.

    I'm not sure what the Glossy Reflectivity value actually is. It might have something to do with a normal, but I think the actual information is buried in some DAZ code somewhere as the uses for Glossy Reflectivity I find in irayubermaterial.mdl don't seem to directly correspond to anything that is obviously of NVIDIA origin. Without knowing what the value really means, its hard to make a decision as to which way is best.

    At this point, I'm beginning to think that DAZ went a bit overboard on the complexity of the Iray Uber Shader. One other thing I saw in looking at the MDL is that there are two pairs of numbers that are both used to compute coefficients, rather than have us directly enter them. This is giving us the illusion of having more control than we have, as the inputs aren't actually independent.

    One component of an IRAY material is the material_volume. It can be either the vdf() or the anisotropic_vdf() VDF (Volume Distribution Function). Both VDFs require an absorption_coefficient and a scattering_coefficient. Those coefficients are computed as follows in the irayubermaterial.mdl file:

    
    absorption_coefficient = log(Transmitted Color) / (-1.0 * Transmitted Measurement Distance)
    
    - and -
    
    scattering_coefficient = SSS Amount / SSS Measurement Distance
    

    According to the MDL_spec_1.2.2_28Apr2015.pdf, on page 63, the coefficients are specifying The probability density (per meter in world space) of light being absorbed/scattered by the participating medium. This isn't really a problem, but it is misleading as you aren't actually specifying distances, a color and an amount as many combinations of them will create the same result.

    For example, setting SSS Amount and SSS Measurement Distance to the same value, any same value, will give you the most sub surface scattering possible. In fact, a few tests I did that purposefully generated a scattering_coefficient much higher than 1.0, say 1,000.00, gave the same results as one equal to 1.0, but took a lot longer to render.

    I didn't run many tests on the absorption_coefficient, but it is easy to prove that many different combinations of colors and distances will result in computing the same coefficient. For example, plastic's IOR of 1.46 computes to a F0(linear) of 0.035 or a F0(sRGB) of 56/56/56. I assume the log() on the color is done in linear space, so given an sRGB color of 56/56/56 yields a log of -1.456.

    If we poke that color, 56/56/56, into our Transmitted Color and set our Transmitted Measurement Distance to 1.456, we'll compute an absorption_coefficient of 1.0, meaning that there is a 100% chance that the light will be absorbed within 1 meter of entering the medium. A different color, 230/230/230, or linear 0.8 would require a much shorter distance of 0.097 to result in a coefficient of 1.0, however it would still mean that there is a 100% chance that the light will be absorbed within 1 meter of entering the medium and the results should be exactly the same as the same Iray VDF is getting exactly the same inputs.

    I'm not 100% sure what these mean at this point, but at minimum, we're not directly modifying the things we think we are, or at least what I thought I was modifying. I suppose it is possible that coefficients out side of the ranges of 0.0 to 1.0, or perhaps -1.0 to 1.0, have some special meaning or give different results, but I haven't observed the different results nor have I seen documentation that alludes to that.

    I expect that as more information is revealed that we'll be making significant changes to how we setup our Iray materials, :).

    EDIT: Added the first Transmitted Measurement Distance value of 1.456 which I omitted originally.

    Post edited by zaz777 on
  • zaz777zaz777 Posts: 115
    edited December 1969

    Szark said:
    Top Coat Thin Film: As I said above if I set the thickness to 100 - 1000 I get some weird colours but if I set it to 100000 I get the gloss colour back to white. So I tried a wax type of colour and got a nice muted wax gloss finish. So what I don't understand is why am I getting some colour change when the thin film is thinner. I know this is in nanometres but I can't work out why the colour shift.

    I don't know for sure, but since I'm logged in, I'll take a stab at an explanation, ;-).

    I expect it has to do with the relationship between the thickness of the top coat and the wavelength of visible light. This higher frequencies of light, i.e. the blues/violets have wavelengths down to about 380 nm (nanometers). The lower frequencies of light, i.e. the reds have wavelengths up to about 750 nm.

    So, if you stay in the range that is close to the wavelengths, you should expect some interaction with the light bouncing around in the top coat. Once your top coat is much thicker, I expect you tend to lose those "weird" colors.

  • stem_athomestem_athome Posts: 516
    edited June 2015

    There is a Shader Mixer brick for (procedural) "Perlin Noise Texture", so have had a quick play.

    The noise can be added to world / object or UV space, with the various control options (Size / Phase / Levels / Threshold / Bands / Distortion)

    The base noise types available in that brick are:-
    Absolute
    Dent
    Marble
    Ridged

    Noise_Ridged.png
    600 x 480 - 345K
    Noise_Marble.png
    600 x 480 - 274K
    Noise_Dent.png
    600 x 480 - 344K
    Noise_Absolute.png
    600 x 480 - 394K
    Post edited by stem_athome on
  • PatroklosPatroklos Posts: 533
    edited December 1969

    It seems odd to me that so many people are mentioning 100% convergence, I can often see little or no difference between 1% and 100%, and rarely any difference between 10% and 100%. Both my eyes and my screen are good.

  • Richard HaseltineRichard Haseltine Posts: 97,074
    edited December 1969

    Set the convergence to 100%. That's often the limiting factor if you left it at default 7200 secs (2 hours) but it stops sooner and doesn't look "done."

    Anyone else having weird problems with this? I've been rendering a bunch of quick figure-only test scenes tonight, and I think every one ran straight past 95% convergence even though that's the (default) Render Settings value. I suspect it's happened in more complex scenes as well, although so far I think they've mostly timed out before either of the other limits were hit.

    I think it keeps going until it would give the next report of convergence - with a rapidly converging render that may end up being well past the numeric limit, with a more complex scene that takes more iterations the overshoot will be much lower.

  • 8eos88eos8 Posts: 170
    edited December 1969

    Thanks for doing all that research, zaz777! It explains why I've been having so much frustration with changing the SSS/Transmitted settings (arrgghhhhhh)

    As for Thin Film, I remember reading somewhere that it's intended for simulating color interference effects from things like an oil slick on top of a puddle of water. So getting "weird colors" from values near the wavelengths of light is actually the expected behavior. I don't think it's meant to be used for anything other than that though (but who knows really, it's hard to find documentation on any of this).

  • PatroklosPatroklos Posts: 533
    edited December 1969

    I think it keeps going until it would give the next report of convergence - with a rapidly converging render that may end up being well past the numeric limit, with a more complex scene that takes more iterations the overshoot will be much lower.

    It seems that way to me, it always goes a little way past the figure set, likely till it would report another convergence figure.

  • stem_athomestem_athome Posts: 516
    edited June 2015

    Deleted,
    Sorry, incorrect reply, my error :(

    Post edited by stem_athome on
  • zaz777zaz777 Posts: 115
    edited December 1969

    8eos8 said:
    Thanks for doing all that research, zaz777! It explains why I've been having so much frustration with changing the SSS/Transmitted settings (arrgghhhhhh)

    You're welcome.

    I actually started looking at the irayubermaterial.mdl file to make sense of the glossy layer stuff. Finding that information about scattering and absorption was a bit of an accident, but made sense of some unexpected things I was seeing regarding them.

  • SpottedKittySpottedKitty Posts: 7,232
    edited December 1969

    Got a weirdness here. I've been trying out various pre-Iray scenery and environment sets to see how well they adapt to Iray lighting; tonight it was the turn of Orestes' Lucifuge's Grave. I turned down the Environment to 25% intensity, converted all the rocks to default Iray shaders, and added Geometry Shells to the glowing rocks so I could preserve the textures underneath. All glows were using Campfire from the Iray Real Light set.

    Anyone know what might be causing the glitching in the rendered glows, as compared to the unrendered Viewport? I've tried everything I can think of — adjusting the Mesh Offset of the shell, adjusting the displacement of the carved rock surface underneath, nothing works. You can see in the unrendered view that the mask I'm using in the Cutout Opacity slot is supposed to show everything, but it isn't.

    Ideas? Suggestions?

    Test-LucifugeV-01.jpg
    1920 x 1040 - 299K
    Test-Lucifuge-01.jpg
    1700 x 1190 - 215K
  • zaz777zaz777 Posts: 115
    edited December 1969

    Ideas? Suggestions?

    If the "glitch" you're referring to is the missing bits of the red runes in the render, I bet that is being caused by displacement maps on the rocks, but not on the geoshells ... or vice versa. Try turning down the displacement strength to zero on both the rocks and their geoshells and if that fixes the problem, you can decide to either remove displacement on one or both, make them the same, change the strengths or whatever else works.

  • SpottedKittySpottedKitty Posts: 7,232
    edited December 1969

    zaz777 said:
    I bet that is being caused by displacement maps on the rocks, but not on the geoshells

    That's it! <headdesk>

    I actually didn't realise I could apply displacement to an Iray glow-enabled surface. I thought the parameters didn't exist — this business of hiding the min/max sliders unless there's a displacement map applied threw me. Also, I didn't have both the rock and the shell using the same SubD value. I copied all the displacement values across to the matching shell materials, and now I've got a nice spooky glow coming up in my latest test render.

  • McGyverMcGyver Posts: 7,005
    edited June 2015

    I'm not familiar with the prop/model you are using so sorry if this info is useless or not appropriate for your needs or the model's set up...
    My guess is you are trying to get the effect of glowing runes written on (not carved into) the surface of the rock?
    If this were some of the other programs that use emissive materials, there would be a channel to plug an "emissive mask" image into.
    A few days ago I was trying to do the same thing, but with a window...
    Here is the solution I arrived at:

    1- You'll need a mask image of what you want to have an emissive glow, sort of like a cut out or transparency mask... If the model does not have it you'll have to make it yourself... Black is no glow, white is glow... I did not try it yet, but in other programs gray scale can be like fall off, say like lava where white would be a bright crack in the black crust and gray the glowing cooler lava around the edges of a flow.
    So far I haven't tried that in Iray, but I have read about that in other programs...

    The mask needs to be plugged into the emissive channel, and emissive color needs to be set to white (that was the part I was messing up, and Richard Haseltine helped me on that)...


    2- Normally you'd have a place to plug in your emissive color map to tell the program what colors you need the glow to be.
    As far as I could tell there is no exact plug labeled for that... But after trying several things I found that plugging in the same image that I was using as the diffuse map into the Luminance channel gave me the effect I was looking for...
    I was attempting to make a simple skyscraper with light shining from the windows, so this may not be the exact process you need for your project, but as far as I could find, it was the only way to get color and texture to glow... Otherwise it was just white.

    This is completely inexpert and possibly wrong, but it worked for me.
    I was not able to find a better way of achieving the effect and as far as I could find, no obvious documentation or tips (there may be but if it's lost in a forty page back and forth meandering thread, I could not locate it)... It's far from perfect and when I have time I'll fine tune it.
    I intend to keep experimenting with this because there are loads of models I've made that I've been wanting to have cool lighting effects attached to, without having to fake it with hidden point lights, spotlights and such.

    If it did not help you, I hope it was of use to someone else.

    If there is a more correct and direct, board certified and mother approved method that anyone is aware of, I'd love to hear about it.
    Really, I not being sarcastic or anything... I mean that... Teach us, please.

    The thread where I worked this out is here: http://www.daz3d.com/forums/discussion/57336/
    But that's if you'd like to get a better idea of what I was doing and see a picture.

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