Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] General Discussion => Topic started by: melviso on 2014-10-06, 21:43:22

Title: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-06, 21:43:22
I have been reading up a lot on surface details and how that affects how glossy/blurry reflections become including brushed surfaces. I decided to experiment by using only bump or displacement maps to influence how blurry reflections can become but I have noticed I still need to enter a value in the glossiness to get the desired effect. I am guessing the bump/displacement details are not tiny or fine grain enough or Corona only renders with glossiness parameters specified?

EDIT: Seems a glosiness map or surface roughness map is required to get the end result. Seems bump maps cannot be used to specify surface roughness or glossiness using Corona.
Title: Re: Corona- Surface details and glosiness??
Post by: juang3d on 2014-10-07, 11:59:18
Why would you like to modify glossiness using bump when you have a glossiness slot?

In reality the glossiness is provoked byt the surface imperfections, so if we have a perfectly polished surface with have a clear reflection, if we have a completely chaotic and imperfect surface we have no clear reflection, but in 3D things are simulated, so while you can modify the reflection using bump, of course, you won't get the same effect as using glossiness because it is a simulation, so surface imperfection won't give you the "correct" result just by itself, the actual bump it's a simulation also, so it won't behave as real surface imperfection.

This is how I understand all this, maybe i'm wrong in anything, if it's so please devs correct me!

Cheers.
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-07, 12:05:24
Well it comes more to the fact that bumpmap just doesn't simulate that kind of microscopic detail that would affect the roughness but his concept isn't wrong in theory. But in practice it won't work correctly for most renderers :- )

{for example CryEngine integrated very different kind of PBR compared to Unreal4/Disney, and paired roughness map to normal map (it resides in alpha channel and thus shares same resolution and detail)}

Bump is best kept to "small" detail, like 1-2mm, beyond that it's normal map/displace and bellow glossiness slot.
Title: Re: Corona- Surface details and glosiness??
Post by: juang3d on 2014-10-07, 12:13:44
Great explanation Juraj :D

BTW this thread should go in the help forum I think :)

Cheers.
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-07, 16:46:58
Well it comes more to the fact that bumpmap just doesn't simulate that kind of microscopic detail that would affect the roughness but his concept isn't wrong in theory. But in practice it won't work correctly for most renderers :- )

{for example CryEngine integrated very different kind of PBR compared to Unreal4/Disney, and paired roughness map to normal map (it resides in alpha channel and thus shares same resolution and detail)}

Bump is best kept to "small" detail, like 1-2mm, beyond that it's normal map/displace and bellow glossiness slot.

Interesting, Juraj, So how far would u go using normal map against displacement map for detailing. I did notice Corona doesn't render glosiness with respect to displacement map as well. Guess thats what glossiness and reflection maps are for since its not like the real world but I do feel reflection and glosiness as well as bump/normal should be tied to one map that defines the surface roughness. That would make materials more similar to the real world.

 Once u can get ur materials surface right, the rest should be easy to set up. I am still trying to figure out what makes a material reflective or not. Its defintely not the surface roughness but the amount of light it reflects back. But I am guessing if a material is very smooth on a microscopic level it reflects more light compared to cotton which is very rough so it absorbs more light rather than reflect??
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-07, 17:37:10
Not completely, rough surface 'scatters' light instead of reflecting it back in specular direction, up to point where it's pure diffuse reflection (completely rough-matt surface---)lambertian shader).

But effectively in rendering unless the shading model is built to rely completely on 'roughness' parameter it just doesn't behave....that well. So what you do, in Corona (or similar renderers) you manually lower the reflection the rougher (lower glossiness) it is,
but you can't do it sufficiently through bump/normal/disp.

In practical terms I use it like this:

Micro-level= Only Glossiness slot, for metals, I even rarely use bumps, and when I do, it's just for heavier scratches, not the tiny fractures.
1-2mm= Bump map---) Carpets,Fabrics,etc.. Some of these materials are so rough that their specular component is like non-existent so you might as well simulate it purely through 0 reflection and only diffuse with fallof for some self-shading.
1-10mm=Normal map---)Foliage, rocks,etc... Basically when it is impractical (like always...) to use displacement, but I still want 3D/Relief feel for reflection. It basically just alters the appearance of the large part of geometry, you still have to use glossiness/reflection to set your specularity.
1cm+ = Displacement---) For whatever else.

Each of them can simulate roughness slightly to some point but that microdetail is mostly filtered away so the concept doesn't work that way.
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-07, 17:47:50
hanks for sharing some of ur knowledge. just checked out ur portfolio work.They are very very good. Hope u wouldn't mind if I ask u some technical questions from time to time.
I think I would be using normal maps from now on.I noticed ur fabrics look very rough texturewise. So u use a fall off node with a darker and lighter version of the same texture for the diffuse slot?
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-07, 17:55:16
Thanks for sharing some of ur knowledge. just checked out ur portfolio work.They are very very good. Hope u wouldn't mind if I ask u some technical questions from time to time.
I think I would be using normal maps from now on.I noticed ur fabrics look very rough texturewise. So u use a fall off node with a darker and lighter version of the same texture for the diffuse slot?

Yes. I plan to show tutorial on describing the various curves you can use on that but I don't have time right now, and I need to finish big project but after that I'll get to it.
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-07, 18:00:30
Noted. Looking forward to it. Thanks for the pointers.I am thinking of just using only normal maps even for tiny details and ditching bumps all together.Displacements maps makes sense the way u use them. Will start using this in my workflow.
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-09, 16:48:26
I have been reading more about glossy maps and I need some explanation about it. From what I understand glossy maps are used to simulate surface roughness. I am now finding out it has to do with the width of the specular highlight/reflection map. Black means the width is wider while white means the highlight will be tighter.So say u have a monochrome noise map with high contrast of black and white, how does that work? i am supposing white areas mean glossy and black areas clear reflections or  white areas will have pointy/tighter highlights while grey or darker areas will have broader highlights? I am thinking the latter is the more accurate one while u specify in the corona material the glossiness using the parameter between 0-1?

Or does this center on the range between black and white pixels in the map and that determines whether a surface is glossy or not.
Title: Re: Corona- Surface details and glosiness??
Post by: romullus on 2014-10-09, 16:53:21
I have been reading more about glossy maps and I need some explanation about it. From what I understand glossy maps are used to simulate surface roughness. I am now finding out it has to do with the width of the specular highlight/reflection map. Black means the width is wider while white means the highlight will be tighter.So say u have a monochrome noise map with high contrast of black and white, how does that work? i am supposing white areas mean glossy and black areas clear reflections or  white areas will have pointy/tighter highlights while grey or darker areas will have broader highlights? I am thinking the latter is the more accurate one while u specify in the corona material the glossiness using the parameter between 0-1?

One cannot go without another. Highlights is just reflections of bright light sources. So, tight highlight is glossy reflection of bright light and broad one is blurry reflection.
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-09, 17:07:30
One cannot go without another. Highlights is just reflections of bright light sources. So, tight highlight is glossy reflection of bright light and broad one is blurry reflection.
So say u have wood that has a glossy surface. For a surface to have blurry reflections it means on a microscopic level its rough. Unlike glass or metals, their surfaces are smooth, sometimes brushed which means their surface are smooth yet brushed causing anisotropic reflection.So how best would one do this in corona for wood for example?
Would using a noise map of dark grey be sufficient or it would be more towards white for the glossiness map? I am a bit confused what values of grey are appropriate to use.
Reflection maps  are quite clear enough as they specify the color and intensity of a surface's reflection.I am guessing glossiness is even more important than reflection maps?To get a surface roughness down the way it is in the real world,would it be best using a reflection map as well. Which one takes more priority than the other?
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-09, 17:17:40
Glossiness map. In pure PBR approach, specular map would be unecessary outside of mask for lerping or metals, but in Corona and similar renderer you ought to use both for best results. Still, it's glossy that takes priority for variation.

In glossy workflow 1=RGB255, so white parts of texture will be "glossy" (super stupid and innaccurate name...), sharp highlights with clearly readable reflection and black will make the surface appear rough/matte, with wider, weaker highlights and unreadable reflection.

Regarding wood, wood does actually often have anisotrophy, dictated by grain but in most render engines you set this with anisotrophy paramater, bump/glossy map alone would not create the effect sufficiently. It's rather subtle often, better not overdo unless you have clear reference that you follow.
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-09, 17:47:59
Okay.That explained it better. Thanks Juraj.
 I am hoping somebody makes a corona shader that's more physical based with only diffuse,roughness,bump,displacement and self illumination. There shouldn't be need for glosiness and reflection slots. Even more physical based would be just diffuse,bump,displacement and self illumination.Roughness should be determined by bump and displacement of ur materials. I am guessing that has not been achieved yet.
I do have a lot of respect for software designers. What they do isn't easy.We will all have to manage what we have for now.
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-09, 18:09:40
The PBR (Disney based with metalness attribute) shader sorts of does the second thing in games interpretation (like UE4) though. 'Roughness' is really meant only for micro surface variance, something that could really be lots of high-frequency detail, while bump slot (in game engines often left purely just for Normal map) is meant for the low-frequency slightly different detail (very low relief, or bigger scratches, dents,etc, details that don't necessarily change the microscopic structure of material but are nonetheless very visible by our eyes). I too find it very handy.

But it's fine to achieve the same but it's more eye-balling and more tweaking with Corona. It's just important to not overdo things (like super strong bump map containing every detail). Always think of where the details should go (Darker diffuse appear more reflective, so use that not only pure reflectance channel, Reflectance channel can be used as mask for non-reflective parts (like where dirt/grit resides), Glossy should contain the variance between matt and specular parts, Bump should have detail noticeable by eyes, like big scratches or fabric structure,etc..).

When I do materials I always think of 'Bertrand's rule' : "Once I come with something I like, I tone it down". (not that I am sucesful doing it :- D but I try to keep it in mind)
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-09, 18:59:27
True. I was actually thinking maybe a shader with layer nodes like in Mudbox and ZBrush. With Diffuse, bump and Displacement slots. U could have Bump slot having layer nodes where u can layer one map on top of the other and control their strengths, likewise Displacement. For scratches and dirt areas that are not reflective u use very rough bump or normal maps.That way ur materials look exactly like the real world.
This will enable artists understand materials better and achieve realism the proper way.
I just read some stuff on the Disney PBR. It has up to 10 parameters.It does have specular and specular tint. I supposed the shader is centered more on cartoony graphics rather than photorealism?I do find it interesting that their roughness parameter controls diffuse and specular response. Thats awesome. I didn't really get the whole graph and numbers thingy though.
Btw, Juraj, how do u preview or test your materials when finetuning ur maps? Do u render the whole image or u pick a part of the image and render. I have heard some people use viewport shaders to get their materials right but I have always had problem using this technique.Viewport shaders hardly give u accurate results. I am curious how u go about doing this.
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-09, 19:15:52
I get the basics inside material editor, that's the great with Corona's rendere mat preview. It's not super accurate because it has weird large Area lights that make gauging proper glossiness very hard but, it does the job well.
But then I test the material in real-conditions, where I intend to use it in scene, or item I plan to use it on. Because you don't know if your material behaves like it should unless it's in proper, controlled environment.

For example, my most complicated material was Corten or rusty steel. I had like 10 photographies of how it was used in space I recreated and it always behaved differently, with sun, no sun, interior, exterior. So I always did a short series of test renders in every condition to see if the behaviour matched. Artificial material scene would not tell me that.

Regarding the Disney's parameter amount, I think they simply wanted faster control over layered speculars (tint, thin film, sheen,etc..) without the need to manually create this layers as Blend material. If you use them, you have them exposed, if you don't need them, don't touch it. But it's there, easy to use directly with 0-1 artistic control. Easy to understand, flexible to work with. No, it's not for Cartoons :- ) The stylization or style, doesn't matter.
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-09, 19:55:59
Noted.Thanks again,Juraj.
Would anyone know if Corona devs intend to introduce new alternative shaders soon?
Title: Re: Corona- Surface details and glosiness??
Post by: borisquezadaa on 2014-10-09, 20:19:34
Hi guys... just to add that you can create any shape you want for the material editor using any ligth that suit your preview materials needs... really.
I came across that subject accidentaly once while ago and never tought i could use it for something...

I think that the sphere  of material editor was good for materials years ago... but now it needs that little "extra".

So here it is... this is what i'm talking about.

http://www.3dmax-tutorials.com/Creating_a_Custom_Sample_Object.html (http://www.3dmax-tutorials.com/Creating_a_Custom_Sample_Object.html)

I'm thinking in putting some GRant warwick shader in there just to see it works.
You can create a custom scene with camera and ligths and use it as preview inside material editor.

Pretty nifty.

Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-10, 00:11:43
I know that since forever :- ) But I don't think you can swap the lighting at the moment if you want to keep the advanced rendered preview in Corona.

I btw optimalized Grant's Ball in Zbrush to about 10perc.. he uses CAD converted geometry so it's super heavy. You don't want 100MB geometry as preview piece.
I attach some stuff from my recent presentations.
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-10, 00:16:36
Noted.Thanks again,Juraj.
Would anyone know if Corona devs intend to introduce new alternative shaders soon?

I think they have enough crucial and more important stuff to do right now :- ) But, some day sooner than too much later would be great
Title: Re: Corona- Surface details and glosiness??
Post by: borisquezadaa on 2014-10-10, 02:57:12
Damn!... always way ahead... but seems i'm in the rigth track. XD.

You win this time Mr Juraj... you win this time.
Title: Re: Corona- Surface details and glosiness??
Post by: steyin on 2014-10-10, 17:04:33
Juraj, could you share the modified file for the previews? I have Grant's file, but a smaller sized one would be better of course. If not no biggie.
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-10-10, 18:15:14
Juraj, could you share the modified file for the previews? I have Grant's file, but a smaller sized one would be better of course. If not no biggie.

Uf, since it's still mostly his file I don't want to share modifications outside, I apologize. But just open Zbrush and press decimate, or use native 3dsMax "ProOptimizer" modifier, it's not as good, but it works too.
I hope it's fine.
Title: Re: Corona- Surface details and glosiness??
Post by: steyin on 2014-10-10, 19:05:00
Juraj, could you share the modified file for the previews? I have Grant's file, but a smaller sized one would be better of course. If not no biggie.

Uf, since it's still mostly his file I don't want to share modifications outside, I apologize. But just open Zbrush and press decimate, or use native 3dsMax "ProOptimizer" modifier, it's not as good, but it works too.
I hope it's fine.

Not a problem. Thanks.
Title: Re: Corona- Surface details and glosiness??
Post by: melviso on 2014-10-11, 20:48:04

I think they have enough crucial and more important stuff to do right now :- ) But, some day sooner than too much later would be great

Yeah.
Also Juraj, I went through ur rendered images on facebook and behance.They are breathtaking. I have also gone through a lot of other professional visualizers works. I have noticed there aren't night rendered stills in alot of them.Is this because a lot of clients prefer day renders or night renders are difficult to produce?
Title: Re: Corona- Surface details and glosiness??
Post by: daniel.reutersward on 2014-12-16, 23:09:49
I btw optimalized Grant's Ball in Zbrush to about 10perc.. he uses CAD converted geometry so it's super heavy. You don't want 100MB geometry as preview piece.

10 perc.?! I´ve been trying for hours (yes several haha) to optimize the shaderball to use it as a material preview but only get messed up geometry or holes in my model haha. Managed one time but the file ended up being 47mb and still problems with the geometry!
You managed to optimize it very well since your model seems to look like the original.
Would there be any possibility for you to share some hint/detail on how optimized so well? :)
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-12-16, 23:21:07
I btw optimalized Grant's Ball in Zbrush to about 10perc.. he uses CAD converted geometry so it's super heavy. You don't want 100MB geometry as preview piece.

10 perc.?! I´ve been trying for hours (yes several haha) to optimize the shaderball to use it as a material preview but only get messed up geometry or holes in my model haha. Managed one time but the file ended up being 47mb and still problems with the geometry!
You managed to optimize it very well since your model seems to look like the original.
Would there be any possibility for you to share some hint/detail on how optimized so well? :)

Several hours ? I think it took me something around 20 minutes, but I did have to do some manual cleaning of holes. This is because his model is CAD generated so it's not even continuous. So yes...dirty process :- ).
But I really can't tell you if I did something special because I honestly don't remember what happened yesterday and I did this half a year ago. Btw, I checked and it's 20MB. Still not super lightweight. If someone would rebuilt it in true poly way,
that would be great.
Title: Re: Corona- Surface details and glosiness??
Post by: daniel.reutersward on 2014-12-16, 23:31:28
Thanks for the info Juraj! Isn´t 20mb quite slow to load when you need to refresh materials? :)
I will look into rebuilding it, I have some free time! :)
Title: Re: Corona- Surface details and glosiness??
Post by: Juraj on 2014-12-16, 23:59:29
Thanks for the info Juraj! Isn´t 20mb quite slow to load when you need to refresh materials? :)
I will look into rebuilding it, I have some free time! :)

I don't think it's subsequently loading after first time. It's not like I use it all the time either, Ball can be pretty good enough :- ).
Title: Re: Corona- Surface details and glosiness??
Post by: daniel.reutersward on 2014-12-17, 00:20:08
I don't think it's subsequently loading after first time. It's not like I use it all the time either, Ball can be pretty good enough :- ).

Yes, the ball can be good as well, but I´m finding it pretty hard to see how materials/reflections turns out with the ball preview sometimes. Or perhaps it´s the lighting? My brain is still used to the usual material preview haha :)

I´m making some progress with optimization, from 1,1million polys down to 282k so far! No holes, no geometry problems and UV´s are still there!