Author Topic: Megascans/Bridge Exporter Updates + Workflow  (Read 75088 times)

2016-08-26, 11:36:46

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
How to sync Bridge and 3dsMax

* Browse to "Megascans Bridge\Bridge_Data\Support" and copy "BridgeConnection.ms"



* Browse to "C:\Program Files\Autodesk\3ds Max 201X\scripts\Startup" and paste "BridgeConnection.ms"



This will make 3dsMax search for Bridge content.

How to Install/Update Exporters

* During Closed Beta I created a bunch of exporters, these are included in Bridge 1.0.1.
  But I don't know how frequently Quixel will keep these up to date.
  You will always find the latest Corona exporter on my Google Drive.
 
  https://drive.google.com/folderview?id=0B10mLXqqmNkidk0yOFdGWXBPSmc&usp=sharing
 
* Copy the ".ms" files from my Google Drive into "Megascans Bridge\Bridge_Data\Support\Scripts\Max"



How to Export to Corona

* Make sure 3dsMax is running, and that you have installed "BridgeConnection.ms"

* Select an Atlas, Surface or 3D Model in Bridge.
* Click Scipts > Max > Send to Corona.



* To make my life easier I always check "Use images from source folder"
* I recommend that you use .EXR for Displacement.



* Your Megascans material will show up in the old "Compact Material Editor"



* This is how Atlas materials are imported.



* This is how Surface materials are imported.



* This is how 3D materials are imported.



* Thats it! Time to tweak the materials to perfection.

Displacement
Megascans Displacement maps are not real floating point displacement maps.
To simulate this, we have to enable "Luminance Center" and set it to "0.5"
A Strenth of "10" is correct for most materials, but some need "100".

No Displacement



Displacement Settings



With Displacement



IOR Maps
Megascans has Specular map for Specular Workflow, and Cavity map for Metalness workflow.
These maps fake depth on flat surfaces, like grass materials.
Since Corona does not support Specular/Cavity, I made a Spacular to IOR LUT.
You can get this LUT from my Google Drive linked above.

* Open a Specualar map in Photoshop.
* Change the Bit to 16 Bits.



* Add a "Color Lookup" adjustment layer.
* Load my Specular to IOR LUT.
* Load the IOR map in 3dsMax with Gamma 1.0.



What the Exporter does, and why

* Diffuse and AO are blended together for Surfaces.
* Materials will load with an IOR of 1.47, almost all specular maps have this IOR as default.
* PBR mode is activated, this is a must because of the Glossiness range.
* Diffuse and Translucency are loaded with Gamma 2.2, the rest are loaded with Gamma 1.0.
* Translucency Fraction is 0.35 by default. This is an average value I found after a bunch of tests during Beta.
* Green is flipped in the Normal Map
* Displacement is loaded, but disabled by Default.
* Show In Viewport is applied to the material.
« Last Edit: 2016-08-30, 18:55:28 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-08-28, 16:44:40
Reply #1

Hussein052

  • Active Users
  • **
  • Posts: 10
    • View Profile
when trying to run script in 3ds max you get an error.." unkown property: "pbrmode" in MAT_%%NAME%%:CoronaMTl....how do you go abt this?

2016-08-28, 19:18:42
Reply #2

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
You need Corona 1.5+
Corona 1.4 is not capable of producing industry standard PBR. It has clamped Glossiness, normalizing Diffuse and white Super Mario Galaxy Fresnel.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-08-30, 15:15:53
Reply #3

flemming086

  • Active Users
  • **
  • Posts: 28
    • View Profile
I have this issue, anyone can help to solved it?


2016-08-30, 16:58:12
Reply #4

karnak

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 76
    • View Profile
Hi flemming086, I think you are missing the file C:\Users\"username"\AppData\Local\Quixel\Megascans Bridge\MaxScript.ms, or the script is not able to open it.

white Super Mario Galaxy Fresnel.
^ lol
Corona Academy (May 2017)

2016-08-30, 18:36:54
Reply #5

flemming086

  • Active Users
  • **
  • Posts: 28
    • View Profile
Explain pls how to work with an atlas? this model? I have exported the material, but no model on which it is necessary to impose

2016-08-30, 18:44:41
Reply #6

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Atlases are just flat planes/cards. You need to cut geometry around the scans, apply displacement and bend them if needed.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-08-30, 19:14:41
Reply #7

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I've made a bunch of changes to the Corona exporter.

* Undefined bitmap check. The exporter will skip missing bitmaps instead of throwing an error.
* Roughness support. If the exporter can't find a glossiness map it will look for a roughness map and invert it.
* Removed Bump from "Additional Bump". I think the bump map is generated from the normal map, this is causing materials to get really dark. Since it's 2x the same bump.
* The exporter is now dynamic. It doesn't matter if it's an Atlas, Surface or 3D model. Materials will load translucency, AO etc if needed.
* Front/Back map in Diffuse/Glossiness when translucency is loaded. When Quixel start to release front/back maps, I will hook them into the Front/Back map.

EDIT:
Me and Juraj started talking about Corona 1.4 and Megascans.
The original plant is using 1.47 IOR and 1 Level in Corona 1.5
After some quick tests we ended up with IOR 2.3 and 0.2 Level. You can use IOR 2.5 if you want it to be exactly 1.47 as in Corona 1.5.


This is how the plant looks like in Corona 1.4 / 1.5, before fix.



So how did we end up with these numbers ?

The plant is flat on the front, and super shiny at grazing angles.
To balance this out, we increased IOR to 2.3 to boost the front, and clamped the Fresnel with 0.2 Level.

2.3 IOR = 15.52 Reflectivity.
15.52 Reflectivity * 0.2 Level = 3.10 Reflectivity
3.10 Reflectivity = 1.43 IOR.

So IOR 2.3 and 0.2 Level is the same as 1.43 IOR with clamped Fresnel.
This is the result



If you are still torturing yourself with Corona 1.4, give these values a try next time you render!

Here are some examples why you want to use my Specular to IOR LUT.
Left is no IOR map. Right is with IOR map.
Open them in a new tab for best A/B comparison.
(The IOR map has nothing to do with Corona behavior, it's because we have to fake depth)

Look at the cracks





Some materials don't need an IOR map, like this leaf material.

« Last Edit: 2016-08-31, 11:20:24 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-09-06, 11:25:43
Reply #8

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
The latest Megascans Bridge patch includes a Corona 1.4 Exporter using the hacks I mention above.
I went with IOR 2.5 / 0.2 Level to emulate 1.47.
You need to add Glossiness Output fix manually (From Corona Material Converter) !
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-09-07, 20:41:10
Reply #9

Godzil

  • Active Users
  • **
  • Posts: 22
    • View Profile
    • ONE2 architekci
Hi dubcat!! Remember me? :)
I was taking a look at megascans, maybe I will give it a try one day. now I just read...
And you wrote that you've used IOR above 2.0 from time to time. But you did told me before to not use anything above 1.5. Can you explain or send some threads to read about what IOR I am exactlly alowed to use in Corona 1.4 please?

And I see that you are aware what will be implemented in 1.5! Can you also give me some hints about that? Cuz I would still like to keep up with creating PBR shareds in upcomming versions...

And maybe you also have some info about PBR in VRay?

Any help will be fantastic!

2016-09-08, 10:19:55
Reply #10

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Hi dubcat!! Remember me? :)
How could I forget, heheh :P

Quote
But you did told me before to not use anything above 1.5
Almost all Megascans materials are using 1.47 IOR as base IOR, some go down to 1.3 IOR.
Since Corona 1.4 does not dim fresnel and darken albedo, you have to force the fresnel.
IOR 2.5 / 0.2 Level in Corona 1.4 is about the same as IOR 1.47 / 1 Level in Corona 1.5.

I like to think of Reflection Level as an opacity slider for IOR.
You have the IOR layer on top of a black layer, then you change the "opacity" with Reflection Level.
To calculate the "opacity" you have to convert IOR to Reflectivity and multiply Reflectivity with Level.

IOR 1.47 = Reflectivity 3.62
Reflectivity 3.62 * 1 Level = Reflectivity 3.62 = IOR 1.47
At 1 Level you get full "opacity"

Let's try 0.5 level.
IOR 1.47 = Reflectivity 3.62
Reflectivity 3.62 * 0.5 Level = Reflectivity 1.81 = IOR 1.31
At 0.5 you get 50% opacity, and fresnel is no longer white.

So what does this mean?
If Reflection Level is anything else then 1, the value you have in IOR is not the IOR you get.
And on top of that, the fresnel is no longer white.

We use this knowledge to emulate proper glossiness/fresnel behavior in Corona 1.4.
You can not emulate albedo darkening with this little hack, so it will not be a 1:1 with Corona 1.5.






Quote
Can you also give me some hints about that?
In Corona 1.5 you don't have to use any hacks. Set IOR to 1.47, reflection level to 1. Control everything with Glossiness/IOR map.

Quote
Info about PBR in VRay?
Vrays main material is just as bad as Corona 1.4. The only difference is that Vray darken albedo instead of normalizing it like Corona 1.4.
You still have to use the IOR 2.5 / 0.2 trick in Vray GGX.

They are working on VrayAL, it behaves like renderman. I tested a lot of renders back when I made all the megascans exporters. This material was one of the best materials. Everything looked correct out of the box.
The only downside is that IOR map is not working, and there is no Translucency support right now. Only 3 layered SSS.

TLDR; Just download Corona 1.5 and focus on the artistic aspect, and forget about all the stupid hacks we need to do in 1.4.
« Last Edit: 2016-09-08, 10:47:40 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-09-15, 01:18:35
Reply #11

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
These were rendered with Corona 1.5 Daily Build Sep 13 (internal release).
This build is using a new version of PBR Mode.

No "hacks" were used. I exported them from Bridge, applied displacement and hit render.
They almost match the previews on Megascans.se, pretty cool.
25 Sharpness was applied in Photoshop to match Quixels sharpness.

Great work so far Team Corona!

Time is precious lately, so I had to stop the renders at around 9% noise, you just have to deal with it!

Beauty



Clay



Reflection, you can see the IOR map in action, doing it's thing!



Beauty



Clay



Reflection

« Last Edit: 2016-09-15, 02:10:42 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-09-15, 13:26:50
Reply #12

GabaCGStudio

  • Guest
Beauty


hi dubcat,

do you have an trick to getting good lawn / grass displacement? or vector displacement?

2016-09-15, 13:30:54
Reply #13

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
There is none, the illusion falls apart at closing to grazing angle. They don't and won't provide vector displacement maps.

Quixel uses only very rough displacement for contours and all the detail is from normal map. You would need super detailed displacement to simulate something similar and it would still look way worse.
So this is the only way to do it.

It's not supposed to look like scattered grass.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2016-09-15, 18:22:14
Reply #14

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
do you have an trick to getting good lawn / grass displacement? or vector displacement?

What Juraj said. It's all an illusion.

Displacement.



Normal Map



Those combined with AO + Albedo is taking care of the deep shadows.
IOR map is taking care of cavity emulation.

Light is behaving as it should, but it's all flat.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo