Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: MILA and fake light specular

  1. #1
    Join Date
    Jul 2005
    Location
    Australia
    Posts
    117

    Default MILA and fake light specular

    Playing around with a demo of Maya 2015 and noticed that the MILA shader is reflecting a fake area light spec.

    I just want it to do real reflections so how do i not include fake specs from lights? "Visable" on the area light is off so its not that.

    So to sum up i want to be able to use area lights for diffuse ONLY. Something A LOT of people do.
    Last edited by subaqua; April 25th, 2014 at 15:08.

  2. #2
    Join Date
    Jun 2009
    Location
    Sofia, Bulgaria
    Posts
    556

    Default

    Quote Originally Posted by subaqua View Post
    "Visable" on the area light is off so its not that.
    It's exactly that. If "visible" is off, for the light, there's nothing to be reflected so it creates fake highlight instead.

  3. #3
    Join Date
    Jul 2005
    Location
    Australia
    Posts
    117

    Default

    Quote Originally Posted by moulder6 View Post
    It's exactly that. If "visible" is off, for the light, there's nothing to be reflected so it creates fake highlight instead.
    But i don't want it to create a fake highlight. I want to have the choice to have NO highlight from an area light (As with the Mia material where i can turn it off)

    Don't see why this is so hard to understand...

  4. #4
    Join Date
    Jun 2009
    Location
    Sofia, Bulgaria
    Posts
    556

    Default

    Quote Originally Posted by subaqua View Post
    But i don't want it to create a fake highlight. I want to have the choice to have NO highlight from an area light (As with the Mia material where i can turn it off)
    Make the light visible and it won't create highlight - will use reflections instead. If you want only diffuse contribution from the light this isn't possible at the moment. If you have the light source modeled, and want reflections only for it use the builtin_object_light to make that object the actual light source. This way u'll have the proper reflections and no spec.

    Quote Originally Posted by subaqua View Post
    Don't see why this is so hard to understand...
    Because u've failed to explain what your actual problem is.

  5. #5
    Join Date
    Jul 2005
    Location
    Australia
    Posts
    117

    Default

    Quote Originally Posted by moulder6 View Post
    If you want only diffuse contribution from the light this isn't possible at the moment.
    Well that sucks and here i was hoping MILA could finally be a complete shader. So MILA is not meant to replace MIA.
    Last edited by subaqua; April 25th, 2014 at 15:06.

  6. #6
    Join Date
    Dec 2005
    Location
    Wherever The Computer Says
    Posts
    2,853

    Default

    It is meant to replace MIA but it's a more physical shader. Also having lights emit diffuse or spec only means nothing to a true physical render or a BSDF and can make things like MIS unreliable.

    The problem isn't MILA, the problem is there is not a light in Maya that allows you to have it reflect while not being visible to the camera.

    The solution is to use an object area light (as Moulder6 correctly suggests) and turn off the primary visibility on the shape used for the light. You can find instructions here: http://elementalray.wordpress.com/20...ntal-ray-3-11/

    Note that the crashing issue is resolved in 2015. Remember to uncheck "export with shading engine" on the built_object_light shading group node. Using the shape node attributes can give you near complete control over the visibility of the light. We're hopeful this workflow will improve for object lights in the future. Physical area lights are the way lighting should be done whenever possible.
    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

  7. #7
    Join Date
    Jul 2005
    Location
    Australia
    Posts
    117

    Default

    Quote Originally Posted by Remydrh View Post
    Also having lights emit diffuse or spec only means nothing to a true physical render or a BSDF and can make things like MIS unreliable.
    .
    Since Mental Ray was not designed to be a physically accurate renderer I'm sure no one will mind.

    Quote Originally Posted by Remydrh View Post

    The solution is to use an object area light (as Moulder6 correctly suggests) and turn off the primary visibility on the shape used for the light. You can find instructions here: http://elementalray.wordpress.com/20...ntal-ray-3-11/
    .
    When will this be properly implemented so it can be commonly used? Atm it's a bit of a pain doing this for every light you make. People will only adopt something once its properly implemented and stable...

  8. #8
    Join Date
    Dec 2005
    Location
    Wherever The Computer Says
    Posts
    2,853

    Default

    Quote Originally Posted by subaqua View Post
    Since Mental Ray was not designed to be a physically accurate renderer I'm sure no one will mind.
    That's not actually true. It's flexible so you can make it non-physical. But non-physical isn't the aim of mental ray. DGS, Path Material, builtin BSDF, physical light, mia_material, mila_material, all manner of GI, etc are all aimed at physical rendering since that is most in demand. All recent technologies built into mental ray are designed to use better in-core techniques (or lead to that). In which case physically-based rendering is key to have predictable results.


    Quote Originally Posted by subaqua View Post
    When will this be properly implemented so it can be commonly used? Atm it's a bit of a pain doing this for every light you make. People will only adopt something once its properly implemented and stable...
    Can't say when, but I know it's important to NVIDIA as it makes for better physical rendering that can take advantage of all the optimizations that come with it like Texturing, Light IS and MIS, etc. Object lights have been in mental ray for a really really long time. builtin_object_light's goal is to make integration easier. Now that better integration is at hand I can't imagine it will take forever.
    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

  9. #9
    Join Date
    Jul 2005
    Location
    Australia
    Posts
    117

    Default

    Quote Originally Posted by Remydrh View Post
    Object lights have been in mental ray for a really really long time. builtin_object_light's goal is to make integration easier. Now that better integration is at hand I can't imagine it will take forever.
    haha yea tell me about it. I remember trying them out almost 10 years ago from Francesca ctrl shaders. This link brings back a lot of memory's http://forums.cgsociety.org/showthread.php?t=213012.

    There was a lot of great progress with Mental Ray in Maya with unofficial shaders like Ctrl and mega TK, but nothing ever got properly implemented and its been a very painfully slow waiting game since. Its amazing to see the modo render develop so fast while watching MR in Maya stagnate.

  10. #10
    Join Date
    Aug 2010
    Location
    New York, NY
    Posts
    123

    Default

    Was mental ray designed to be a "physically accurate" renderer?

    Not necessarily. Mental ray was designed to be a flexible raytracing framework. As such, most of the physically based control is given to the artist and/or shader writer. It's very much possible to use mental ray as a "physically accurate" renderer and many users do. It's also possible for users such as OP to break physical accuracy when they wish to. The overwhelming trend of the industry is now towards "physically accurate" rendering.

    What does "physically accurate" mean?

    A physically based BSDF implies two things:
    1. Energy conserving
    2. Helmholtz reciprocity


    The mia_material really only tries to conserve energy, the mila_material does both.

    What is Helmholtz reciprocity?

    Helmholtz reciprocity describes how a ray of light and its reverse ray trace similar optical paths. Consider the following two cases:
    1. Light ray traced from a light EDF to a material BSDF (commonly referred to as "highlight")
    2. Reflection ray traced from the same material BSDF to the same light EDF (commonly referred to as "reflection")



    Helmholtz reciprocity states that these two light paths are both valid and equivalent, i.e. they should converge to the same result. In practice, one light path may prove to be more efficient than the other. For example, light samples [A] tend to be more efficient than material samples [B] for diffuse BSDFs while material samples [B] tend to be more efficient than light samples [A] for specular/mirror BSDFs. Traditionally, mental ray leaves it up to the shaders to determine which light path to use. Using the contribution from both light paths doubles the contribtion and breaks energy conservation.

    One important 'exception' to this rule is for light shapes with no area, i.e. point lights, spot lights, and directional/infinite lights. These light shapes are themselves non-physical approximations to actual area emitters such as the tiny filament of an incandescent light bulb or the very distant sun. These 'point' lights cannot be sampled by material BSDFs and so must be sampled by the light EDF.

    Why so physical?

    The mia_material does a poor job at obeying Helmholtz reciprocity. This has lead to confusing terminology, additional shader parameters, and general misconceptions. Both light paths described above represent the same thing, any distinction between them is an artifical result of non-physical shading.

    Non-physical parameters makes it difficult for the mental ray core to optimize the render. Multiple Importance Sampling is an automatic optimization technique that relies on Helmholtz reciprocity to provide consistent results. By improving the physical based shading options, mental ray can begin to move past the recent stagnation. Sure, not everything will be the same, but that's the whole point, isn't it?

    Is that all?

    Not entirely. Each mila component currently provides a direct and indirect contribution scale. You may find that you can achive a desirable result by tweaking the direct scale of your glossy reflection component.
    Last edited by bnrayner; April 25th, 2014 at 23:18.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •