- Thu Jul 24, 2014 6:36 pm
#382089
Wish
A third layer blending option based on viewing angle
-------------
** Edit - 8/27/14 **
-------------
Abridged Background
Real world "micro-roughness" creates variable, blended reflections that Maxwell doesn't currently handle. Maxwell can make a specific viewing angle look correct, but not all viewing angles with the same material.
Read on for a more in depth discussion and how layer blending by viewing angle should be able to resolve this.
Also, there's a great example of a "micro-roughness" workaround by Eric Nixon:
http://www.maxwellrender.com/forum/view ... 11#p382311
-------------
** End Edit - 8/27/14 **
-------------
---------------------------------------------------------------------------------
Full Background
I've been doing some extensive research into Maxwell's material system in an effort to customize the Reflectance curve, specifically for Specular type reflections.
Mihai's Maxwell version 1 post about the material system is great, and is actually still quite relevant in version 3. Great job Mihai!
http://www.maxwellrender.com/forum/view ... eflectance
Mihai sets the stage by defining the nature of light. Further down the thread, he poses a very interesting question about what defines the difference between diffusely reflected light and specularly reflected light. From what I can tell based on my personal research and experience, the answer is simply whatever tool you're using to render your color information.
The real world doesn't distinguish between diffuse and specular light. It's all just reflected light. In order to mimic this phenomenon in Maxwell, customizing the reflectance curve is essential. Fresnel curves driven exclusively by a single, static Nd value or complex IOR data actually oversimplify the situation by applying them to the entire surface of a perfectly smooth object. They cover a huge range of realistic possibilities, but like all things, in certain situations, it just falls apart.
Theoretical Flaw:
In any given render, if the intended Fresnel effect is supposed to be consistent with the mathematical model (a single fresnel curve driven by a single, static Nd value), then adjusting the roughness value works. However, due to microscopic surface variations in the real world, most objects don't actually follow a Snell driven Fresnel effect based on a single IOR to 100% accuracy. It's close enough to be believable, and qualifies as "physically accurate", but only if certain assumptions are made and only if the surface properties aren't affected by a microscopic variation. Snell's law assumes that the incoming light hitting a surface is an infinitely small vector, and thus isn't spread out over a real world surface. When you aggregate that over a real surface with microscopic variations to observe the Fresnel effect, it doesn't always work as expected. To simulate this with Maxwell's existing shading model, you would have to start introducing extremely high resolution maps for normal bump effects and tweak the anisotropy settings.
Proposed Solution
To avoid getting Maxwell hung up on all the finite, granular, messy details that make up microscopic surface variations, what if we compromise by not totally redoing the existing multi-layered BSDF system, but instead allow another blending option of layers that's driven by viewing angle? It would also need some kind of "overlap by X degrees" setting where the real "blending occurs", otherwise you might end up with unrealistic reflectance shifts that make hard lines in the render. This would use all of the existing functionality of the current material system, but give the artistic freedom to the end user as to where to apply that shading model onto their surfaces.
I've seen other suggestions about making a custom reflectance input and making a fall-off procedural map for use in the roughness parameter, but that would actually disrupt the existing Maxwell material methodology due to the roughness value having an effect on BSDF 0 and 90 degree color blending. Maxwell can already determine viewing angles of surfaces quite efficiently (it has to based on the current BSDF implementation), and even let's you output that info by using the Fresnel channel. Blending layers based on the viewing angle could actually be achieved with minimal disruption to the existing system. This would just be another form of "weighting" layers. You would still have the inefficient result of having to calculate every BSDF in every layer for the entire object and then returning their blended values back to the image buffer, but Maxwell already does that now anyway. Currently, if you have two layers set to "Normal" blending and the top one isn't cut by an alpha channel, the bottom one is never visible, which means that Maxwell calculated the effects of the bottom layer but only really stored the effects of the top layer due to the blending calculations.
Current Problematic Situation
This specifically came to mind as I was trying to create a plastic material with some odd properties. Basically, between 0 and 10 degrees, there are a lot of anisotropic, rough specular reflections (roughness around 50). From 10 to 45 degrees, the surface has almost no specular reflections (roughness 95+). From 45 to 85 degrees, the roughness decreases to around 30 with less anisotropy, but from 85 to 90 degrees, the roughness would be really low, perhaps around 2 or 3 with isotropic reflections.
***
NOTE: I will be happy to send a physical sample of this material to anyone on the NL team that wants to see this first hand. Just PM me with an address and I'll FedEx one to you. If you want several sent to one office, just specify that. I tried taking pictures of it but I couldn't clearly capture what I'm talking about with my iPhone. It's pretty obvious once you hold this and move it around. You can tell it's got some odd reflective properties that are probably just exaggerations of similar effects that happen on nearly every other surface.
***
I have yet to figure out how to achieve this in Maxwell version 3. Since the color (and therefore brightness) of specular reflections are only multiplied by the Nd blended BSDF 0 and 90 degree colors, and turning their clarity up or down is exclusive to the roughness parameter, I can't intentionally position them to different viewing angles with different clarities or intensities. I think the layer blending approach would be easy to understand and hard to mess up because accidentally "over brightening" surfaces by stacking too many additive layers and introducing huge amounts of noise into the render won't get more complicated, or at least won't be much different than it is right now.
Current Work Around
The current work around would be to make as many renders as there are specular reflection variations, and then assemble them back together in post using the fresnel channel's output. I simply don't have the time or resources to do that. My current projects (which are animations) are taking between 2 and 3 days just to render. I'm pretty sure that most of that is due to the use of complex IOR files in my materials. If I could replicate the complex IOR effects with multiple BSDF's in the ranges of viewing angles they occur, I would probably reduce my render times anyway because I could bypass any need to compensate for transmission. This of course would be dependent on the ability to blend layers by viewing angle.
Thanks Next Limit!
A third layer blending option based on viewing angle
-------------
** Edit - 8/27/14 **
-------------
Abridged Background
Real world "micro-roughness" creates variable, blended reflections that Maxwell doesn't currently handle. Maxwell can make a specific viewing angle look correct, but not all viewing angles with the same material.
Read on for a more in depth discussion and how layer blending by viewing angle should be able to resolve this.
Also, there's a great example of a "micro-roughness" workaround by Eric Nixon:
http://www.maxwellrender.com/forum/view ... 11#p382311
-------------
** End Edit - 8/27/14 **
-------------
---------------------------------------------------------------------------------
Full Background
I've been doing some extensive research into Maxwell's material system in an effort to customize the Reflectance curve, specifically for Specular type reflections.
Mihai's Maxwell version 1 post about the material system is great, and is actually still quite relevant in version 3. Great job Mihai!
http://www.maxwellrender.com/forum/view ... eflectance
Mihai sets the stage by defining the nature of light. Further down the thread, he poses a very interesting question about what defines the difference between diffusely reflected light and specularly reflected light. From what I can tell based on my personal research and experience, the answer is simply whatever tool you're using to render your color information.
The real world doesn't distinguish between diffuse and specular light. It's all just reflected light. In order to mimic this phenomenon in Maxwell, customizing the reflectance curve is essential. Fresnel curves driven exclusively by a single, static Nd value or complex IOR data actually oversimplify the situation by applying them to the entire surface of a perfectly smooth object. They cover a huge range of realistic possibilities, but like all things, in certain situations, it just falls apart.
Theoretical Flaw:
In any given render, if the intended Fresnel effect is supposed to be consistent with the mathematical model (a single fresnel curve driven by a single, static Nd value), then adjusting the roughness value works. However, due to microscopic surface variations in the real world, most objects don't actually follow a Snell driven Fresnel effect based on a single IOR to 100% accuracy. It's close enough to be believable, and qualifies as "physically accurate", but only if certain assumptions are made and only if the surface properties aren't affected by a microscopic variation. Snell's law assumes that the incoming light hitting a surface is an infinitely small vector, and thus isn't spread out over a real world surface. When you aggregate that over a real surface with microscopic variations to observe the Fresnel effect, it doesn't always work as expected. To simulate this with Maxwell's existing shading model, you would have to start introducing extremely high resolution maps for normal bump effects and tweak the anisotropy settings.
Proposed Solution
To avoid getting Maxwell hung up on all the finite, granular, messy details that make up microscopic surface variations, what if we compromise by not totally redoing the existing multi-layered BSDF system, but instead allow another blending option of layers that's driven by viewing angle? It would also need some kind of "overlap by X degrees" setting where the real "blending occurs", otherwise you might end up with unrealistic reflectance shifts that make hard lines in the render. This would use all of the existing functionality of the current material system, but give the artistic freedom to the end user as to where to apply that shading model onto their surfaces.
I've seen other suggestions about making a custom reflectance input and making a fall-off procedural map for use in the roughness parameter, but that would actually disrupt the existing Maxwell material methodology due to the roughness value having an effect on BSDF 0 and 90 degree color blending. Maxwell can already determine viewing angles of surfaces quite efficiently (it has to based on the current BSDF implementation), and even let's you output that info by using the Fresnel channel. Blending layers based on the viewing angle could actually be achieved with minimal disruption to the existing system. This would just be another form of "weighting" layers. You would still have the inefficient result of having to calculate every BSDF in every layer for the entire object and then returning their blended values back to the image buffer, but Maxwell already does that now anyway. Currently, if you have two layers set to "Normal" blending and the top one isn't cut by an alpha channel, the bottom one is never visible, which means that Maxwell calculated the effects of the bottom layer but only really stored the effects of the top layer due to the blending calculations.
Current Problematic Situation
This specifically came to mind as I was trying to create a plastic material with some odd properties. Basically, between 0 and 10 degrees, there are a lot of anisotropic, rough specular reflections (roughness around 50). From 10 to 45 degrees, the surface has almost no specular reflections (roughness 95+). From 45 to 85 degrees, the roughness decreases to around 30 with less anisotropy, but from 85 to 90 degrees, the roughness would be really low, perhaps around 2 or 3 with isotropic reflections.
***
NOTE: I will be happy to send a physical sample of this material to anyone on the NL team that wants to see this first hand. Just PM me with an address and I'll FedEx one to you. If you want several sent to one office, just specify that. I tried taking pictures of it but I couldn't clearly capture what I'm talking about with my iPhone. It's pretty obvious once you hold this and move it around. You can tell it's got some odd reflective properties that are probably just exaggerations of similar effects that happen on nearly every other surface.
***
I have yet to figure out how to achieve this in Maxwell version 3. Since the color (and therefore brightness) of specular reflections are only multiplied by the Nd blended BSDF 0 and 90 degree colors, and turning their clarity up or down is exclusive to the roughness parameter, I can't intentionally position them to different viewing angles with different clarities or intensities. I think the layer blending approach would be easy to understand and hard to mess up because accidentally "over brightening" surfaces by stacking too many additive layers and introducing huge amounts of noise into the render won't get more complicated, or at least won't be much different than it is right now.
Current Work Around
The current work around would be to make as many renders as there are specular reflection variations, and then assemble them back together in post using the fresnel channel's output. I simply don't have the time or resources to do that. My current projects (which are animations) are taking between 2 and 3 days just to render. I'm pretty sure that most of that is due to the use of complex IOR files in my materials. If I could replicate the complex IOR effects with multiple BSDF's in the ranges of viewing angles they occur, I would probably reduce my render times anyway because I could bypass any need to compensate for transmission. This of course would be dependent on the ability to blend layers by viewing angle.
Thanks Next Limit!
Last edited by zparrish on Wed Aug 27, 2014 5:15 pm, edited 1 time in total.
Regards,
Zack Parrish
-
Maxwell - 4.2.0.3
Maxwell 4 | 3ds Max - 4.2.4
336 capable Maxwell threads!
-
Workstation:
Dual E5-2680v3, 64GB, Quadro K5200
48 threads (HT) @ 139.2GHz
-
Render Farm:
288 threads (HT) @ 835.2GHz
Zack Parrish
-
Maxwell - 4.2.0.3
Maxwell 4 | 3ds Max - 4.2.4
336 capable Maxwell threads!
-
Workstation:
Dual E5-2680v3, 64GB, Quadro K5200
48 threads (HT) @ 139.2GHz
-
Render Farm:
288 threads (HT) @ 835.2GHz





- By Edward Leibnitz