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

2018-02-09, 09:00:15
Reply #150

Nejc Kilar

  • Active Users
  • **
  • Posts: 894
    • View Profile
    • My personal website
Great tests @Fluss ! :) I suppose I am late to the party when it comes to realizing that FStorm uses the Beckmann BRDF model. Huh. Thanks for the tests!

2018-02-10, 17:58:58
Reply #151

Fluss

  • Active Users
  • **
  • Posts: 463
    • View Profile
Very interesting the real photograph, too bad it has light bouncing from bellow and it's a little harder to compare the lower area, because it's standing on a white plane.

You are right. That and also the fact that the studio setup should produce way softer shadows than the HDRI used in the tests which should greatly influence the shadow terminator on the sphere. I'm gonna reproduce the setup to see how it behaves in Corona.

Anyway, after a lot of testing and observation, I think the diffuse roughness implemented in Fstorm is kind of weird. It shouldn't affect the diffuse that much, plus it does not affect what it is intended to. It gives a kind of coated material effect on every single shader created.

The PxrDisney shader affects both the diffuse at grazing angles and the shadow terminator, and it's much more subtle. BUT we lose control over the diffuse appearance as it's fully automated and there is no parameter exposed. It seems that they realized that since they have backtracked on that particular point. Indeed, the PxrDisney shader is already "outdated" and has been relegated to the legacy tab in the lastest Renderman version. It's still there but only for back-compatibility. They are now using the PxrSurface shader which is much more complex than the Disney one. The diffuse part is now pure Oren-Nayar. And I personally think it's the way to go.

In fact, I think CoronaMtl is not that far from the perfect shader, it just misses some features here and there.

To me, the perfect shader would probably be a carbon copy of the Alsurface shader + some features of the PxrSurface shader. This is what I'd go for :

_Better diffuse model (Oren-Nayar)

_An additional specular lobe. We will then be able to produce proper coated materials. WE NEED THAT. The CoronaLayeredMtl is.. well it's not a layered material, it's a blend material which is not the same. A proper layered material would allow us to stack multiple specular lobes in an energy conservative way, the top layers affecting the ones underneath.
At that point, with these only two features, the CoronaMtl would offer everything the Alsurface shader does. (minus the choice between Beckmann and GGX microfacets distribution).

I'd then add some nice features from the PxrSurface shader. Some of them are available following two modes, artistic/physical. I'd stick with the physical mode only :

_Layer thickness for the clearcoat: Everything is in the name, it simulates thickness for the additional specular lobe, really cool.

_Iridescence

_Fuziness: Full featured with gain, color, cone angle and bump. Not physically accurate but still nice to have

_Bump To Roughness: Insane feature! Basically,  it can use normal, displacement or even bump maps to affect microfacets distribution and anisotropy, in order to recreate surface imperfections in a way that is less prone to diverge according to the distance and produce more physically correct light interaction. (cf. paper below)

You can refer to the renderman documentation for more info on their surface shader: https://rmanwiki.pixar.com/display/REN/PxrSurface

And I strongly recommend you to read their recent paper on their material pipeline, really interesting: http://graphics.pixar.com/library/PxrMaterialsCourse2017/paper.pdf
« Last Edit: 2018-02-11, 17:06:48 by Fluss »

2018-02-14, 11:30:11
Reply #152

subpixelsk

  • Active Users
  • **
  • Posts: 462
    • View Profile
    • johny.mrazko.visualization
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



Hey dubcat

this shader ball works only when viewing from the front right? other views would be distorted if I am applying it correctly

2018-02-17, 12:33:35
Reply #153

Juraj Talcik

  • Active Users
  • **
  • Posts: 4000
  • Staying home, like I always did. So should you :-)
    • View Profile
    • studio website
Great testing Fluss !!!

Sadly the issue isn't given much attention. It's all or nothing so currently it's volumetrics, and better shader and post-production will be 2020 I warrant a guess :- )
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2018-02-18, 15:54:41
Reply #154

Fluss

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

Hey dubcat

this shader ball works only when viewing from the front right? other views would be distorted if I am applying it correctly

You can try with a simple box, no segments, with UVs -> turbosmooth with multiple iterations -> spherify

Great testing Fluss !!!

Sadly the issue isn't given much attention. It's all or nothing so currently it's volumetrics, and better shader and post-production will be 2020 I warrant a guess :- )

Yes I guess it's not the priority ATM
« Last Edit: 2018-02-18, 16:36:24 by Fluss »

2018-02-20, 17:58:36
Reply #155

dubcat

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

this shader ball works only when viewing from the front right? other views would be distorted if I am applying it correctly

Hey man! Yes, it's only for Corona Material Thumbnail preview or as a preview for your Material Library.

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

I've been taking my Megascans scripts to the next level the past week.
Yesterday I wanted to solve the whole translucency issue. We have a front lit albedo scan and a back lit translucency map scan. There should be no reason why we need to adjust these maps for the material to behave properly. I've solved the issue, and this is how translucency is taken care of in my latest script.

In Corona we have Translucency "Fraction" and "Color.
When Fraction is 0 it's pure diffuse, the material is black when back lit. When Fraction is 1, it's pure Translucency Color when back lit.
Translucency Color gets multiplied by Translucency Fraction.
Currently the script is using 0.5 Fraction to get 50/50. Translucency map is multiplied by 2, since 0.5 * 2 = 1.







As a little side note.
We can't disable IOR with a Corona Color anymore. I noticed this when I was explaining complex IOR.
You can see here that the last 10 degrees are getting darker. 89 degree is 232 RGB.



edit: fixed a typo
« Last Edit: 2018-02-20, 19:58:22 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°)

2018-02-20, 22:33:10
Reply #156

subpixelsk

  • Active Users
  • **
  • Posts: 462
    • View Profile
    • johny.mrazko.visualization
thanks for the reply

regarding megascans, if I would manually tweak the values without script to look correct it is rgb level 2.0 and translucency fraction 0.5 right?

2018-02-21, 00:32:09
Reply #157

dubcat

  • Active Users
  • **
  • Posts: 423
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
regarding megascans, if I would manually tweak the values without script to look correct it is rgb level 2.0 and translucency fraction 0.5 right?
Yep :)

I just found a LUT converter in the newest official Megascans Bridge version by the way. Might be a bit late in the discussion or you already know it...

Hey!
That's my old LUT, it was hand made up to IOR 8 or something like that.
I've attached my latest version that was generated with code, it can remap any RGB value possible :)

edit:
Here is a test render using my improved IOR LUT.

« Last Edit: 2018-02-21, 01:34:41 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°)

2018-02-27, 01:39:40
Reply #158

dubcat

  • Active Users
  • **
  • Posts: 423
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°)

2018-03-06, 15:58:48
Reply #159

dubcat

  • Active Users
  • **
  • Posts: 423
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I found a little hack to emulate how light get whiter in Corona.
We don't get that nice ACES color tint, but it's better than not having the effect.

Default Corona



My new VFB ACES emulation



Default Corona - Yellow Sun "bug"



Fix



I've attached the new settings file.
You only have to adjust exposure to your liking.

But stupid hacks like this wont be necessary if we get proper custom matrix.

Edit Edit:
Added v3 that is "Sun proof".
« Last Edit: 2018-03-06, 23:00:03 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°)

2018-03-06, 18:23:03
Reply #160

vemod

  • Users
  • *
  • Posts: 3
    • View Profile
Or we could just make a stupid hack it at the light source instead :)

No perceptual color difference when viewed at regular exposure but it gets the "correct" overexposure behaviour.
I couldn't be arsed to replicate the grid completely, but you guys get the point.

Photoshop borked the colors as well, so try it with the supplied HDR values in a corona color that you plug in to the texture slot of a light.

It's generally a good idea to stay away from pure colors in CGI even when it comes to lights it seems :)

2018-03-09, 01:58:26
Reply #161

dubcat

  • Active Users
  • **
  • Posts: 423
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
To be honest I can't remember if I have posted this before, but people have been asking for it.
I have included my "Apply Image" script that makes a 1:1 highpass of your texture. This can be used on any texture, I mostly use it on diffuse and glossiness to make real time adjustments in Corona.

All the blending modes are in sRGB! (Something that is Corona exclusive for now!)

Open your texture map in Photoshop and run my attached script.
You will get this result.

Hide the bottom layer "albedo color" and save the "apply image high pass" map as a png or tiff.



Create a setup like this, where you sample the bottom layer as "Albedo" color.



You can make a glossiness variant like this
But I usually normalize my glossiness map in Photoshop.



Just remember that normal materials does not go bellow 0.4 glossiness. It is great that we have the opportunity to go down to 0. But just keep in mind that everything bellow 0.4 is for special occasions. If you have to fake depth, use an IOR map (Reflection Level clamp your IOR).
If you don't understand how how reflection level work, think of it like this. You have a black background layer in Photoshop, you have your IOR as a white layer above. If you reduce the "reflection level", its like you are reducing the opacity of the white layer in Photoshop. 89 degree will never be white!
« Last Edit: 2018-03-09, 04:21:08 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°)

2018-03-09, 11:05:19
Reply #162

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 6401
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Thanks a ton for you invaluable input to community dubcat!

I have a question about IOR map. What would be correct way to obtain such map? Let's say if i'd invert height/displacement map and ajust levels, so majority of colours would be at 170 RGB and cracks/identations would be white, approaching 255 RGB, would that make good IOR map?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-03-10, 21:55:40
Reply #163

dubcat

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

You have to make an AO map from your Normal map. There are multiple bakers out there that support normal map.

Substance Designer Baker with default settings.



Substance Designer Node with default settings.



Quixel dDO with default settings.



I'm sharing my AO to Specular action.
I have split the action into 3 parts, so I can tweak values. No AO map is the same.
Remember to run them in the correct order!



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

2018-03-11, 14:50:22
Reply #164

A515

  • Active Users
  • **
  • Posts: 16
    • View Profile
    • www.arch515.com