Author Topic: Megascans/Bridge Exporter Updates + Workflow  (Read 75082 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

2016-09-15, 20:18:40
Reply #15

GabaCGStudio

  • Guest
Those combined with AO + Albedo is taking care of the deep shadows.

can you show workflow of creating this maps? using shadermap or pixplants or something like this?

2016-09-21, 07:00:54
Reply #16

subpixelsk

  • Active Users
  • **
  • Posts: 463
    • View Profile
    • johny.mrazko.visualization
Hi dubcat

what is the correct workflow/values for reflection in 1.5 dailies and megascans? do we still need to use LUT for glossiness maps? and how about reflection color/level? should it stay at full white and default 1.0?

Thanks

2016-09-21, 17:36:21
Reply #17

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
can you show workflow of creating this maps?[/quote]
Who knows whats going on behind the secret walls of Quixel. There are a few papers online on how to extract roughness, height, normals from photos. No idea how they calculate the specular maps. Those are F0 values in linear.

what is the correct workflow/values for reflection in 1.5 dailies and megascans? do we still need to use LUT for glossiness maps? and how about reflection color/level? should it stay at full white and default 1.0?
- Download my latest Megascan exporter, send to 3ds Max.
- Open the specular map in Photoshop and apply my Specular to IOR LUT in 16bit mode.
- Load the new IOR map in 3dsMax with gamma 1.0.

If you want to do everything manually.
Leave Reflection Level at 1 and 255 RGB.
Plug and play the rest of the maps, no hacks needed :)
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-09-23, 21:33:49
Reply #18

Majeranek

  • Active Users
  • **
  • Posts: 114
    • View Profile
If you want to do everything manually.
Leave Reflection Level at 1 and 255 RGB.
Plug and play the rest of the maps, no hacks needed :)

Tell me if I'm thinking correctly. When building shader from scratch I need:
- correct diffuse map
- reflection leaved at level 1.0 255rgb
- IOR (gamma 1.0) and glossiness map

I assume that by IOR map corona engine "knows" what kind of reflection strengh is applied. How do you make a difference between metals and non-metals? And how to prepare correct IOR map?
marjoramstudio.com Website
be.net/filipmalecki Behance Portfolio
Instagram Instagram Profile

2016-09-23, 23:48:39
Reply #19

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Quote
- correct diffuse map
- reflection leaved at level 1.0 255rgb
- IOR (gamma 1.0) and glossiness map
Correct :)

Quote
I assume that by IOR map corona engine "knows" what kind of reflection strengh is applied.
And how to prepare correct IOR map?
I don't know how they sample the IOR from materials. But I can show you how the LUT works, and how you can make your own IOR maps if you only know what IOR you want.

Specular to IOR

#1 Convert a specular map to 32bit in Photoshop and sample a value.
      In this case the value is 0.0370



#2 Open my secret little IOR spreadsheet and input the value you just sampled. This will tell you the IOR value. (Just ignore all the stuff on the right side of the spreadsheet, that's stuff I use to generate LUTs).



IOR map to IOR

When it comes to IOR maps. Corona does this (1 / IOR map).

#1 Lets say this is your IOR map



#2 Convert it to 32bit

1 / 0,66 = 1,51 IOR



This is what my IOR LUT is doing behind the scenes. But now you know how to do it yourself.

Quote
How do you make a difference between metals and non-metals
Megascans doesn't have metals yet. I will update the Corona Bridge exporter when they include metals.

Head over to my Substance Painter 2 thread for PBR metal.
« Last Edit: 2016-09-24, 00:12:57 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-09-24, 00:17:30
Reply #20

Majeranek

  • Active Users
  • **
  • Posts: 114
    • View Profile
Thanks for the explanation! It's really helpful.

Based on what you wrote. When I want build a plastic shader with unified reflection I can still use [1.0 reflection 255 rgb and 1.4-1.6 IOR] or [1.0 reflection 255 rgb and CoronaColor map with Solid HDR color set to 0,02-0,06 in IOR map slo]" and both of those will be pretty much the same, right?

Is it still correct in 'PBR Mode' to use  Reflection Map 1.4-1.6 IOR for shaders which don't have unified reflection like concrete, wood, etc.? Or now we must switch to IOR map method? Or maybe I'm completely wrong and things like concrete, etc. have unified reflection?

That PBR is giving me sleepless nights...

marjoramstudio.com Website
be.net/filipmalecki Behance Portfolio
Instagram Instagram Profile

2016-09-24, 00:29:33
Reply #21

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Quote
1.0 reflection 255 rgb and 1.4-1.6 IOR
yes

Quote
1.0 reflection 255 rgb and CoronaColor map with Solid HDR color set to 0,02-0,06 in IOR map slo]"
0.66 Solid HDR ;)

IOR = 1 / IOR Map
IOR Map = 1 / IOR

1 / 1.5 = 0.66
1 / 0.66 = 1.5

IOR map is the way to go since you don't clamp the fresnel value. Too bad we need to do math, would be simpler to just load a .hdr/.exr with 1.5 value. But you know, why should 3D stuff ever be simple.

edit:
I just want to add.

Glossiness should take care of most of the fresnel changes. If you have to make big changes to the IOR map, it mostly means that you are compiling different materials into one single material. Try to split the materials up and blend them. Like "Pure Material", "Dirt", "Water" etc.

IOR map shines when you have to fake depth, like grass materials. Glossiness can't do that.

Quote
PBR is giving me sleepless nights
PBR should make your life easier.
Leave IOR at 1.3-1.5.
Control everything with Glossiness.
If you have to fake depth, use IOR map. If not, just leave it alone. (In most cases)
Split materials instead of compiling them into one.
Keep it simple and nice :)
« Last Edit: 2016-09-24, 01:04:33 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-09-24, 06:12:45
Reply #22

subpixelsk

  • Active Users
  • **
  • Posts: 463
    • View Profile
    • johny.mrazko.visualization
I am now confused a bit - specular maps converted to ior are used for ior slot but which one should be used in glossiness slot ? Inverted roughness ? Or something else ?

2016-09-24, 10:15:03
Reply #23

Majeranek

  • Active Users
  • **
  • Posts: 114
    • View Profile
Quote
PBR is giving me sleepless nights
PBR should make your life easier.
Leave IOR at 1.3-1.5.
Control everything with Glossiness.
If you have to fake depth, use IOR map. If not, just leave it alone. (In most cases)
Split materials instead of compiling them into one.
Keep it simple and nice :)

Now when you explained everything and I know how it works it should be easy. Thanks!
marjoramstudio.com Website
be.net/filipmalecki Behance Portfolio
Instagram Instagram Profile

2016-09-25, 20:28:48
Reply #24

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
But which one should be used in glossiness slot ? Inverted roughness ? Or something else ?
Yes, check invert in the output section of the roughness map :)
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-10-13, 17:23:18
Reply #25

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
New Corona Exporter update!
If there is a fuzz map available, the exporter will generate my Unreal 4 FuzzyShading port.
Core Darkness, Edge Brightness and Power are labeled, so people know what to adjust.

This is what you get

             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-10-15, 20:25:24
Reply #26

SmurfN

  • Active Users
  • **
  • Posts: 38
    • View Profile
so what download settings for materials is the best to use? specular + gloss maps?

2016-10-15, 21:17:46
Reply #27

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
so what download settings for materials is the best to use? specular + gloss maps?

For Corona yes :)

I've been chatting with one of the developers. They will include my Specular to IOR LUT in one of the Bridge updates. We can use the new Corona LUT map to auto convert specular to IOR :D
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-10-17, 17:25:18
Reply #28

ktulu

  • Active Users
  • **
  • Posts: 33
    • View Profile
Hey Dubcat,
first, thanks a million for developing this script - it works like a charm and is a real time saver!

I was just wondering, why doesn't the script load bitmaps as CoronaBitmaps but regular max ones? Is there any reason why you chose not to do it?
I know I could run DeadClowns script and batch convert them after the import process, but this is one step I would like to do without if possible.

Cheers

2016-10-18, 09:09:12
Reply #29

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I tried CoronaBitmap when it was new, but I saw no reason to use it over Bitmap.
Did a test now to see if there was anything new, CoronaBitmap still give me 5-15% slower render time.

But if you guys really want CoronaBitmap, I can make the change.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-10-18, 09:36:22
Reply #30

ktulu

  • Active Users
  • **
  • Posts: 33
    • View Profile
Oh, good to know. I was under the impression that CoronaBitmap would speed things up, but I've learned to trust your tests now.
Will stick to regular Bitmap then.

2016-10-18, 10:02:54
Reply #31

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
I would be interested in a scene where corona bitmap gives worse performance than 3dsmax bitmap ;)
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-10-19, 18:00:15
Reply #32

ktulu

  • Active Users
  • **
  • Posts: 33
    • View Profile
I went ahead and made a very quick comparison. Sample material was Rock 01 from real displacement textures volume one, which I have organized in Megascans Bridge library hence they get pushed to max via Dubcat's script.

I did two batches:
1. All maps in 1K resolution, Blur 1,0, Pass limit 25
Bitmap: 02:22
CoronaBitmap: 02:27

2. All maps in 8K resolution (except displacement 4K), Blur 0,01, Pass limit 25
Bitmap: 02:53
CoronaBitmap: 02:30

Is it the resolution, or the blurring that is responsible for the performance hit?

Edit: Added a screengrab of the shader tree...

2016-10-19, 18:48:14
Reply #33

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8778
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I suspect blurring. Back in the days of alpha, the difference in render time between different blurring values was much more severe. AFAIk that was one of the resons why CoronaBitmap was introduced.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-10-19, 18:58:24
Reply #34

karnak

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 76
    • View Profile
A good way to find that out would be to change 1 variable at the time. :)
Calculate a (1k, blur 1) (1k, blur 0.01) (8k, blur 1) (8k, blur 0.01) and then compare the results.
Corona Academy (May 2017)

2016-10-20, 11:28:31
Reply #35

ktulu

  • Active Users
  • **
  • Posts: 33
    • View Profile
OK, so I redid the 8K tests.

1. 8K resolution (except displacement 4K), Blur 1,0, Pass limit 25
Bitmap: 02:57
CoronaBitmap: 02:57

2. 8K resolution (except displacement 4K), Blur 0,01, Pass limit 25
Bitmap: 03:29
CoronaBitmap: 02:53

With default Blur value set to 1,0 the difference is negligible (or there is none). The moment one lowers the blur value to get a crisper image CoronaBitmap starts to shine.
Notice the difference in Rays/s amount:
6.013.059 (CoronaBitmap)
5.312.145 (Bitmap)

Now, on another note. Why does the same scene, with the same settings render 20-30 seconds longer than yesterday will remain a mystery to me.

2016-11-14, 11:36:39
Reply #36

JakubCech

  • Active Users
  • **
  • Posts: 126
  • jakubcech.net
    • View Profile
    • jakubcech
Hi Dubcat,
not sure if this is the place to post this issue but I think if its suitable you can forward it to Quixel team as you do the scripts for them.
I bought this huge 4K leaf (one big leaf + stem) and noticed when I exported textures to Corona 1.5 with your latest script I am getting some artefacts produced by converted displacement map (EXR option used for export):


If I switch it with the raw untouched EXR (leaving your Mix node untouched), problems are solved:


The untouched exr does the same thing but smoothly and has lower  file size as well (36MB vs 96MB).

Jakub

2016-11-14, 14:49:29
Reply #37

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
To me it looks like wrong bit depth. But maybe let's wait for Dubcat's findings...
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-11-14, 19:05:58
Reply #38

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Hey

Megascans displacement maps are not real floating point maps.

These are the official remapping values.
Quote
White = 10 cm, Gray = 0 cm, Black = -10 cm

We need to remap 0 = -10 / 127 = 0 / 255 = +10

This can be done in the "Displace modifier" by enabling "Luminance Center".
Corona Mtl does not have this feature, so I played around with Output/Mix map to remap the values. Looks like it didn't turn out that well :P
Re-download the script from Google Drive.

We really need a "Luminance Center" option in Corona.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-11-14, 19:25:24
Reply #39

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8778
  • Let's move this topic, shall we?
    • View Profile
    • My Models
If you set displacement min level to -10 cm and max level to 10cm it should work as intended without any modification to texture. Unless i misunderstood something.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-11-14, 19:37:24
Reply #40

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
That's what I reverted back to in the latest version.
There was a reason why I made the mix map instead, but can't remember.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2016-11-16, 16:47:46
Reply #41

JakubCech

  • Active Users
  • **
  • Posts: 126
  • jakubcech.net
    • View Profile
    • jakubcech
Thank you.
I see by using script the specular map is not used at all - why is it so?

2016-11-16, 16:58:41
Reply #42

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
The specular map is containing the reflectance values, you need to convert these values to IOR.
If you measure the specular maps in linear floating point, you will see that all the megascans materials have a base reflectance of 0.0358 = 3.58 reflectance = 1.47 IOR.

When I get some spare time, I will recreate my Specular to IOR LUT to work inside CoronaOutput.
This new LUT will most likely be bundled in Bridge, and will be applied automatically with the script.
For now you have to apply the LUT inside Photoshop and load the new IOR map as gamma 1.0.

Edit:
My sheet link
IOR spreadsheet
« Last Edit: 2016-11-16, 17:16:08 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2017-04-27, 20:52:13
Reply #43

Max Mucko

  • Users
  • *
  • Posts: 2
    • View Profile
Hi, guys!

I'm having a bit of problem with the Megascans Bridge exporter and the 3d assets in 3ds max.
I'm attaching different renders with different material settings for the stone object. The object is from the meadow pack from quixel and is a high poly ( 1mil ) fbx object imported from Bridge through Dubcats exporter! I don't think I am doing the job as I should ( I just leave the default exported material as it is after exporting it from Bridge, but the scans do not end out like they end on Quixel website. ) Please let me know if you find out what I am doing wrong, it would be of greatest help!

Attachment 01 - default geometry export from bridge with default material settings, Attachment 02 - material default settings

Attachment 03 - object with default displacement checked, Attachment 04 - Material settings with displacement

Attachment 05 - object with bump set to 10, Attachment 06 - material settings of bump at 10

Also tried applying a displace modifier but the result does not end up well although I tried to use luminance center at 0.5 as people mentioned.

Much Thanks for the help.

Max

2018-07-21, 05:27:46
Reply #44

GVRuslan

  • Users
  • *
  • Posts: 2
    • View Profile
hey guys!
where i can find maxscript.ms from megascans?