Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Hoping to get Contours to appear in reflections

  1. #1
    Join Date
    Apr 2012
    Posts
    3

    Default Hoping to get Contours to appear in reflections

    Hello everyone,

    this is my first time on this forum. If I'm lucky enough some guru will be able to help me out here because I've been searching all over the place for a solution (and asked my teachers here at SCAD too) and found none.

    The matter is pretty straightforward. I have a little statue built with multiple cubes, so not a single mesh, and I got contours on it by using the settings built in maya (render features and shading group). My problem arises when the statue moves in front of reflective objects which reflect back the statue without the contours.

    I think there might be a way to fix this using one of the many contour shaders that come with mentalRay, but I have no clue on how to use them.

    Any help would be really appreciated!

    Cheers,

    Gabe

  2. #2
    Join Date
    Dec 2005
    Location
    Chicago
    Posts
    2,548

    Default

    I am not sure if the Maya built-in contours have this, but the custom contour shaders will draw contours on a reflection or refraction using the depth limit parameters (min_level and max_level)

    http://docs.autodesk.com/MENTALRAY/2...unction_levels

    Building this manually can be a bit complicated. I might be able to post a simple scene later with the basic setup. What version of Maya are you using?
    "Don't let anyone drive you crazy when you know it's in walking distance."

    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

    http://elementalray.wordpress.com/

  3. #3
    Join Date
    Dec 2005
    Location
    Chicago
    Posts
    2,548

    Default

    Hmm having sort of a problem, been awhile since I've done this, Maya 2012 tells me:

    Code:
    while defining camera "perspShape": undefined shader "contour_composite1"
    "Don't let anyone drive you crazy when you know it's in walking distance."

    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

    http://elementalray.wordpress.com/

  4. #4
    Join Date
    Apr 2012
    Posts
    3

    Default

    Building this manually can be a bit complicated. I might be able to post a simple scene later with the basic setup. What version of Maya are you using?
    I am using maya 2012, both at home and at school

    I had already found out about those two parameters, but I can't find them in the built-in functions and I have no clue on how to set up the shaders altogether. Can you point me to some documentation/tutorial in using the mentalRay shaders. I have a vague idea because I know how to use the lens shaders, like the bokeh, but that is pretty much it.

    Thanks a lot for the help!

    Gabe

  5. #5
    Join Date
    Jan 2009
    Location
    Berlin/Germany
    Posts
    648

    Lightbulb contour lines in reflections or refractions

    Quote Originally Posted by prodeguerriero View Post
    ... I got contours on it by using the settings built in maya (render features and shading group). My problem arises when the statue moves in front of reflective objects which reflect back the statue without the contours.
    First of all, the contours rendered by mental ray are 2D lines drawn in post. This means, they are not like 3D objects which can be reflected or refracted. However, contours may be detected and generated for objects seen in reflections or refractions. This is a little more expensive to compute, in general.

    The Maya builtin contour shaders for mental ray do not support contours around secondary effects like reflection or refraction. But the custom contour shaders delivered with Maya allow you to achieve that, although the user interface for those nodes is a bit more basic.

    As an example, this is how the builtin contour shaders would render:

    contour_reflection.png

    This is what you can get with the custom contour shaders. Note, the different look of the contours on the reflected object compared to its original.

    contour_reflection_custom.png

    To achieve this, goto the Custom Shaders section of the contour settings, and attach two new shaders contour_store_function and contour_contrast_function_levels as shown below.

    Maya Contour Custom Shaders.png

    In the AE of the contour contrast shader you can raise the max level parameter to get contours for secondary, or even higher trace depth effects.

    Maya AE Contour Function Levels.png


    Hope this helps. Best, Steve.
    Last edited by steve; May 2nd, 2012 at 19:51. Reason: typo

  6. #6
    Join Date
    Apr 2012
    Posts
    3

    Default

    Thanks a lot. I already did figure out some of this stuff, but I am still having a little issue with it. I'm going to take a couple of screen captures during the week end and show it to you.

    Thanks again!

  7. #7
    Join Date
    Dec 2005
    Location
    Chicago
    Posts
    2,548

    Default

    The output shader for this crashes for me constantly. Curious if this was introduced awhile back and no one noticed.

    Steffen, is the output shader necessary? Not sure how you managed to get those to render.
    "Don't let anyone drive you crazy when you know it's in walking distance."

    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

    http://elementalray.wordpress.com/

  8. #8
    Join Date
    Apr 2009
    Posts
    508

  9. #9
    Join Date
    Jan 2007
    Location
    Berlin, Germany
    Posts
    103

    Default

    Are you using Maya passes? There has been a recent fix (not out yet) which could be related.

    Juri

  10. #10
    Join Date
    Dec 2005
    Location
    Chicago
    Posts
    2,548

    Default

    Me? The crash?

    I wasn't using passes.

    Code:
    while defining camera "perspShape": undefined shader "contour_composite1"
    *crash*
    Last edited by Remydrh; May 7th, 2012 at 17:28. Reason: output
    "Don't let anyone drive you crazy when you know it's in walking distance."

    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

    http://elementalray.wordpress.com/

Tags for this Thread

Posting Permissions

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