Hi, I want ask, everything in PBR workflow in Substance Designer is sRGB, our imported textures (in 99.99%), our colors from RGB palette, what we see in 3D view and last our outputs are in sRGB (if we don't convert with node in SD).
And I want ask, because I don't understand, why we need convert outputs for the glossiness and 1/ior texture gamma to 1.0 for V-Ray, when we need ALL imported texture in sRGB for correct rendering in V-Ray need to be set in Linear. In V-Ray we can check in Settings->V-Ray->ColorMappping Advanced -> Linear Wokflow and everything is converted to Linear, or can uncheck and manually add Gamma Correct node with 0.4545 or add extra V-Ray Atributes for texture Texture Input Gamma with 2.2.
Hi, I want ask, everything in PBR workflow in Substance Designer is sRGB, our imported textures (in 99.99%),
This Is not really true.. The important thing to understand is how you visualize all these textures: Through a shaded 3d view. And our pbr shader interprets each channel a different way:
- the maps containing color/lighting information (basecolor, diffuse, specular) are interpreted as sRGB and are consequently linearized in the shader before the lighting computation. Working in sRGB for these maps is logical because this is the way we view the images we might use (photo).
- the maps containing other information (roughness, glossiness, metallic, normal) are interpreted as linear (no linearization, the value are read as they are)
There is no reason to edit/view these maps as sRGB, it would result in a loss of quality.
This workflow is not specific to SD, it the general convention.
So it's important to interpret all these maps the same way in SD and in the renderers to get the same result on both sides.
Hi Nicloas,
If I make substance using spec/gloss target, would the image I get from SD viewport match closely to Vray / Arnold render when outputting the maps? And what about IOR and F0 maps, how would I get them extracted?
Or is it just better to work with metallic/rough and use the converter?
No the Diffuse / Spec / Gloss shader we use in the viewport does not work the same way as the Vray Material. And it's not possible to "extract" the IOR/F0 maps.
Just work with metallic/roughness and use the converter instead.
This filter is meant to convert bascolor/metallic/roughness maps to vray compatible maps. So the idea is to use it directly in Substance Designer: you create your material and visualize it with the 3D view in Designer, then convert and export the maps to bitmaps for vray.
aha... ok.. I see... so the converter makes sure that the exported maps are in the correct gamma space and usable for Vray, right ? And then you only need to plug the maps in the slots of the VrayShader you mentioned in the first post ?
It's for sure an advantage that you can export a so called IOR map.... at the moment I am testing maps exporting from 3dcoat. At this point I am not able to export an IOR map and I am running into the issue that I can not re-produce a VrayShader that looks close to the 3dcoat PBR material.
I thought.. since Substance Designer is using also the PBR materials, it should be a similar process. However, it looks like that the IOR map, which you export from Substance Designer is the "key". And that map, it just looks like.. is a map I can currently NOT export from 3dcoat.
The ior map is the key because that's the one telling if the material is a metal or dielectric from the metallic map.
I've no idea how 3d coat works.
But if I 3d coat can export basecolor, metallic roughness maps, you could use the converter in Designer.
I havn't the same settings for rendering with Arnold, Exporting from Substance Painter to .exr (no Gamma embedded), I apply a 0.455 gamma correction on diffuse and Specular (Texture Gamma Set to 1) to match with the Substance Painter / Marmoset display. The Green Channel of my Normal Map are inversed (Unflag Flip G Channel to the bump2d node). Voilà.
Hi, I've been using the Vray converter in Subtance Designer and it's amazing! thanks Nic. However I got a stronger fresnel in Vray than in Substance Designer, not sure how to get rid of it. Any idea or am I doing something wrong?
No worries, you're not doing anything wrong. The shader in SD/SP uses the GGX brdf for the specular contribution but for the diffuse contribution it uses a simple Lambert brdf. Vray on its hand uses GGX for both diffuse and specular and that explains the difference when only the diffuse contribution is visible (at roughness == 1).
Technically you should use a very high roughness on dielectrics only for very specific materials, like velvet.
There isn't really a solution for now as we prefer keeping lambert for performances sake.
Interesting! Any info on how they used GGX for diffuse? I'm seeing stuff about vray's "Energy preservation mode" but I imagine SGGX came out too recently to be implemented.
Hum well they just use it, there is not really different ways of using a BRDF. Energy conservation and BRDF are two different things, energy conservation just means the material won't diffuse/reflect more light it received.
I wouldn't say that. Energy conservation is dependent upon the formulation of the BRDF problem. If the diffuse BRDF and specular BRDF aren't identically formulated (meaning they are derived from exactly the same microfacet description) then the microfacet model is broken and energy conservation must be applied more like an arbitrary clamping.
This is the BRDF I'm referring to: https://eheitzresearch.wordpress.com/240-2/ ^ Allows specular + diffuse GGX microfacets to be analytically sampled for surfaces + for an arbitrary number of multiple scattering events. It accomplishes this by considering the surface as a boundary for an underlying arrangement of 3 dimensional microflakes. This also correctly allows for the interesting property of diffuse anisotropy.
Until the point that the above paper came out GGX had no analytic solution for diffuse microfacets without a volumetric representation, first well covered in 3.4 of the full-text pdf here: http://jcgt.org/published/0003/02/03/ The volumetric solution was the SGGX Microflake Distribution from early 2015 which I've linked further below.
Anyways, for that reason it was not possible to create true lambertian microfacets using a GGX NDF, only a few complicated, but not particularly accurate, numerical approximations that can't correctly conserve energy, which is was why I brought up the Energy preservation mode. They can ad-hoc subtract energy in order to try to balance the equation but it's not a match to the correct, microflake based form. The most important takeaway is that the distribution of energy between specular and diffuse for any given roughness should use an identical microfacet method and be able to be sampled analytically. Whatever Vray is doing is ad-hoc unless they've already managed to implement such a new thing (and I haven't seen a ton of discussion on it for anything outside research yet). But this is all just food for thought really.
Thanks for all the documentation! I may have made a dirty shortcut when I said they were using GGX for diffuse. It's not explicit in the VrayMtl UI nor in the documentation But I'm pretty sure they don't use Lambert (as we do in SD/SP)
Hi guys, has anyone had any success reproducing this in Maya? I'm using Maya for a project but this seems very Max-centric? I'm not very technical so trying to find a good workflow that will take what I made in Painter and get it into Maya to render in Vray.
Is this thread still relevant with the Substance Painter 2 Corona export? I can't seem to find any other documentation on it and am not getting the results I expected. Everything looks good but my metal area is just black.
Hi there, I used the converter from the start of the thread and I did the conversion from base color/roughness/metallic in SD 5.3 and exported them to Vray 3.1 for Maya but I can't get the same result for my lantern.. here are my settings and this time I used the Vray export in Painter 2.0.3 ( I tried different input texture gamma for reflection map and no luck)
Hi, thanks for replying! I'm not using the Vray physical camera, I'm just using the standard Maya camera with no alterations.. as for the render settings I'm using 16 max subdivs on a 1080p res, GI with brute force as primary (32 subdivs) and light cache as secondary (1000 subdivs) everything else is at default.
What input/output do you use for Arnold gamma correction? I cant connect the roughness. Also does the same setup apply to Substance Painter outputs? Having a hard time figuring out that textures to export and where to connect them.
@VeljkoI'm suspecting a gamma issue. Try to apply the basecolor only in a lambert and light the scene with an ambient light only. The result should look the same as the solo mode in painter (or when you view the basecolor in PS). If it's not the same, then you should probably make sure all the gamma stuff is correctly setup: how the bitmap are interpreted and how the color mapping is setup.
@Enderay Just use the Out value if it's a color, if it's grayscale use one of the Out value component (r, g or b). Yes the same setup applies to Painter except in Painter, the "reflection" output should be plugged to the "specular" input in the arnold material.
Im running in the same problem as what "vincentch20" has post with his screenshot. Vray's fresnel value seems very high in GGX. The problem becomes a headache when Im texturing sets. A lot of walls and ground when the camera get close to the surface glancing angle the reflection gets super bright. As vincentch20 has shown even with extremely high roughness it gets a halo effect on Vray. I think its more of a vray problem than SD/SP problem. But its been months that Im trying to look for a solution. Im thinking of blending material with GGX for the f/0 surface and Blinn for facing away angle by using sampler info node in maya. More tests are needed.
The metal maps created in SubstancePainter look all great in V-Ray. However my non-metal maps reflect way too bright. All maps are imported with 1.0 gamma into my V-RayMtl slots, except of course the diffuse map..
Raising the brightness of the high tones in the IOR map helped somewhat (to shift the non-metal parts closer to IOR 1) . Still it looks so different to Substance Painter, as if something really went wrong.. Any clue?
The reason some of you guys are having issues with high fresnel reflectance values in vray is because of an issue in the vray material. As it stands at the moment (though it will be fixed soon in an upcoming service pack) vray doesnt take into account the roughness of materials when calculating the fresnel. It gives a 100% reflectance value at 90 degree angles.
The problem is that vray calculates the fresnel according to the surface normal, not according to the normal per microfacet, leading to artificially bright fresnel at glancing angles, and artificially dim highlights at normal incidence. These effects get more noticable the rougher the material is.
These are the solutions I have found: - wait for the service pack update which integrates the ggx microfacet brdf into the fresnel calculations - Download the AlSurface supplementary shader for Vray which has this behaviour enabled by default. However the AlSurface shader doesn't offer things which the Vray Material does, like transmission for example (this is the solution megascans seem to have taken in their script to take the surface scans out of megascans bridge into vray for max) : https://github.com/ChaosGroup/vray_al_surface/releases
or if you only care about dimming the glancing reflections and not brightening the incident highlights: - I personnaly have not tested this, but there is an OSL map you can use in the vray reflect slot to simulate this behaviour: http://www.rensheeren.com/blog/osl-reflector/ - Simulate your own fresnel by turning off the vray fresnel and using a falloff map with an approximate fresnel curve in the reflection colour slot, where you manually plug in an F0 map and an 'F90' map (this map is essentially a blend between the F0 map and a white colour using the reflection glossiness map as a mask- where maximum glossiness = white F90 = 100% specular at glancing angles)
thankyou. thats very valuable information and does help immensely to understand the problem. your hint that it is the rougher areas that shine unnaturally bright at f(0) indicates that i am facing exactly the issue you described. tomorrow i'll try the suggested solutions.
- wait for the service pack update -Simulate your own fresnel by turning off the vray fresnel and using a falloff map
exactly what I ended up doing
btw, in case anyone knows, is there a way to convert an f0 map into a vray ior map? the closest thing i found was this thread on a corona forum : https://corona-renderer.com/forum/index.php/topic,12945.0.html I have that LUT file, but I'm not sure the ior map corona would use is the same as the one vray would use...
also based on that forum thread, it looks like corona changed how they handle ior maps in version 1.5 vs 1.4 Just thought you guys might wanna look at that as it could make the exporter instructions for corona out of date. I don't use corona though so I could be completely wrong.
Hey, yes, I just tested it. The V-Ray rendering of the material does look a lot more like it does inside Substance Painter. I used a standard V-Ray material with glossy fresnel ticked under options in the Mat editor. Problem solved for me. You could say, it was about time, but now I am actually just glad that it finally works without work-arounds.
God ... bless ... you. Three years later ... and after trying to figure this out for 2-3 weeks, yours is the closest, most accurate description of how to get the maps to work (vray for me). Don't know why this info is so hard to come by (followed a Lynda tutorial, the only other comprehensive attempt at a workflow to get the outputs from SD to match Vray, but it didn't work for me, so that tutorial is def missing something in its workflow). Couldn't even get this info on the Allegorithmic forum (I'm kind of saddened by the reliability of the responses by staff or input from others on those forums); though I happened to see one post there by someone referencing this thread, and glad the journey down this rabbit hole paid off (or is definitely bringing me closer to figuring it out). Three years later, from the future, and from the bottom of my heart ... Thank ... You!
Replies
And I want ask, because I don't understand, why we need convert outputs for the glossiness and 1/ior texture gamma to 1.0 for V-Ray, when we need ALL imported texture in sRGB for correct rendering in V-Ray need to be set in Linear. In V-Ray we can check in Settings->V-Ray->ColorMappping Advanced -> Linear Wokflow and everything is converted to Linear, or can uncheck and manually add Gamma Correct node with 0.4545 or add extra V-Ray Atributes for texture Texture Input Gamma with 2.2.
This Is not really true.. The important thing to understand is how you visualize all these textures: Through a shaded 3d view. And our pbr shader interprets each channel a different way:
- the maps containing color/lighting information (basecolor, diffuse, specular) are interpreted as sRGB and are consequently linearized in the shader before the lighting computation. Working in sRGB for these maps is logical because this is the way we view the images we might use (photo).
- the maps containing other information (roughness, glossiness, metallic, normal) are interpreted as linear (no linearization, the value are read as they are)
There is no reason to edit/view these maps as sRGB, it would result in a loss of quality.
This workflow is not specific to SD, it the general convention.
So it's important to interpret all these maps the same way in SD and in the renderers to get the same result on both sides.
You you select another target, it's normal. The reflection for a dielectric material is white.
Don't plug the specular output to the SpecularLevel input, these maps are totally different.
If you use the PBR spec/gloss target, why do you use the converter? The sbsar already outputs the maps for this workflow.
If I make substance using spec/gloss target, would the image I get from SD viewport match closely to Vray / Arnold render when outputting the maps? And what about IOR and F0 maps, how would I get them extracted?
Or is it just better to work with metallic/rough and use the converter?
Just work with metallic/roughness and use the converter instead.
Could someone send a picture, please?
Thanks
Can you please tell us, how to use that filter ?
How to use the filter, for example with 3dsmax and Vray ?
So the idea is to use it directly in Substance Designer: you create your material and visualize it with the 3D view in Designer, then convert and export the maps to bitmaps for vray.
It's for sure an advantage that you can export a so called IOR map.... at the moment I am testing maps exporting from 3dcoat. At this point I am not able to export an IOR map and I am running into the issue that I can not re-produce a VrayShader that looks close to the 3dcoat PBR material.
you can see my tests documented with videos on my page:
http://www.bernhardrieder.com/3d-coat/
I thought.. since Substance Designer is using also the PBR materials, it should be a similar process. However, it looks like that the IOR map, which you export from Substance Designer is the "key". And that map, it just looks like.. is a map I can currently NOT export from 3dcoat.
Hmmm... what you think ?
Exporting from Substance Painter to .exr (no Gamma embedded),
I apply a 0.455 gamma correction on diffuse and Specular (Texture Gamma Set to 1) to match with the Substance Painter / Marmoset display.
The Green Channel of my Normal Map are inversed (Unflag Flip G Channel to the bump2d node).
Voilà.
However I got a stronger fresnel in Vray than in Substance Designer, not sure how to get rid of it. Any idea or am I doing something wrong?
The shader in SD/SP uses the GGX brdf for the specular contribution but for the diffuse contribution it uses a simple Lambert brdf.
Vray on its hand uses GGX for both diffuse and specular and that explains the difference when only the diffuse contribution is visible (at roughness == 1).
Technically you should use a very high roughness on dielectrics only for very specific materials, like velvet.
There isn't really a solution for now as we prefer keeping lambert for performances sake.
Energy conservation and BRDF are two different things, energy conservation just means the material won't diffuse/reflect more light it received.
This is the BRDF I'm referring to:
https://eheitzresearch.wordpress.com/240-2/
^ Allows specular + diffuse GGX microfacets to be analytically sampled for surfaces + for an arbitrary number of multiple scattering events. It accomplishes this by considering the surface as a boundary for an underlying arrangement of 3 dimensional microflakes. This also correctly allows for the interesting property of diffuse anisotropy.
Until the point that the above paper came out GGX had no analytic solution for diffuse microfacets without a volumetric representation, first well covered in 3.4 of the full-text pdf here:
http://jcgt.org/published/0003/02/03/
The volumetric solution was the SGGX Microflake Distribution from early 2015 which I've linked further below.
Anyways, for that reason it was not possible to create true lambertian microfacets using a GGX NDF, only a few complicated, but not particularly accurate, numerical approximations that can't correctly conserve energy, which is was why I brought up the Energy preservation mode. They can ad-hoc subtract energy in order to try to balance the equation but it's not a match to the correct, microflake based form. The most important takeaway is that the distribution of energy between specular and diffuse for any given roughness should use an identical microfacet method and be able to be sampled analytically. Whatever Vray is doing is ad-hoc unless they've already managed to implement such a new thing (and I haven't seen a ton of discussion on it for anything outside research yet). But this is all just food for thought really.
More info:
The SGGX Microflake Distribution - https://drive.google.com/file/d/0BzvWIdpUpRx_dXJIMk9rdEdrd00/view
Importance Sampling Microfacet BRDFs using VNDF - http://hal.inria.fr/hal-00996995/en
Moving Frostbite to PBR - http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf
^ Appendix B is good, talking about how roughness must be defined in slope space for GGX.
Designing Reflectance Models for New Consoles - http://research.tri-ace.com/Data/DesignReflectanceModel_notes.pdf
^ Probably the most in depth talk about a numerical approximation to a diffuse GGX, but obviously this has big caveats as they and I mention.
I may have made a dirty shortcut when I said they were using GGX for diffuse. It's not explicit in the VrayMtl UI nor in the documentation
But I'm pretty sure they don't use Lambert (as we do in SD/SP)
Thanks,
B
The VrayMtl is the same, so plug the map in the same slots.
Just make sure the basecolor is interpreted as sRGB and the other maps as linear.
You can export maps directly from Painter using the vray preset.
Some images of your problem would help (show the material tree and the exported maps)
http://i.imgur.com/J9Dqk8t.png Vray shd
http://i.imgur.com/wfD1jF9.png comparison 1
http://i.imgur.com/qGqE0Af.png comparison 2
I really hope someone has a solution or a fixed workflow for exporting to Vray for Maya cause my deadline is really close
Do you have exposure settings on the camera, what are the color mapping settings ?
@Enderay Just use the Out value if it's a color, if it's grayscale use one of the Out value component (r, g or b).
Yes the same setup applies to Painter except in Painter, the "reflection" output should be plugged to the "specular" input in the arnold material.
Im running in the same problem as what "vincentch20" has post with his screenshot. Vray's fresnel value seems very high in GGX. The problem becomes a headache when Im texturing sets. A lot of walls and ground when the camera get close to the surface glancing angle the reflection gets super bright. As vincentch20 has shown even with extremely high roughness it gets a halo effect on Vray. I think its more of a vray problem than SD/SP problem. But its been months that Im trying to look for a solution. Im thinking of blending material with GGX for the f/0 surface and Blinn for facing away angle by using sampler info node in maya. More tests are needed.
Raising the brightness of the high tones in the IOR map helped somewhat (to shift the non-metal parts closer to IOR 1) . Still it looks so different to Substance Painter, as if something really went wrong.. Any clue?
The problem is that vray calculates the fresnel according to the surface normal, not according to the normal per microfacet, leading to artificially bright fresnel at glancing angles, and artificially dim highlights at normal incidence. These effects get more noticable the rougher the material is.
These are the solutions I have found:
- wait for the service pack update which integrates the ggx microfacet brdf into the fresnel calculations
- Download the AlSurface supplementary shader for Vray which has this behaviour enabled by default. However the AlSurface shader doesn't offer things which the Vray Material does, like transmission for example (this is the solution megascans seem to have taken in their script to take the surface scans out of megascans bridge into vray for max) : https://github.com/ChaosGroup/vray_al_surface/releases
or if you only care about dimming the glancing reflections and not brightening the incident highlights:
- I personnaly have not tested this, but there is an OSL map you can use in the vray reflect slot to simulate this behaviour: http://www.rensheeren.com/blog/osl-reflector/
- Simulate your own fresnel by turning off the vray fresnel and using a falloff map with an approximate fresnel curve in the reflection colour slot, where you manually plug in an F0 map and an 'F90' map (this map is essentially a blend between the F0 map and a white colour using the reflection glossiness map as a mask- where maximum glossiness = white F90 = 100% specular at glancing angles)
this effect is also explained in the AlSurface documentation on page 12 here: http://blog.selfshadow.com/publications/s2014-shading-course/langlands/s2014_pbs_alshaders_notes.pdf
and if you can access it there is a thread on the chaos group forum here:
http://forums.chaosgroup.com/showthread.php?89466-Rough-Specular-reduces-specularity-amount/page3
hopefull this helps someone else
- wait for the service pack update
-Simulate your own fresnel by turning off the vray fresnel and using a falloff map
btw, in case anyone knows, is there a way to convert an f0 map into a vray ior map? the closest thing i found was this thread on a corona forum : https://corona-renderer.com/forum/index.php/topic,12945.0.html
I have that LUT file, but I'm not sure the ior map corona would use is the same as the one vray would use...
also based on that forum thread, it looks like corona changed how they handle ior maps in version 1.5 vs 1.4 Just thought you guys might wanna look at that as it could make the exporter instructions for corona out of date. I don't use corona though so I could be completely wrong.
Am I mistaking when I hope that Substance Painter Materials will now be reflected more acurately with V-Ray?
You could say, it was about time, but now I am actually just glad that it finally works without work-arounds.