Author Topic: dubcats secret little hideout  (Read 264282 times)

2017-10-31, 16:38:57
Reply #75

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Every now and then I get Megascans questions. I'm posting this here, so I can link to this post.

-== HDRi Setup ==-

Megascans use a HDRi named "Pisa courtyard nearing sunset, Italy" as default
You can get this HDRi for free here http://gl.ict.usc.edu/Data/HighResProbes/

If you want to mimic the Megascans preview images, set "U Offset" to -0.57
Remember to set "U Tiling" to -1, since 3dsmax project from the outside and flip our HDRi.



-== Mesh Setup ==-

Create a 2x2m Plane and tile it like this



-== Material Setup ==-


In this example I will use "Soil_Mud_pjuph20"

After you have extracted the .zip file with Bridge, you can double click the preview image and it will take you to the material folder.

Open Albedo and AO in Photoshop. Copy the AO map above Albedo and change the blending mode to "Multiply". Save it as AlbedoAO.



Megascans is made for PBR engines that use Specular.

0 Specular = 1 IOR
0.5 Specular = 1.5 IOR
1 Specular = 1.79 IOR

Since Corona is based on IOR, we have to convert the Specular map to IOR.
I've made a "Specular to IOR" LUT that gets shipped with Bridge, but it's kinda hidden.
You can find it here "C:\Program Files\Quixel\Megascans Bridge\Bridge_Data\Support\SpecularToIOR.CUBE"

Open the Specular map in Photoshop
Change the mode to 16bit
Add a "Color Lookup" layer and select "SpecularToIOR.CUBE"
Hit CTRL + Shift + E to flatten the layer stack
Change the mode back to 8bit and save it as IOR.




Inisde the material folder there is a ".json" file. Open this file in Notepad++ or whatever you use.
Search for "Height"
In this example the Height value is "0.042 m", convert this value to cm.
Our displacement height should be 4.2cm.



Load the maps like this.
"Flip Green" inside CoronaNormal.



Depending on how you want the displacement to behave, you can use Min 0 Max 4.2. Or Min -2.1 Max 2.1



-== Camera Setup ==-

If you want to mimic Megascans, you can place your camera like this.
24mm Focal Length.



-== Render Setup ==-

Set size to 1450x816.
Set "Secondary solver" to "Path  Tracing"
Reduce "Screen size (px)" until your pc start to smoke, then dial it back a little.



-== VFB Setup ==-

Set EV to 2.61 if you are using the same HDRi as me.
Megascans love their Vignette, so set it to 0.8
They also love to overdrive Sharpen, so set it to 10 !!!



-== Test Render ==-

Beauty



Direct



Reflection



Displacement



Displacement + Normal

« Last Edit: 2017-11-01, 00:10:04 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2017-10-31, 18:49:54
Reply #76

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
That's very interesting. I always thought that specular map is optional to plug into reflectivity slot, just to make occluded areas less shiny. I wonder how much of a difference it makes when converted in to IOR and plugged in to according slot?

By the way, is there some other way to convert specular to IOR, for those who doesn't have megascan bridge?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-31, 19:04:51
Reply #77

hkezer

  • Active Users
  • **
  • Posts: 34
  • kezerco
    • View Profile
Hey dubcat, I want to ask you a kind of technical question, which I cannot figure out exactly.

I have been using your LUTs almost like always :) then I wanted to try, https://masteringcgi.com.au/product/3d-collective-professional-filmic-luts/ this ones from Adan.

And there were 2 folders, sRGB and Linear. And they say, I should use sRGB in corona VFB, and in photoshop and vray I should use Linear. but I have no idea why. Can you a little explain the reason and how can I get the most out of it?
http://kezer.co

co-founder @ ivaBOX

2017-10-31, 20:19:05
Reply #78

dubcat

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

is there some other way to convert specular to IOR, for those who doesn't have megascan bridge?

I'm attaching my old LUT that is shipped with Bridge, and a new version that I generated a few weeks back.
The new version was generated with code and can remap any value. The old version was made manually and can go to IOR 8 or something like that. Photoshop 2018 doesn't like 3dl though.

This is without the IOR map

Beauty



Reflection, eeeeeww nasty.



Can you a little explain the reason and how can I get the most out of it?

A LUT looks at specific locations and then remap the RGB value to a new value. sRGB has a gamma curve, so you have to use LUTs that are made for that gamma.

Corona use sRGB
Photoshop use sRGB for 8/16bit and Linear for 32bit.

Here is a quick demonstration, so you can see the difference. Both use the same sRGB LUT 100%.



If you only have sRGB LUTs, but want to use them on a linear image, you can use this dirty little hack.
If I had done this to the Linear example above, it would look identical to the sRGB example.

« Last Edit: 2017-10-31, 23:10:38 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2017-10-31, 22:27:23
Reply #79

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi Dubcat. Is there anyway to convert secular to IOR inside Max/Corona? I tried using a Corona output map with your LUT (cube), and got something decent, but not quite right. Can this be done somehow?

2017-10-31, 22:32:45
Reply #80

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Thank you very much! Do you know, how they come up with that specular/IOR map? Everyone is telling that PBR workflow is ~1,5 IOR for dielectrics and reflection all the way to the max, but from your examples it's pretty obvious, that some variance in IOR, does wonders to final result.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-10-31, 23:00:30
Reply #81

dubcat

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

and got something decent, but not quite right

This!
I actually asked Ondra a week or two ago if there was a bug inside CoronaOutput. Because the result is always off by a few RGB, and these IOR values are super sensitive.
I have tried to load the bitmap as 1.0/2.2, convert in and out of gamma. The values are always a little off.

Do you know, how they come up with that specular/IOR map?

Open one of the specular maps inside Photoshop as 32bit, sample the values



In this case it is 0.0358

0.0358 * 100 = 3.58% Reflectivity
(1+SQRT(0.0358))/(1-SQRT(0.0358)) = 1.47 IOR

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

2017-11-01, 00:02:33
Reply #82

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Thank you :) So far my best converting result inside Max/Corona is this:

- Load Gloss map with gamma 2.2, and put this into a Corona Output Map
- Set "Affected by tonemapping" ON
- Load "Specular to IOR.cube" LUT, with opacity 1
- Set gamma to 0,5 (this value is purely by eyeballing)

Will do some more testing later...

2017-11-02, 16:31:46
Reply #83

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
This setup generates proper IOR maps
Enable "Affected by VFB"

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

2017-11-02, 22:03:06
Reply #84

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Thank you so much. I see now that I wrote "gloss map" instead of "specular map" in my previous post :(

I've tried your setup, and if EXposure is anything else than 0 (with a calibrated HDR) then I only get a good/realistic result when "Affected by VFB" is activated. Probably need to test a bit more...

Thanks for sharing your knowledge:)

2017-11-02, 23:59:52
Reply #85

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I've tried your setup, and if EXposure is anything else than 0 (with a calibrated HDR) then I only get a good/realistic result when "Affected by VFB" is activated.

Thanks. I only tested on EV 0.
Updated my last post.

edit:
We really need to get this sorted, there is no reason why EV should impact a material map :|
« Last Edit: 2017-11-03, 06:23:02 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2017-11-03, 10:00:12
Reply #86

Jpjapers

  • Active Users
  • **
  • Posts: 1644
    • View Profile


These radius settings are at 1k, multiply K by whatever you are using.

This is cool.
Just so im understanding correctly then, how would you calculate the settings for a 4k image? Youd just multiply those numbers by 4?
Or am i misunderstanding completely?
Show your working please :D
« Last Edit: 2017-11-03, 11:59:11 by jpjapers »

2017-11-17, 03:58:39
Reply #87

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
just multiply those numbers by 4?

I don't know if the values scale linearly with render size, we need someone from the dev team to answer this. I just use the settings as a place holder in IR, and then do the real sharpening in Lightroom.

-----------------------

-5.65 EV is the value for default peak sun / corona sky. If you guys want to calibrate your HDRis.

-----------------------

edit:

Sharpen amount 10 / sharpen radius 1.0 seem to be consistent with Lightroom 150.
« Last Edit: 2017-11-17, 04:13:20 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2017-11-24, 23:43:43
Reply #88

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I was tired of the default material sphere that stretch materials all over the place. Here is a little guide on how to make a good looking material sphere.

Create a GeoSphere 50cm radius, since most scans nowadays are 1 meter.
128+ segments.
Type "Octa"



Throw a "Spherify" on there just to be safe



Add a "UVW Map" "Planer" mode



Default Sphere, nasty



Box turned in to a sphere



GeoSphere with Planar

« Last Edit: 2017-11-25, 02:13:59 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2017-11-25, 19:48:11
Reply #89

dj_buckley

  • Active Users
  • **
  • Posts: 871
    • View Profile
Jeez this thread is difficult to follow - to many subjects being discussed and replies to question multiple posts up without quoting the original question.  My head is gonna explode.  It's like opening a WhatsApp group after not following it for a year haha.  Sounds like good stuff though