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

Thread: Problems with mia_materia_x

  1. #1
    Join Date
    Mar 2012
    Posts
    14

    Default Problems with mia_materia_x

    Hi, my Problem is the material's interaction with the background. The goal is to achieve the same results as with iray rendering.

    First my mia_material_x:
    Code:
    shader "mia_x_instance"  "mia_material_x" (
    	"diffuse"   0.82 0.9 1,
        "transparency" 1,	
        "refr_ior" 1.3,		
    	"reflectivity" 0,
    	"brdf_fresnel" 1,
        "do_refractive_caustics" 1,
    	"lights" ["lights-instance"],	
    )
    
    material "material1" = "mia_x_instance"
        shadow  = "mia_x_instance"
        photon  = "mia_x_instance"
    end material
    When i disable any environment and draw before no background the parts that should be transparent appear completely black.
    000084_foo2.png

    When i render the same thing with iray the water gets transparent as it should.
    000084_bar2.png

    The next problem are the environmental reflections. In normal rendering the material reflects on some parts 100% of the background and i can't figure out how to change this. You'll recognize these gray areas.
    000084_foo.png

    Heres what it should look like:
    000084_bar.png
    (the environment is just the same, I don't know why iray doesn't draw it. But it generates some gray reflections so it's there)

    Can I handle this with a transparent environment shader for the material? I'm afraid that it will be the same result since the background should be already transparent.

    Thanks for your attention
    Last edited by Shredd0r; April 6th, 2012 at 15:23.

  2. #2
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,101

    Default

    Your mia_x shader has 1.0 for transparency and 0.0 for reflectivity. Did you want a little reflectivity in it?

    What are your local to mia_x, and global, refraction depths set to for non-iray rendering?

    What is your environment shader, or how are you setting up your environment?
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  3. #3
    Join Date
    Mar 2012
    Posts
    14

    Default

    Thanks for reading

    I chose these values so that you can see the problem better. Though transparency is maxed the water doesn't become transparent before a transparent background and though reflectivity is zero, there are these strong gray reflections. The value of the reflectivity keeps no influence of these gray reflections.

    trace depths:
    Code:
    trace on
    trace depth 2 2 4
    environment:
    I'm loading a hd-texture and give it to a mib_lookup_spherical. then apply it to the camera as environment.

  4. #4
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,101

    Default

    Try refraction depth of 6, and see if there are any differences. If the mia x gets cut off by by global refraction depth, there may be issues of understanding what to expect. With transparency, rarely is refraction set as low as 2.

    When using iray, that global refraction depth is ignored and only the iray settings matter. Also, there is not strictly identical behavior in mia x when translated to iray. That is probably why you see a little reflectivity, even when you set the mia x to have 0 reflectivity. When you set up extreme examples that are not quite easy to duplicate in physical reality, there may be more differences.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  5. #5
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,101

    Default

    What version of mr, ie, what version of what 3d app are you using for content creation?
    Last edited by bart; April 6th, 2012 at 22:39.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  6. #6
    Join Date
    Mar 2012
    Posts
    14

    Default

    I'm using mental ray Version 3.9.
    Plain on console.

    I just tried to apply a transparent texture as environment, the result is black water
    Why this material can't handle transparent backgrounds?

    Increasing the trace depths also didn't change anything.

    All I want is clear water without having strong reflections of the background.

    Maybe that's not possible? I'm not sure, my task is to give a water result that's as realistic as possible. And since iray is physical based that's the criterion.
    It's really hard to figure out what's realistic in this case. But if you look at a basin of water in your kitchen you wont have a perfect mirror, no matter which angle you are looking at it.

  7. #7
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,101

    Default

    What exactly do you mean by transparent background?

    For example, alpha of 0 for the background?

    In your example of what you want, you have a white background.

    iray is a physical light simulation. Something needs to be in the background. Do you want it to be white?

    Or do you want more of an artisticly directed render, where you construct an image that has alpha corresponding to transparency across the whole image and at 0 in all background parts?
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  8. #8
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,101

    Default

    Physically realistic water does have reflection. But the amount of light coming from either the reflection or the refraction affects which you notice more.

    And typically there is more reflection at glancing angles. That is the fresnel effect.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  9. #9
    Join Date
    Mar 2012
    Posts
    14

    Default

    Back in town
    I hope you had a happy easter (I had a white one (which was quiete happy))

    I thought about reflections in real world physics. Maybe strong reflections only appear, when most of the light comes from one direction? Because if you are inside a room where the light is very diffuse you don't see much reflections an no strong ones.

    On these pictures you see the ground through the reflection:
    puddle-architecture-photo-series.jpg
    Reflection-Puddle-web.jpg
    But with my mia_material this seems not possible to me :/
    This would be no problem of course if I could prove, that it is not possible.

  10. #10
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,101

    Default

    Sure its possible, but you have to know how much light is coming from the various directions and sources so that one doesn't outweigh the other.

    Transparency in a rendered image indicates somewhat of an industrialized process. Ie, you are treating your rendered image as a step, a part, of your final desired image which is built (composited or whatever) from those parts.

    Could you clarify further how you are setting up the environment? Which shaders, what kind of texture map, etc.?

    What is that blue thing underneath your water box? Do you want that there in your final rendered image?

    Is your water a self-contained, closed surface?

    Currently, iray is targeted for final rendered images, all at once for physically simulated use. It is important to know that it may not always be that way, but that is where it is at currently. All methods to make it behave like a pass generating render currently, I would consider as ingenious workarounds. I know many production-oriented folks are still working on those. And I'll help you try to do what you want as best as is possible.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

Posting Permissions

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