Results 1 to 5 of 5

Thread: IRay+ material with two sided material

  1. #1
    Join Date
    Aug 2016
    Posts
    11

    Default IRay+ material with two sided material

    How can an iray material or + material be adapted to have two different material on two different sides
    John

  2. #2
    Join Date
    Jul 2010
    Posts
    343

    Default

    In theory it works if it is a thin walled material.
    For materials with thickness the physics are undefined as you can imagine.
    And if it is transparent - you need equal transparency for both sides.
    But this concerns the pure MDL definition and Iray.
    I am not sure if the Iray+ material in 3dsMax supports that.
    Can someone help us out here?

  3. #3
    Join Date
    Jan 2015
    Posts
    140

    Default

    Hi John,

    I'm afraid that the Iray+ material in 3ds Max doesn't directly support two-sided materials yet. As a workaround though, you can try importing a raw MDL file that defines a two-sided material into the Iray+ material. This is what I tried:

    1. Create a new file called C:\Temp\backface_material.mdl.
    2. Paste the MDL below into the new file.
    3. Launch 3ds Max.
    4. Create a plane and rotate it.
    5. In Render Setup, set the Renderer to Iray+.
    6. In the Settings tab, locate the Custom MDL section and add "C:\Temp" to your MDL Search Paths.
    7. In the Slate Material Editor, create a new Iray+ material and double click on it.
    8. In the material's properties, locate the MDL panel and click on the Import... button.
    9. Select C:\Temp\backface_material.mdl.
    10. Apply it to the plane.

    This is the MDL that I tried. It simply sets the colour to red on one side and green on the other. (I'm not an MDL expert I'm afraid!)...

    Code:
    mdl 1.0;
    
    import base::*;
    import df::*;
    
    export material BackFaceMaterial(color Colour1 = color(1.0, 0.0, 0.0),
                                     color Colour2 = color(0.0, 1.0, 0.0))
    = material
    (
       surface: material_surface(
                      scattering: df::diffuse_reflection_bsdf(
                                        tint: Colour1
                                  )
                ),
       backface: material_surface(
                      scattering: df::diffuse_reflection_bsdf(
                                        tint: Colour2
                                  )
                ),
       thin_walled: true
    );

  4. #4
    Join Date
    Aug 2016
    Posts
    11

    Default

    Thank you
    it would be thin walled like extruded aluminum with a vinyl rap.
    thanks

  5. #5
    Join Date
    Aug 2016
    Posts
    11

    Default

    thank you for your help!
    this was most informative.
    I will get back to with any changes I can make to the MDL.
    I'm no expert either but no time like the present to try. you started my curiosity on how the MDL works and how to make or modify some Typical Materials that are repetitive, only the color changes.
    hey, thanks again

Posting Permissions

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