Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: cjwidd on 2020-05-04, 09:49:55

Title: [RESOLVED] Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-04, 09:49:55
I'm trying to achieve visual parity between Iray (Substance Designer) and Corona Renderer, and after conducting several tests, there seems to be a conversion issue that results in incorrect gloss and / or albedo for Substances converted for Corona Renderer.

I have communicated this and other issues to Galen Helfter (Software Engineer, Integrations) from Adobe / Allegorithmic, but I thought I would ask the Corona forums for feedback as well.

The following video is cross-posted from the Substance forums and recorded for the Substance Integrations team (watch x1.5-2.0 speed)

Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: James Vella on 2020-05-04, 11:46:09
Can you post up the bitmaps somewhere, just 1024 is fine for testing purpose. Id like to investigate this myself as Im working on this atm. let me know which hdri you are using too.
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-04, 20:30:13
I do not have permission to redistribute the textures or the HDRI.

If you want to conduct a test like this, you can easily download an HDRI from a free online source (https://hdrihaven.com/) and there are several free samples from Substance Source (https://source.substance3d.com/) you can try.
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: James Vella on 2020-05-04, 21:37:55
No problem. I own Substance Designer so I figured you were using one of their HDRIs, the name is all I need. Regarding the textures if you cant release them then its not a problem. You can always follow the guide here as a check for yourself to ensure the maps come in correct manually. If they do then you know you have an issue with the plugin. I also found using the Vray output node instead of Corona for the plugin (for corona) works quite well.

https://www.jamesvella.net/blog/2020/4/25/pbr-textures-for-3dsmax-vraycorona-the-short-guide

edit: When I mentioned test, I meant testing your scene. I have tested this workflow between 3dsmax vray/corona/substance iray, blender, cinema4d, unreal and get 100% parity (both metallic/specular workflows). So I wanted to see if there was something amiss with the texture maps. Usually its to do with the output from the sbar or user input error. I also have another indepth post on getting a correct output from substance to corona related to the link I posted above but may be a bit too much info for what you need, might be of use if you are interested though (considering you are using an IOR map which in thise case doesnt look like you need one).
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-04, 22:13:04
I'll take a look at the guide, but I will say that I'm concerned with the plugin, i.e. using the substance file format - not baked maps - in 3ds Max with Corona Renderer. For example, the node graph you see in the video is generated by the Substance to Corona converter script that is bundled with the Substance in 3ds Max plugin (2.3.2).

[...] I also have another in depth post on getting a correct output from substance to corona related to the link I posted above but may be a bit too much info for what you need, might be of use if you are interested though (considering you are using an IOR map which in thise case doesnt look like you need one).

Could you post the link?
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: James Vella on 2020-05-04, 22:40:08
Sure thing. You can see the link here:

https://www.jamesvella.net/blog/2019/9/2/substance-designer-to-vraycorona

I also had issues with the plugin. In fact I also have issues with the Converter within Substance to Corona Output texture maps. I found the Vray (GGX) works more in parity. Something happens with the Glossiness map (I havent investigated exactly what yet but I can show you the output below).

Corona Preset (Inverse Gamma doesnt fix this btw):
(https://i.ibb.co/fQrs5bW/corona.jpg)

Corona 1.6 Preset (Which matches the Vray GGX):
(https://i.ibb.co/ZhfWF3x/corona1-6.jpg)
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-04, 22:44:28
This is interesting, but as you say, this^ workflow is for baked maps - not the plugin 😕
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: romullus on 2020-05-04, 22:51:41
I also think it's plugin that is faulty. If you bake maps and feed them to Corona, there's no issues to get similarly looking result. My quick test just confirms that.
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: James Vella on 2020-05-04, 22:52:52
It is, which is why I suggest first outputting those maps and testing the maps. If it works you know you have a problem with the plugin settings.

If you do, I would suggest changing the sbs file to output to Vray (GGX) Instead of Corona. Plug that node you have directly into a Base Material Converter, set the output to Vray(GGX) and then try using that as your sbar file. Thats how I would approach it.

edit:
like this:

left node, your material, right node converter to vray ggx, save this and import this into your 3dsmax scene as your sbar plugin. this should fix the errors in the transfer within that node. If it doesnt, then theres something else at play.

(https://i.ibb.co/bBKpvRt/Annotation-2020-05-04-225533.jpg)
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-04, 22:54:16
@romullus, which is which in those tests?
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: romullus on 2020-05-04, 22:58:37
Well, obviously the one that is in Corona's VFB, is rendered by Corona, the other one is rendered by Iray. I turned off tonemapping in Painter, but maybe Iray is applying some beautification on its own, so little bit of tuning might be required to get good match.
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: James Vella on 2020-05-04, 23:01:14
Well, obviously the one that is in Corona's VFB, is rendered by Corona, the other one is rendered by Iray. I turned off tonemapping in Painter, but maybe Iray is applying some beautification on its own, so little bit of tuning might be required to get good match.

it should look 100% the same as iray by default.

Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: romullus on 2020-05-04, 23:10:25
This material has some metalicity - i didn't bother to export and hook all the maps properly, just the basic ones. I also didn't match sphere's position and rotation. If you'll do everything to the letter, then surely the renders should look even more similar.
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: James Vella on 2020-05-04, 23:13:39
Thats fair enough.

Here is a comparison between iray, corona, vray with both metal/dialectric areas with masks. They should be in parity (98% I should say, not 100%, they are different engines after all but the material is at quesiton here, the rest of the setup is identical, hdri, rotation, EV, camera, import settings etc).

(https://i.ibb.co/YRCB13X/compare.jpg)
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: James Vella on 2020-05-04, 23:25:31
This material has some metalicity...

As an off topic thing... now I think about this, this is an odd material behaviour. Usually something is metal or its not (with slight variation in regards to decay/rust etc) but if its used as a sheen then I would be concerned about the quality of materials being offered on the Souce website. I know megascans have a good measure of quality with the technical aspect they approach their material process. Anyway, just rambling, keep us posted with your progress @cjwidd.
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-05, 03:40:46
After rendering basically every permutation of the material using Substance renderers (Yebis, Iray) in various Substance material authoring / texturing softwares, I think I have to backpedal on my earlier assertions, because it appears I've misunderstood or miscalibrated Substance Designer.

Looking at the various renders (displacement exaggerated for effect) it appears that Substance Painter Iray render and Corona (tonemapped) render are the most visually similar to the preview renders from Substance Source. 

The Substance Painter Yebis and Iray renders differ significantly in terms of the normal map response - AO response? It looks like the self-shadowing is completely different, perhaps because the shadows are being calculated from the normal map in Yebis but from the geo with Iray?

---

substance source preview

vpq_substance_source_preview_1
(https://i.imgur.com/2UIxSf4.png)

vpq_substance_source_preview_2
(https://i.imgur.com/1nnmUAp.png)

---

vpq_corona_linear
(https://i.imgur.com/FZZXcV6.png)

vpq_corona_tonemap_5.0cm
(https://i.imgur.com/z69z75P.png)

vpq_corona_tonemap_1.0cm
(https://i.imgur.com/fxZrpgI.png)

vpq_substance_designer_iray_cw
(https://i.imgur.com/EDPeAOU.png)

vpq_substance_designer_iray_default
(https://i.imgur.com/tmmuM59.png)

vpq_substance_designer_viewport_cw
(https://i.imgur.com/RVvELvN.png)

vpq_substance_designer_viewport_default
(https://i.imgur.com/HPcem83.png)

vpq_substance_painter_iray
(https://i.imgur.com/qdY1eoo.png)

vpq_substance_painter_viewport
(https://i.imgur.com/HW4h4zG.png)

vpq_substance_player
(https://i.imgur.com/4FJXeFY.png)
Title: Re: Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-05, 04:12:22
Maybe the real question is, "What's going on with the Substance Designer Yebis / Iray rendering and why does it look so much different from the others?"
Title: Re: [RESOLVED] Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-13, 11:30:33
The "issue" basically sums to user error:

1. The HDRI that was used for testing produced a soft light that did not reveal the specular intensity of the surface compared to some other alternative, e.g. Tomoco Studio
2. There is an OpenGL shader sampling option in the 3d View preference of Substance Designer that has a dramatic effect on visual quality in the 3d view

for more information, see Substance Designer (10.1.1): Yebis vs. IRay vs. Corona Renderer  (https://forum.substance3d.com/index.php?topic=33628.new#new)
Title: Re: [RESOLVED] Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: romullus on 2020-05-13, 11:47:22
How is this user error if it's caused by bad software design (faulty default settings)?

Do you know if painter has similar settings to look at?
Title: Re: [RESOLVED] Substance in 3ds Max (2.3.2) - Substance to Corona Converter
Post by: cjwidd on 2020-05-13, 12:09:08
I'm sort of willing to accept the onus of responsibility with respect to this issue in particular because there was an established setting available in the software to curtail the issue I was specifically asking about. Substance Designer is a deep software, but perhaps if I had read the manual more thoroughly (etc.) I would not have reported the issue as a bug in the first place.

Regardless, it seems to alleviate the issue - and for that I am grateful - but at the moment I cannot say whether a similar setting is available in Substance Painter. For SP, it appears that the Iray render does produce a comparable result to what can be expected from Corona Renderer, but if I find there is a quality setting that improves the SP viewport representation, then I'll report back here in case it helps someone.

Good news is that the Substance in 3ds Max plugin does not appear to be at fault for this issue, nor Corona Renderer.