Results 1 to 9 of 9

Thread: Sampler Info node into Ramp and MILA compatibility

  1. #1
    Join Date
    Dec 2014
    Location
    Sweden
    Posts
    11

    Question Sampler Info node into Ramp and MILA compatibility

    Hello ARC community!

    I'm having trouble mapping a 2-color ramp (with Facing Ratio on a Sampler Info node plugged into its U or V coordinate) to the tint attribute of a mila_glossy_reflection component shader layered on top of a mila_transmission base shader. I've been trying to produce a camera lens coating effect but with no success so far.

    I can get a pretty decent result using the mia materials: sampler info (facing ratio) -> color ramp (v coordinate) then color ramp -> reflection color.

    I also tried connecting the color ramp to the color input of a transmission (distance) base component to get a colored glass but nothing happens. Although if I plug in a single color using the color swatch option it works.

    Can anyone guide me on setting up a lens coating shader using facing ratio with the MILA shaders? Is it even possible yet?

    I'm on Maya 2015 (latest SP) and latest version of mental ray.

    Kind regards
    sparkletooth

  2. #2
    Join Date
    Dec 2014
    Location
    Sweden
    Posts
    11

    Default

    Anyone? Has nobody else tried to do something similar with the MILA shaders?

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

    Default

    Depending on what exactly u'r trying to achieve, u don't really need the sampler info (facing ratio) to achieve this effect. U just need to use the mila layering capabilities - with either Fresnel or custom mode.

    Regarding the colored glass effect, mila (just like mia) has this builtin - look up color at max distance.

  4. #4
    Join Date
    Feb 2013
    Location
    Hannover, Germany
    Posts
    115

    Default

    If you want to build a custom fresnel effect you could plug your Out Value -> mila_layer Weight.
    Screenshot 2015-02-19 21.25.27.png




    If you want to create a custom color falloff you could use Out Color -> mila_glossy_reflection Tint
    Screenshot 2015-02-19 21.25.22.png

  5. #5
    Join Date
    Dec 2014
    Location
    Sweden
    Posts
    11

    Default

    Brilliant! Thanks for this, Actinidia. It's great to see the connections in your screenshots. I will try this out on Monday.

  6. #6
    Join Date
    Mar 2015
    Location
    ATX
    Posts
    1

    Default

    Hi Sparkletooth,

    I was alarmed when I saw your post. I use that exact samplerInfo technique all the time to create iridescent effects. I'm just transitioning to MILA (LOVE IT!), but I tested and it seems to be working for me. Create samplerInfo & Ramp as normal, pipe into Tint of glossy reflection layer. Maya 2015 Ext 1, SP5

    It even worked when applied to tint of the glossy transmission layer, although, yeah, "Color at Max Distance" is more physically based.

    Actinidia's suggestion is a decent workaround but not as flexible as samplerInfo -> Ramp. If you wanted three or more color bands (which I usually do), I'm not sure how you could do it. (Maybe grouping the three reflection layers as a layer subgroup? I know MILA supports this but don't know how to do it in Maya. Still, that's a lot of extra reflection rays.)

  7. #7
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    4,143

    Default

    Could you just mix the three reflection layers? Or do you need to fresnel weight each over the other for some reason?

    Either you can use mix, which automatically makes a sub-network, or the pre-combined glossy mix might suit this particular need immediately.
    Barton Gawboy

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

    Default

    Something sort of like this? https://elementalray.wordpress.com/2...ck-dispersion/

    This example uses transmission, but the same method can be used for reflection. This is what moulder6 mentions and Bart explains.

    six_band_phenomenon_dispersion.png
    "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
    Feb 2013
    Location
    Hannover, Germany
    Posts
    115

    Default

    Barts and Remydrhs suggested workflow works great, but I found out that (if you want to render a spectral effect) it renders faster when you only use one reflection layer and pipe in 3 different ramps in tint RGB.

Posting Permissions

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