Author Topic: Substance Painter to Corona C4D  (Read 14581 times)

2018-09-30, 03:32:28

mrittman

  • Active Users
  • **
  • Posts: 240
    • View Profile
    • www.mattrittman.com
Hi, I am trying to find the correct workflow going from Substance Painter to Corona. Please see the attached "substance" screenshot of how the material looks inside Substance Painter. Then compare that with the "corona" screenshot. It looks totally different. When I export my textures from Substance, I make sure to select the Corona preset. It creates a Diffuse, Reflection, IOR, Glossiness, and Normal. I plug these in to their appropriate ports as shown in the "nodes" screenshot.

Doing some research, I see that Glossiness, IOR, and Normal need to have their gamma corrected:
https://support.allegorithmic.com/documentation/integrations/corona-for-3ds-max-157352444.html

I tried creating a C4D Filter shader and adjusted their gamma by 0.455 (to get 1.0). But it's still not looking right. All my worn edges are supposed to appear metallic, but instead are just black.

I also found this page: https://forum.corona-renderer.com/index.php/topic,11377.0.html
But it is way over my head and is geared toward a 3ds max workflow.

Can someone explain what else I need to do in order to get my texture to show up properly?

2018-09-30, 16:14:06
Reply #1

Eddoron

  • Active Users
  • **
  • Posts: 552
  • Achieved Pedestrian
    • View Profile
I've had a similar issue with that. Leaving out the IOR map(it's often baked even if you didn't paint it) should solve it. Or at least you should modify it with a filter shader or similar.

I haven't tried putting my map inside a Corona Bitmap shader at that time, maybe it could fix the whole thing.
I don't know if Allegorithmic or whoever created the CRN exporter in SP was aware of the color handling differences between MAX and C4D.

edit: The simplest solution would be to have the metal maps in one material and the dielectric in the other, one of the 3 presets in SP gives you a blend mask which you can use in the layer material.
If that doesn't work, then I'd need to have a look at your SP layers/materials and output setup.

Btw, the reason why the worn edges are rendered in black is that they're usually used in a metal material, Corona only uses a dielectric one. If you have a rough metal map, it would look different on a metal material. So the best way is to either fake it with the layer shader or simpler, the layer material.
There are some approaches to refl. maps using the diffuse channel, but I would stay away from that, as long as you don't need it.
« Last Edit: 2018-09-30, 17:01:05 by Eddoron »

2018-09-30, 18:18:42
Reply #2

mrittman

  • Active Users
  • **
  • Posts: 240
    • View Profile
    • www.mattrittman.com
Thanks so much for your response Eddoron. I tried leaving out the IOR map, but that unfortunately didn't seem to fix it.

Here's another question, since I started the Substance material using the Metallic/Roughness preset, would that have made a difference? I noticed on this page that it states Corona uses the Specular/Glossiness workflow: https://support.allegorithmic.com/documentation/integrations/corona-157352404.html
Not sure if it makes a difference in the end with the specific maps it exports, even when using the Corona export preset.

Yeah I've seen people using a corona layered material setup, but I never could get it set up properly. Could I get your email address, and I could send you my files?

2018-09-30, 23:29:32
Reply #3

Eddoron

  • Active Users
  • **
  • Posts: 552
  • Achieved Pedestrian
    • View Profile
I don't think we should complicate things by sending me the files. You'll understand it better when you do it yourself.

However, I made a quick "guide".

Bake the maps using the preset "Corona (forum)". Apparently, it was already discussed in another section here.
Dielectric stuff goes into material 1, metallic stuff into material 2.
Add the maps to the materials. In the metallic mat, you can leave out the diffuse channel and crank up the IOR(no map was used here) for the metal until it looks fine.
Mats 1&2 go into layer material. The xxx_Blendmask map is used as the mask for one of the materials. (the blend mask came out with metal parts as white, I didn't bother to change it)

While writing this I just had another Idea. you could use the skin material. Just disable the SSS and you have a basic material with two reflection channels.

2018-10-01, 00:50:10
Reply #4

mrittman

  • Active Users
  • **
  • Posts: 240
    • View Profile
    • www.mattrittman.com
Here's where I'm at. Still doesn't look near as good as it did in Painter. Not really sure what else to do. Was hoping at first it would be a seamless transition between Painter and Corona, but after spending hours trying to texture this model, I'm about ready to tear my hair out. About to throw in the towel at this point :(

And to top it off, the textures did something weird after baking and showing a bunch of artifacts/seams.

2018-10-01, 06:16:04
Reply #5

Eddoron

  • Active Users
  • **
  • Posts: 552
  • Achieved Pedestrian
    • View Profile
I hope I could help and before I send you a third pm because my memory is like swiss cheese:

Try using a different pbr shader like unreal or unity and you'll notice that there's a huge difference. Also, don't forget to turn off the post-processing effects. It might look better with them, but you'd have to recreate the settings when you're going to render it.

And now something very unorthodox....why not render it in Iray? It's pretty fast and inside SP you are just one click away.

2018-10-01, 07:21:38
Reply #6

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3862
  • Bengamin
    • View Profile
    • Cormats
I'm no Substance guru but if you want a second set of eyes on it I can take a look. You're welcome to use the private uploader in my signature. No harm in trying I guess.
Bengamin Jerrems l chaos-corona.com
3D Support Specialist - Corona l contact us
Corona Uploader l Upload
Portfolio l Click me!

2018-10-01, 10:22:32
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I think i see several issues in your material setup. The first three steps are critical.
  • it looks that your maps are loaded linearly and with the "gamma 1.0" node you're actually adding gamma 2.2 That is major issue and it is breaking whole material. Only diffuse and metal color textures has to be in gamma 2.2 - all others should be linear. Try to remove "gamma 1.0" node from IOR, normal and glossiness textures and plug it to diffuse and metal color.
  • blending amount for all layers in layered material should be 1.0, not 0.5 like in your case - blending should be controled only by the mask.
  • glossiness texture should be plugged to metallic material as well
  • unless you specifically authored IOR channel in painter, IOR texture can be omitted. Just leave default fresnel IOR for dielectric and crank IOR to the max for metallic. If C4D has fallof node, it is preferable to use it in metallic material.
  • if you would swap layer order in layered material, you could discard invert node before blend mask. Although ths is not esential and will work fine as it is.
  • make sure that bump strength is set to 1 or 100% when using normal maps (should be set by default in Corona material).

Remember, that if you want to get as close as possible results to Substance Painter, you have to use exactly the same HDRI with the same rotation, especially when metallic materials are involved.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-10-01, 17:01:49
Reply #8

mrittman

  • Active Users
  • **
  • Posts: 240
    • View Profile
    • www.mattrittman.com
I hope I could help and before I send you a third pm because my memory is like swiss cheese:

Try using a different pbr shader like unreal or unity and you'll notice that there's a huge difference. Also, don't forget to turn off the post-processing effects. It might look better with them, but you'd have to recreate the settings when you're going to render it.

And now something very unorthodox....why not render it in Iray? It's pretty fast and inside SP you are just one click away.

Thanks Eddoron. Will have to play with unreal and unity shaders. I really need to render with Corona because I am going to animate this thing in the end. There are a lot of small parts inside the gun that I plan on just throwing some quick Corona materials on. I won't be UV unwrapping every object, as there are probably 100 parts haha.

I'm no Substance guru but if you want a second set of eyes on it I can take a look. You're welcome to use the private uploader in my signature. No harm in trying I guess.

I appreciate it beanzvision! I'm going to try a few more things tonight, but if I get really stuck, I can send you file!

I think i see several issues in your material setup. The first three steps are critical.
  • it looks that your maps are loaded linearly and with the "gamma 1.0" node you're actually adding gamma 2.2 That is major issue and it is breaking whole material. Only diffuse and metal color textures has to be in gamma 2.2 - all others should be linear. Try to remove "gamma 1.0" node from IOR, normal and glossiness textures and plug it to diffuse and metal color.
  • blending amount for all layers in layered material should be 1.0, not 0.5 like in your case - blending should be controled only by the mask.
  • glossiness texture should be plugged to metallic material as well
  • unless you specifically authored IOR channel in painter, IOR texture can be omitted. Just leave default fresnel IOR for dielectric and crank IOR to the max for metallic. If C4D has fallof node, it is preferable to use it in metallic material.
  • if you would swap layer order in layered material, you could discard invert node before blend mask. Although ths is not esential and will work fine as it is.
  • make sure that bump strength is set to 1 or 100% when using normal maps (should be set by default in Corona material).

Remember, that if you want to get as close as possible results to Substance Painter, you have to use exactly the same HDRI with the same rotation, especially when metallic materials are involved.

Yeah the whole gamma/color profile is very confusing to me :( I'll try just bypassing the gamma 1.0 nodes and using linear profile. Yeah it's looking like the IOR maps I am getting out of substance is throwing everything off. I think I'll just get rid of the map and crank up the IOR to like 12. I didn't even think of using the same HDRI map...yikes!

I am going to mess with this more tonight and will get back to you all with results. Thanks again!! This is very much appreciated!

2018-10-01, 17:17:01
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Yeah it's looking like the IOR maps I am getting out of substance is throwing everything off. I think I'll just get rid of the map and crank up the IOR to like 12

I think that first two steps from my previous list, is what really messes your material. IOR map loaded with correct gamma, won't make any difference from textureless fresnelIOR setup, it's just more convenient and easier for render when there are no more textures that are really needed. Set fresnelIOR to 999 for metallic and you should be good to go :]

HDRI map is not really important either, it needs to match only if you want to get nearly 1:1 view with painter, but in fact correctly setuped material should look good in any adequate lighting and enviroment.

Thanks Eddoron. Will have to play with unreal and unity shaders.

Those shaders will only affect how your model will look in painter and not how textures export. If your goal is to render with Corona, then you should stick with default PBR metal rough shader and export textures with Corona (forum) preset.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-10-01, 21:01:15
Reply #10

mrittman

  • Active Users
  • **
  • Posts: 240
    • View Profile
    • www.mattrittman.com
Thanks romollus! I've attached my updated node tree and a couple renders. Tried to get it close to what you said!

I think it's looking better, but wish the metal edges were a bit more reflective. Maybe I should disconnect the Glossiness channel from the Metallic material?

Thoughts?

2018-10-01, 21:24:05
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
No, you should definitely leave glossiness pluged in. I'm thinking, maybe i'm confusing about metal color texture and it should be linear too? Try to remove gamma node from metal color and see if it looks better.

Other than that, you could try to relace HDRI with the one that has more bright spotlights, so that metal had something to reflect.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-10-01, 21:30:19
Reply #12

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
On a second look at your graph, why it si written linear next to some texture nodes and embedded next to others? Does that mean they are loaded with different gamma? If so, then you should remove all gamma nodes from your graph, as you overcorrecting gamma already.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-10-01, 22:52:22
Reply #13

mrittman

  • Active Users
  • **
  • Posts: 240
    • View Profile
    • www.mattrittman.com
Thanks romullus! I just wrote linear and embedded on the screen grab so you knew what the color space is set for each haha.

So maybe I can just go ahead and remove the gamma correction nodes? What's the general rule for setting linear or embedded (sRGB) color profile for each bitmap? I just don't understand why these need to be touched to begin with. It's just very confusing!

I'm going to mess with this more tonight, but I was having good luck changing metal color to linear, as you suggested.

2018-10-01, 23:17:13
Reply #14

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
There was a topic in the forum with similar discussion and explanations why some maps needs to be loaded linearly and others with gamma 2.2, but it could be hard to find it. For now just remember, that colour/diffuse texture in most cases must be loaded with embedded gamma. Glossiness, IOR, displacement, bump, anisotropy should always be loaded in linear.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures