Announcement

Collapse
No announcement yet.

MODO 10.0v1 Unity and Unreal materials

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MODO 10.0v1 Unity and Unreal materials

    Today's nightly builds ( 2016.04.14 ) have initial support for the new Unity and Unreal materials in MODO 10.0v1.
    Also the "swizzling" channel of image maps is supported (it is used in a lot of the Unity material presets).

    Here is an example, one of the Unreal preset materials, rendered with MODO:
    Click image for larger version

Name:	old copper MODO.jpg
Views:	1
Size:	343.7 KB
ID:	883973
    and V-Ray for MODO:
    Click image for larger version

Name:	old copper.jpg
Views:	1
Size:	292.3 KB
ID:	883974

    Another with MODO:
    Click image for larger version

Name:	rusted metal MODO.jpg
Views:	1
Size:	320.8 KB
ID:	883975
    and V-Ray for MODO:
    Click image for larger version

Name:	rusted metal.jpg
Views:	1
Size:	304.2 KB
ID:	883976

    Here is a folder with rendered all Unreal preset materials from the MODO 10.0v1 content : https://www.dropbox.com/sh/as1mygbdz...QUwXiPHFa?dl=0
    And with the Unity presets : https://www.dropbox.com/sh/1lbctz4fa..._T5-HWJ5a?dl=0

    There are a few known issues at the moment:
    1. no RT GPU support
    2. the fresnel term is applied differently leading to edges that seem to slightly glow when the roughness value is greater than 0 (with roughness=0, the fresnel is applied the same way as in MODO, as far as I can tell)
    3. the Mikk tangent basis is not used for the normal maps, I think this leads to some of the black areas that can be seen on some materials
    4. the roughness of the diffuse term works differently
    5. the results with V-Ray for MODO are a bit darker, not sure if one of 1-4 is causing this
    6. for the Unity material the normal/detail normal/height scale channels are not supported
    7. some texture effects are unsupported
    - for Unreal : unreal bump, clearcoat amount, clearcoat roughness, subsurface color
    - for Unity: unity bump, detail albedo x2, detail mask, detail normal
    For both, the Ambient occlusion effect is ignored, I think it is supposed to be used only with OpenGL, the V-Ray GI/reflections will handle it without needing it baked as a map.

    I will be working on fixing these issues in the future provided there is enough interest in using those materials.
    So let me know in this thread, if you find them useful and would like one of these improvements.

    Greetings,
    Vladimir Nedev
    Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

  • #2
    Yes please!

    Comment


    • #3
      I've made some improvements for today's nightly build ( 2016.04.19 ):

      - RT GPU support
      - unreal/unity bump effects now work
      - normal maps now work in RT GPU ( this isn't specific to the Unreal/Unity materials)
      - Unreal/Unity materials can be used as sub-materials (of blend, 2-sided, override materials)
      - bump/displacement amount for Unreal/Unity materials is now taken from the first material below them that has these channels.
      Previously a constant value of 1 meter was used, which made it impossible to use bump on them.

      Another change, which I am not sure is an improvement or not : before this build I was multiplying light and environment contribution by 2.0 for the Unity material.
      This seemed to match the results of the MODO renderer.
      I don't know how to implement this multiplication in RT GPU, so I've disabled it in Production/RT CPU as well, so the CPU and GPU results match.
      The Unity materials will now be much darker in V-Ray compared to MODO, but this has the benefit that you can combine them with other material types in your scene,
      since they now have the same response to light as the other material types.

      Greetings,
      Vladimir Nedev
      Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

      Comment


      • #4
        Here is a quick comparison between RT CPU and GPU after 1 minute.
        The noise levels can't really be compared since my CPU ( i7 2600 ) is a lot cheaper than the GPU I used ( Quadro M5000 ).

        RT CPU:
        Click image for larger version

Name:	old_copper_rt_cpu.jpg
Views:	1
Size:	384.0 KB
ID:	860469
        RT GPU (with GPU texture size increased to 2048 ):
        Click image for larger version

Name:	old_copper_rt_gpu.jpg
Views:	1
Size:	356.6 KB
ID:	860470

        Greetings,
        Vladimir Nedev
        Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

        Comment


        • #5
          Great! Thank you!

          Comment


          • #6
            Turns out I forgot to enable a very important optimization concerning shadow rays when writing the Unity/Unreal support.
            It can have a very big impact on scenes with only Unreal/Unity materials and a lot of shadow rays (for example from multiple area light sources).
            The optimization is enabled for today's nightly build ( 2016.05.30 ).

            Here is a comparison with and without the optimization, the render time is reduced by almost 30%.

            Before:
            Click image for larger version

Name:	unreal_old.jpg
Views:	1
Size:	296.1 KB
ID:	862199
            Now:
            Click image for larger version

Name:	unreal_new.jpg
Views:	1
Size:	295.4 KB
ID:	862200

            Greetings,
            Vladimir Nedev
            Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

            Comment


            • #7
              Hi Vladimir,

              I'm currently doing few test to analyze the behavior of the V-Ray Material, especially the relation between glossiness and reflectivity.

              Since it's a major feature of the "PBR" materials based on the 2012 Pixar, I took advantage of the fact that rendering an Unreal material with V-Ray is possible in Modo.

              Here is a comparison of the Reflection Filter pass of a render of the 2 materials, applied on 90 planes consecutively rotated of 1 degree each.

              IOR : 1.5
              Reflection color : 255,255,255
              Glossiness : from 1 (top ) to 0.01 ( bottom )

              Click image for larger version

Name:	gloss_reflectivity_vray_vs_UE.png
Views:	1
Size:	61.8 KB
ID:	862980

              You can read the exact values here.

              The V-Ray material doesn't dim the reflection according to the glossiness, whereas the Unreal Material does ( and so the diffuse component is stronger ).

              I did few tests on a shaderball and the dimming of reflectivity works very well on materials at low roughness, and looks very natural.

              It seems that the only way to reproduce this with a V-Ray Mat is to use a Gradient in Reflection Color with the appropriate curve, which dim the reflection at F90 only according to the glossiness. The Unreal material seems to do it in a linear way ( glossiness : 0.5 = reflection F90 = 0.5 ), but since I can't see the F90 plane, I am not sure.

              Is there any plan to modify the BRDF behavior or simply create a function to link these 2 parameters, like the highlights / reflection glossiness ? Or create a "VrayPBR material" compatible with the Metal / Rough workflow ?

              Comment


              • #8
                Hi,

                For those interested in the subject, there is a simple way to reproduce the behavior of Unreal shader :

                - disable the fresnel
                - reproduce a simple 1.5 IOR fresnel curve with a Gradient set on Reflection Color
                - and decrease the value of the right side of the gradient according to glossiness. It's not a perfect linear relation, 0.5 glossiness is not equal to 0.5 reflection at grazing angle ( at least if based on Unreal material behavior ), but it's close. I found that I had to add 0.1 to my reflection color value compared to glossiness between 0.5 and 1 gloss values. Under 0.5 gloss, gloss value = reflection color F90 value. Not scientific at all but visually speaking it works

                Click image for larger version

Name:	v-ray_gloss_vs_unreal.jpg
Views:	1
Size:	322.8 KB
ID:	863191
                Click image for larger version

Name:	v-ray_modified_gloss_vs_unreal.jpg
Views:	1
Size:	324.4 KB
ID:	863192

                Comment


                • #9
                  The V-Ray material doesn't dim the reflection according to the glossiness, whereas the Unreal Material does ( and so the diffuse component is stronger ).
                  I did few tests on a shaderball and the dimming of reflectivity works very well on materials at low roughness, and looks very natural.
                  What I am doing for the Unreal shader is not exactly what the Disney paper suggests.
                  I am doing a simple linear dimming of the glancing reflection towards the incident reflection based on the roughness.
                  So when roughness=1, the glancing reflection becomes equal to the incident reflection.

                  What the Disney paper suggests (and I think that's what MODO does even in its "Energy conserving" mode) is to apply the Fresnel formula on the micro-normals.
                  Vlado refers to this as "glossy fresnel" elsewhere in the forum.
                  With this approach, you still get very reflective edges, even on rough materials, if the light is opposite the viewer, i.e. illuminating the object from behind.
                  For example:

                  Click image for larger version

Name:	unreal_glossy_fresnel.PNG
Views:	1
Size:	103.3 KB
ID:	863255

                  I have this logged for fixing. And since Vlado did it for the V-Ray AlSurface material for 3ds Max, I know how to implement it.

                  It seems that the only way to reproduce this with a V-Ray Mat is to use a Gradient in Reflection Color with the appropriate curve, ....
                  I've setup a scene where I try to mimick the dimming for the Unreal material, using some nodes. reflection_dimming.zip
                  You can replace the Glossiness and Glancing Reflection constant textures with image maps. The IOR constant texture can't be replaced with a map, it needs to be a constant value.
                  You can also disable the Reflection dimming layer to see how the material looks without dimming.
                  Maybe try this setup with the Quixel Megascan textures.

                  Click image for larger version

Name:	vray_mtl_reflection_dimming_setup.PNG
Views:	1
Size:	267.9 KB
ID:	863256

                  This shading network computes the incident reflection as (((ior-1)/(ior+1))^2) * glancing_reflection, that's what the V-Ray material and V-Ray Fresnel textures do.
                  Then it linearly blends between incident and fresnel reflection based on glossiness (the glossiness texture is instanced as a layer mask).
                  Might not be exactly what happens for the Unreal material, but both are hacks anyway.

                  Is there any plan to modify the BRDF behavior or simply create a function to link these 2 parameters, like the highlights / reflection glossiness ? Or create a "VrayPBR material" compatible with the Metal / Rough workflow ?
                  I think there are plans to do this, yes. It is already in the V-Ray AlSurface for 3ds Max.
                  Quote from Vlado, from the V-Ray for 3ds Max forum:

                  my intention was to turn the Fresnel on/off option into a drop-down with values of "Disabled", "Simple" (which is what we have now), "Dielectric" (which would incorporate the dielectric Fresnel calculations into the BRDF calculations themselves) and maybe "Metallic" (for complex IOR).
                  Link to his post, if you have access to that forum : http://forums.chaosgroup.com/showthr...433#post704433

                  When this is done, the above workaround (which is still not entirely correct according to the Disney paper) won't be needed.

                  Greetings,
                  Vladimir Nedev
                  Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                  Comment


                  • #10
                    Originally posted by vladimir.nedev View Post
                    What I am doing for the Unreal shader is not exactly what the Disney paper suggests.
                    I am doing a simple linear dimming of the glancing reflection towards the incident reflection based on the roughness.
                    So when roughness=1, the glancing reflection becomes equal to the incident reflection.

                    What the Disney paper suggests (and I think that's what MODO does even in its "Energy conserving" mode) is to apply the Fresnel formula on the micro-normals.
                    Vlado refers to this as "glossy fresnel" elsewhere in the forum.
                    With this approach, you still get very reflective edges, even on rough materials, if the light is opposite the viewer, i.e. illuminating the object from behind.
                    For example:

                    [ATTACH=CONFIG]32373[/ATTACH]

                    I have this logged for fixing. And since Vlado did it for the V-Ray AlSurface material for 3ds Max, I know how to implement it.
                    But this "glossy fresnel isn't the "grazing retroreflection"effect visible on the principled Disney BRDF ?

                    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	89.4 KB
ID:	863271


                    Originally posted by vladimir.nedev View Post
                    I've setup a scene where I try to mimick the dimming for the Unreal material, using some nodes. [ATTACH]32375[/ATTACH]
                    You can replace the Glossiness and Glancing Reflection constant textures with image maps. The IOR constant texture can't be replaced with a map, it needs to be a constant value.
                    You can also disable the Reflection dimming layer to see how the material looks without dimming.
                    Maybe try this setup with the Quixel Megascan textures.

                    Thank you very much for this material setup I will test it with few Megascans and post the results.

                    Comment


                    • #11
                      But this "glossy fresnel isn't the "grazing retroreflection"effect visible on the principled Disney BRDF ?
                      No it isn't, the "grazing retroreflection" is a modification of the Diffuse part of the BRDF.
                      It is mentioned on page 14 of the paper, this is where your screen-shot is from.
                      The Unreal shader ( link to paper ) doesn't include this modification.
                      On page 2, near the end, it says : "We evaluated Burley’s (author of Disney paper) diffuse model but saw only minor differences compared to Lambertian diffuse (Equation 1), so we couldn’t justify the extra cost."

                      What we call "glossy fresnel" is the formula mentioned on page 16 in 5.5 Specular F details.
                      It is specifically noted : "Note that specular refection comes from microfacets and thus F depends on ThetaD, the angle between the light vector and the micronormal (i.e. the half-vector), not the angle of incidence with the surface normal."

                      The paper used for MODO's Energy Conserving mode also uses "glossy fresnel" : https://www.cs.utah.edu/~shirley/papers/jgtbrdf.pdf

                      Greetings,
                      Vladimir Nedev
                      Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                      Comment


                      • #12
                        So if I have understood correctly, the Unreal shader have it's fresnel value diminishing while the roughness increase, but without the "added highlight" mentionned in the Disney paper for their BRDF ?

                        I will not continue with this subject since I am absolutely not qualified to discuss this, but instead do practical case.

                        I have textured a kettle in Substance Painter, here is the result in the viewport :

                        Click image for larger version

Name:	painter_viewport.jpg
Views:	2
Size:	202.0 KB
ID:	863565

                        I have reproduced exactly the same lighting conditions in Modo to compare the looks. I have exported the maps with the PBR Metal / Rough preset and import them in a Unreal Material. Result :

                        Click image for larger version

Name:	vray_unrealshader_render.jpg
Views:	1
Size:	178.6 KB
ID:	863566

                        The result is pretty close from the one in Painter although the fresnel effect is clearly stronger. And the global reflectance dimming seems a bit too low / light.

                        And finally I have exported the maps with the V-Ray sRGB preset, and loaded them in a standard V-Ray material. The result is close from the previous but with a stronger fresnel effect.

                        Click image for larger version

Name:	vray_vraymaterial_render.jpg
Views:	1
Size:	199.4 KB
ID:	863567

                        I didn't had the time yet but I will test with the workaround you provided on the previous page.

                        Click image for larger version

Name:	shader_comparison.jpg
Views:	1
Size:	286.5 KB
ID:	863568
                        Last edited by John_Do; 21-09-2016, 12:42 AM.

                        Comment


                        • #13
                          The rougher the surface the less fresnel you should see. Technically the fresnel should become less rough on grazing. Look at something like soft touch plastic in real life at almost 90 degrees its very glossy not mat, nor rough white.

                          The best work around for this imo is using a higher IOR and reducing the reflection color. Basically eyeballing it for most materials. Unless you can measure them in real life eye balling with correct lighting will give the best results. The reason for Raising the IOR is that the fresnel becomes tighter and darker at grazing.

                          Or as stated above just do it all by hand.

                          Comment


                          • #14
                            Thank you vandigital for your advices.

                            Technically the fresnel should become less rough on grazing. Look at something like soft touch plastic in real life at almost 90 degrees its very glossy not mat, nor rough white.
                            Yeah I know that, like reflection the glossiness vary with the view angle. But I don't this in account here because my goal is to reproduce exactly the result I have in Painter. It's a starting point, I could improve the material with all the stuff V-Ray offer to have a more convincing result.


                            I did a little test with what you have suggested. Result is visually satisfying. I putted a Constant color on top the layers and raised the IOR to 2.5. The fresnel effect is again more visible than on the Painter version but I think it's fine. I could use it to make the material glosser at grazing angles.

                            I also have disabled shadows and self-reflections to closely match the Painter viewport.

                            Click image for larger version

Name:	painter_viewport.jpg
Views:	2
Size:	202.0 KB
ID:	863617
                            Click image for larger version

Name:	vray_vraymaterial_corrected_B_render.jpg
Views:	1
Size:	155.5 KB
ID:	863615

                            Click image for larger version

Name:	shader_comparison_002.jpg
Views:	1
Size:	173.6 KB
ID:	863616

                            The reason for Raising the IOR is that the fresnel becomes tighter and darker at grazing.
                            I disagree with you The real reason imho is raising the IOR increase facing reflectivity, which is decreased by the dark reflection color setted in the material properties.

                            The 2.5 value used here keeps the standard 4% reflectivity value at facing angle.

                            Comment


                            • #15
                              I did some test too to see if the workflow with the Unreal material and substance material was suitable. Although the differences between the Modo render engine and Vray seem pretty close to call (and I'm very happy about it), there's some problem with the texture processed both with Vray CPU and GPU.

                              With Vray GPU I get some strange smudge on the bronze material texture, while with Vray CPU I get some softness on the asphalt texture. I've used Substance Plugin (version 2.7.0) loading a .sbsar material from Substance Source.

                              I did some test using also the Modo native principled shader but Vray seems to not load some maps, so we not get a correct translation from Modo to Vray engine. Would be nice to see that shader implemented in the future Vray version, since the "principled shader" has some extra option as round edges that aren't available on the Unreal material and then the workflow on that shader will be universal in all the application that supports the "principled shader" as Blender.

                              Comment

                              Working...
                              X