3Delight Laboratory Thread: tips, questions, experiments

15051535556100

Comments

  • I was talking to Zarcon in his thread about AoA Subsurface performance, and so I did some tests which showed that Shader Mixer will set the "shader" hitmode for diffuse and transmission rays on any surface where you plugged _any_ brick into opacity. Must be one of the reasons why shader mixer networks tend to be slower to render.

    Then there are cases when people unknowingly force the "shader" hitmode on their whole model: everyone has the "Shaded Haven" set now that it's a freebie. Ever noticed the wall with the fountain actually uses a transmap to make the water transparent? A whole wall runs the "shader" hitmode for the sake of a single poly representing water. It can be assigned to a new material with the geometry editor tool easily, and then you can take the transmap out.

  • LinwellyLinwelly Posts: 5,795
    edited February 2016
    wowie said:

    Double click on the parameter's name to bring up the 'Parameter Settings' dialog. You can change it there (min/max/default values etc). The surface brick can be found  in Bricks - Roots.

     

    ... the places they are hiding this stuff... ok I tried to follow your steps here but it seems I still got a different result (I'm using 4.8) here is a screenshot with the shader mixer screen including previews and a spot render in my "micro Lab settings (two planes in DAZ material, UE on 50% with occlusional soft shadows and a spot light on 100%). I see something of that fresnel effect but not really that much.

    http://www.daz3d.com/forums/uploads/FileUpload/fa/addb2b191f9e6ce01f090d4b091920.jpg

    shadermixer.jpg
    1920 x 1032 - 558K
    Post edited by Linwelly on
  • wowiewowie Posts: 2,029
    Linwelly said:

    ... the places they are hiding this stuff... ok I tried to follow your steps here but it seems I still got a different result (I'm using 4.8) here is a screenshot with the shader mixer screen including previews and a spot render in my "micro Lab settings (two planes in DAZ material, UE on 50% with occlusional soft shadows and a spot light on 100%). I see something of that fresnel effect but not really that much.

    Hmm, maybe something is changed in 4.8 and onwards. I'm assuming the surface specular color is pure white (255,255,255). I haven't got 4.8 so maybe those who do can test it out.

  • LinwellyLinwelly Posts: 5,795
    edited February 2016
    wowie said:
    Linwelly said:

    ... the places they are hiding this stuff... ok I tried to follow your steps here but it seems I still got a different result (I'm using 4.8) here is a screenshot with the shader mixer screen including previews and a spot render in my "micro Lab settings (two planes in DAZ material, UE on 50% with occlusional soft shadows and a spot light on 100%). I see something of that fresnel effect but not really that much.

    Hmm, maybe something is changed in 4.8 and onwards. I'm assuming the surface specular color is pure white (255,255,255). I haven't got 4.8 so maybe those who do can test it out.

    That is something I have to go and check, could be its grey now, Thanks!

    Edit: the specular colour of DAZ standart material in 4.8 is grey: 153/153/153.  My experiments in dabbling around further in the shader mixer resulted in me creating a black hole... I'm epic. I guess it will take some more time, trying  and reading before I will manage something worthwhile, but at least I learned about the existance of the shader mixer and shader builder

    Post edited by Linwelly on
  • wowiewowie Posts: 2,029
    Linwelly said:

    That is something I have to go and check, could be its grey now, Thanks!

    Edit: the specular colour of DAZ standart material in 4.8 is grey: 153/153/153.  My experiments in dabbling around further in the shader mixer resulted in me creating a black hole... I'm epic. I guess it will take some more time, trying  and reading before I will manage something worthwhile, but at least I learned about the existance of the shader mixer and shader builder

    Ah. Thought it was something like that.

    Generally, I setup my specular to be as close to pure white as possible. Mainly because most specular textures available are very dark and made in the wrong manner. Having it close to pure white means once fresnel strength weakens, the specular (and reflection too if setup the same way) will rise very sharply.

  • LinwellyLinwelly Posts: 5,795
    wowie said:
    Linwelly said:

    That is something I have to go and check, could be its grey now, Thanks!

    Edit: the specular colour of DAZ standart material in 4.8 is grey: 153/153/153.  My experiments in dabbling around further in the shader mixer resulted in me creating a black hole... I'm epic. I guess it will take some more time, trying  and reading before I will manage something worthwhile, but at least I learned about the existance of the shader mixer and shader builder

    Ah. Thought it was something like that.

    Generally, I setup my specular to be as close to pure white as possible. Mainly because most specular textures available are very dark and made in the wrong manner. Having it close to pure white means once fresnel strength weakens, the specular (and reflection too if setup the same way) will rise very sharply.

    Looking back on what I do with shaders available from the content library I often change them to a white tone as well just from the impression that it doesn't make sense to me in another colour. Well its good to find reason to a gut feeling.

  • Oso3DOso3D Posts: 14,888

    So I'm curious about experimenting with translating stuff from Iray to 3Delight, particularly Mec4D's metals and such.

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    While Ubersurface has a fresnel, the values are Strength, Falloff, and Sharpness. Do any of those correspond to IOR at all?

     

  • algovincianalgovincian Posts: 2,576

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    I thought that the whole idea of IRay was that it was physically based materials? Pretty sure nothing has IOR values in those ranges. 

    - Greg

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,412
    edited March 2016

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    I thought that the whole idea of IRay was that it was physically based materials? Pretty sure nothing has IOR values in those ranges. 

    - Greg

    lol. Possibly a black hole event horizon, lol. I may need to check again, tho I think "Index Of Refraction" has to do with the angle that light is bent as it passes threw a surface, tho seeing numbers above 3.14 appears to fly in the face of what IOR is.

    IOR_Wikipedia_001.png
    164 x 18 - 705B
    Post edited by ZarconDeeGrissom on
  • Oso3DOso3D Posts: 14,888

    I can't make heads or tails of it, but there are a lot of papers suggesting a role of Fresnel's equations for reflection of metals and so on.

    Seems my best bet is liberal use of Reflection.

     

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,412
    edited March 2016

    I can't make heads or tails of it, but there are a lot of papers suggesting a role of Fresnel's equations for reflection of metals and so on.

    Seems my best bet is liberal use of Reflection.

    yea. Fresnel, not IOR. Metals are only transparent if there a few atoms thick, or on Star Trek. lol.

    http://en.wikipedia.org/wiki/Refractive_index

    As much as I have looked, I have never seen IOR listed for a telescope mirror, only lenses.

    Post edited by ZarconDeeGrissom on
  • algovincianalgovincian Posts: 2,576

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    I thought that the whole idea of IRay was that it was physically based materials? Pretty sure nothing has IOR values in those ranges. 

    - Greg

    lol. Possibly a black hole event horizon, lol. I may need to check again, tho I think "Index Of Refraction" has to do with the angle that light is bent as it passes threw a surface, tho seeing numbers above 3.14 appears to fly in the face of what IOR is.

    I understand what refraction is and the calculation - I was simply commenting on the "non physically based" values. There is no cap at 3.14, but I don't believe there are any materials with values in the ranges mentioned.

    - Greg 

  • algovincianalgovincian Posts: 2,576

    I can't make heads or tails of it, but there are a lot of papers suggesting a role of Fresnel's equations for reflection of metals and so on.

    Seems my best bet is liberal use of Reflection.

    In general, the fresnel effect is just a way of describing the fact that the amount of refection is a function of the viewing angle.

    - Greg

  • Oso3DOso3D Posts: 14,888
    edited March 2016

    So, to capture this in 3DL...

    Reflection + Fresnel On? Fresnel only? Something else?

    Should I be adjusting Fresnel falloff?

    Post edited by Oso3D on
  • mjc1016mjc1016 Posts: 15,001

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    I thought that the whole idea of IRay was that it was physically based materials? Pretty sure nothing has IOR values in those ranges. 

    - Greg

    lol. Possibly a black hole event horizon, lol. I may need to check again, tho I think "Index Of Refraction" has to do with the angle that light is bent as it passes threw a surface, tho seeing numbers above 3.14 appears to fly in the face of what IOR is.

    I understand what refraction is and the calculation - I was simply commenting on the "non physically based" values. There is no cap at 3.14, but I don't believe there are any materials with values in the ranges mentioned.

    - Greg 

    There is if the IOR value ISN'T IOR but rather eta.  Eta = 1/IOR...so those values would be decimal values or below 1, which do fall in line for some metals.

    So, to capture this in 3DL...

    Reflection + Fresnel On? Fresnel only? Something else?

    Should I be adjusting Fresnel falloff?

    And the best way...use something other (but it isn't even in beta yet) than the UberSurface shaders.  You can get decent metals with UberSurface, but they won't be direct translations.  While a phyically plausible shader for 3DL could be....

  • hphoenixhphoenix Posts: 1,335

    For those who aren't clear about it.....

    Fresnel effects are a visual falloff based on the angle between the view direction and the surface normal at the point of intersection with the surface.  Put simply, if you draw a line from your eye (the camera) to the point on the surface, and at that point, draw another line directly away from the surface (orthogonal), you get an angle.  Glancing view (like at the edge of a sphere) will be an angle close to 90°, where as straigh one (like at the center of a sphere) will be close to 0°.

    The Fresnel equation takes that angle, and based on a triganometric function returns a value between 0 and 1.  The characteristic that has the Fresnel effect is multiplied by that (at that point on the surface.)

     

    Think of it like with a cylindrical drinking glass.  When the view ray hits the edges, it actually travels through MORE of the volume of the wall than if it hits near the middle.  Fresnel effects simulate this (for objects which aren't modelled with actual thickness.)

     

  • mjc1016 said:

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    I thought that the whole idea of IRay was that it was physically based materials? Pretty sure nothing has IOR values in those ranges. 

    - Greg

    lol. Possibly a black hole event horizon, lol. I may need to check again, tho I think "Index Of Refraction" has to do with the angle that light is bent as it passes threw a surface, tho seeing numbers above 3.14 appears to fly in the face of what IOR is.

    I understand what refraction is and the calculation - I was simply commenting on the "non physically based" values. There is no cap at 3.14, but I don't believe there are any materials with values in the ranges mentioned.

    - Greg 

    There is if the IOR value ISN'T IOR but rather eta.  Eta = 1/IOR...so those values would be decimal values or below 1, which do fall in line for some metals.

    I don't know, the "Wave Impedance" (resistance, or Greek letter 'Eta') of metals is rather low. like as in the resistant of the metal electrically. That still works out to numbers below one. it would not be ten or a hundred.

    The only thing that would present light with an impossibly high resistance, would be for light trying to leave a black hole.

  • wowiewowie Posts: 2,029
    edited March 2016

    So I'm curious about experimenting with translating stuff from Iray to 3Delight, particularly Mec4D's metals and such.

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    While Ubersurface has a fresnel, the values are Strength, Falloff, and Sharpness. Do any of those correspond to IOR at all?

    UberSurface fresnel is a custom ramp fresnel. It's actually pretty easy to work with once you understand what the parameters are.

    Fresnel strength should be the most obvious. This determines how much the specular or reflection is taken out when the surface is viewed directly. The technical term is F0, basically reflectance at 0 degrees. So if you set your specular strength to 100%, a fresnel strength of 50% means when you view the surface using that material head on, you'll only be seeing 50% of that specular value.

    Falloff and sharpness are basically parameters that controls the fresnel curve. In IOR based fresnel, this is determined by the IOR value (with the addition of the k coefficient in metals since it has complex IOR). To translate IOR based fresnel into custom curve fresnel, the first thing you need is the Brewster angle. Thankfully, http://refractiveindex.info/ has those values. Most dieletrics falls between  56 to 59, while metals tends to vary more between 70 to 80 degrees.

    OK, now the more interesting part. How do you input the Brewster angle into the shader with a custom Fresnel curve? The answer is you don't. You basically need to eyeball it. Thankfully, with IPR this is pretty easy. All you need is a cylinder, a plane and an environment ball. You can see the setup here:

    Setup the camera at default values (0 angle) and move it back so you can see the cylinder through it.  Now go to IPR and change the fresnel parameters on the fly.

    Basically, you adjust fresnel parameters on the cylinder's surface to match the angle of the plane. The plane is parented to a distant light that's setup at the world's center. So by changing the distant light's angle, you change the angle of the plane. Setup the cylinder to have 100% reflection with a fresnel strength of 100%. Then just setup your environment ball. In the renders below, I've angled the distant light at 70 degrees. Raising only falloff can't quite match the angle of plane. So i reset the falloff back to the default value (2) and raise sharpness until I hit the plane's angle. The Fresnel sharpness value was 35% for Fresnel Falloff of 2

    Not the most scientific approach to the problem, but it works quite well. laugh

    Once you have the angle, you just need to figure out the reflectance values. Those can also be found in the RefractiveIndex.info database. Say for copper, the non-polarized reflectance value, is 71%. So, set up your reflection and specular at 100% and fresnel strength at 29%.

    Fresnel Test.png
    1920 x 1160 - 128K
    Fresnel Test 1.jpg
    823 x 1070 - 37K
    Fresnel Test 2.jpg
    823 x 1070 - 50K
    Fresnel Test 3.jpg
    823 x 1070 - 38K
    Post edited by wowie on
  • mjc1016mjc1016 Posts: 15,001
    mjc1016 said:

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    I thought that the whole idea of IRay was that it was physically based materials? Pretty sure nothing has IOR values in those ranges. 

    - Greg

    lol. Possibly a black hole event horizon, lol. I may need to check again, tho I think "Index Of Refraction" has to do with the angle that light is bent as it passes threw a surface, tho seeing numbers above 3.14 appears to fly in the face of what IOR is.

    I understand what refraction is and the calculation - I was simply commenting on the "non physically based" values. There is no cap at 3.14, but I don't believe there are any materials with values in the ranges mentioned.

    - Greg 

    There is if the IOR value ISN'T IOR but rather eta.  Eta = 1/IOR...so those values would be decimal values or below 1, which do fall in line for some metals.

    I don't know, the "Wave Impedance" (resistance, or Greek letter 'Eta') of metals is rather low. like as in the resistant of the metal electrically. That still works out to numbers below one. it would not be ten or a hundred.

    The only thing that would present light with an impossibly high resistance, would be for light trying to leave a black hole.

    Different things...same name, unfortunately.  It's basically just the inverse of IOR...useful for constructing shaders.

  • Oso3DOso3D Posts: 14,888

  • Oso3DOso3D Posts: 14,888

    Um. So are those values worked out per surface, per substance (IE: once you work out Nickel's values, that's that), or what?

    What does the angle of the plane correspond to?

     

  • mjc1016mjc1016 Posts: 15,001

    Um. So are those values worked out per surface, per substance (IE: once you work out Nickel's values, that's that), or what?

    What does the angle of the plane correspond to?

     

    Per substance...

     

  • Oso3DOso3D Posts: 14,888

    So, you angle the plane to the Brewster's angle and change fresnel strength until the plane and cylinder match?

    (I'm a little confused, also, because the values used in the example don't match anything from the Refractiveindex. Like 70 degrees or 'non-polarized reflectance value, is 71%', which doesn't match anything in the entry for copper...)

     

  • mjc1016mjc1016 Posts: 15,001

    So, you angle the plane to the Brewster's angle and change fresnel strength until the plane and cylinder match?

    (I'm a little confused, also, because the values used in the example don't match anything from the Refractiveindex. Like 70 degrees or 'non-polarized reflectance value, is 71%', which doesn't match anything in the entry for copper...)

     

    No, they don't...the whole Fresnel in US/US2 is not really physically based...it's more like an artistic interpretation.  So, yeah, you 'eyeball' it...

  • Oso3DOso3D Posts: 14,888

    Thanks for the tips. Whether or not I use this to specifically nail down a particular metal, this DOES give me some clue as to how to play with metals in 3DL in a more realistic way; I can make a particular metallic look without worrying about what it 'really' is. ;)

     

  • mjc1016mjc1016 Posts: 15,001

    There are other shaders that do more realistic metals based on physical properties...but none of them are in Studio (yet...Kettu's got a metal, but it's still in alpha). 

  • Thanks for the tips. Whether or not I use this to specifically nail down a particular metal, this DOES give me some clue as to how to play with metals in 3DL in a more realistic way; I can make a particular metallic look without worrying about what it 'really' is. ;)

    A touch of yellow tinted diffuse, and a tad bit of reflection, instant gold. A tad bit of orange diffuse with some reflection can be copper or brass, etc. You want it a tad closer, do some "color picking" of stuff (take a photo, and look at the RGB values of some pixels), and you will still need to "eye ball it".

    So Yea, because the math and lingo can be far to complicated for many of us that have a basic understanding of English, and no clue why the shader has some odd labels on some things, lol.

  • ZarconDeeGrissomZarconDeeGrissom Posts: 5,412
    edited March 2016
    mjc1016 said:
    mjc1016 said:

    Most of the metals are driven by fresnel, and in particular by high IOR values, like 12, 100, etc.

    I thought that the whole idea of IRay was that it was physically based materials? Pretty sure nothing has IOR values in those ranges. 

    - Greg

    lol. Possibly a black hole event horizon, lol. I may need to check again, tho I think "Index Of Refraction" has to do with the angle that light is bent as it passes threw a surface, tho seeing numbers above 3.14 appears to fly in the face of what IOR is.

    I understand what refraction is and the calculation - I was simply commenting on the "non physically based" values. There is no cap at 3.14, but I don't believe there are any materials with values in the ranges mentioned.

    - Greg 

    There is if the IOR value ISN'T IOR but rather eta.  Eta = 1/IOR...so those values would be decimal values or below 1, which do fall in line for some metals.

    I don't know, the "Wave Impedance" (resistance, or Greek letter 'Eta') of metals is rather low. like as in the resistant of the metal electrically. That still works out to numbers below one. it would not be ten or a hundred.

    The only thing that would present light with an impossibly high resistance, would be for light trying to leave a black hole.

    Different things...same name, unfortunately.  It's basically just the inverse of IOR...useful for constructing shaders.

    (Me as well)

    Let me try to explain what your saying, and how I'm not exactly understanding it. To make a polished metal surface, I must use the "Index of refraction" setting. Refraction is what happens when light is bent by something transparent. A polished metal surface is not exactly transparent, and as such, dose not 'Refract' light (going threw it !?), lol. In fact, the only opaque thing in the universe that actually refracts light, is a black hole, lol.

    Now, what part of that "Electron Voodoo" shader lingo am I not understanding???

    Post edited by ZarconDeeGrissom on
  • Oso3DOso3D Posts: 14,888

    After some noodling, it occurs to me that, at basic level, I can simply copy diffuse -> reflection, shut off diffuse (which UberSurface makes easy), and tweak reflection blur to taste and get a pretty decent metal.

    It might not be as 'accurate' as fresnel, but hey.

     

Sign In or Register to comment.