Angular roughness/Angular glossiness

Use this forum for general user support and related questions.
lighting_freak
Posts: 196
Joined: Thu Jan 18, 2018 6:02 pm

Re: Angular roughness/Angular glossiness

Post by lighting_freak » Wed Jul 15, 2020 4:14 am

Hi,

But if you select a static color instead of IOR the angular dependency is lost, isn't it?

BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease

User avatar
Theo_Gottwald
Posts: 76
Joined: Fri Apr 24, 2020 12:01 pm

Re: Angular roughness/Angular glossiness

Post by Theo_Gottwald » Wed Jul 15, 2020 9:04 am

How do we replace the "Layer Weight" node in Luxcore Materials, or is it not needed?
Register @Dreamstime and sell your Renderings to the world.

User avatar
B.Y.O.B.
Developer
Posts: 3681
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Angular roughness/Angular glossiness

Post by B.Y.O.B. » Wed Jul 15, 2020 11:40 am

lighting_freak wrote:
Wed Jul 15, 2020 4:14 am
But if you select a static color instead of IOR the angular dependency is lost, isn't it?
No. Check the code I linked: The IOR (called "index" in the code) is just a scaling factor for the specular color (called "ks" in the code).
It does not matter if you use the IOR or not, what comes out of there is a specular color ("ks"). The "index" is not used outside of the section below.
The whole physically correct fresnel thing comes at a later point in the code and only the resulting "ks" is used in there.

Code: Select all

	Spectrum ks = Ks->GetSpectrumValue(hitPoint);
	const float i = index->GetFloatValue(hitPoint);
	if (i > 0.f) {
		const float ti = (i - 1.f) / (i + 1.f);
		ks *= ti * ti;
	}
	ks = ks.Clamp(0.f, 1.f);
How do we replace the "Layer Weight" node in Luxcore Materials, or is it not needed?
Currently, we do not have an equivalent texture in LuxCore, and I'm somewhat sure that it can't be implemented because it would not work with Bidir, light tracing, photon mapping etc.
See viewtopic.php?f=5&t=9&hilit=facing+node ... 450#p11194 for details.

The topic of this thread is not possible to do in LuxCore at the moment I think. Maybe it could be added on shader level (not sure), but first it would be good to check if this is actually a real physically correct thing or not.

Judging from the Thea render video at 4:46 it looks to me like it describes a bumpy surface where the "hill tops" have low roughness and the "valleys" have high roughness. It might be possible to simulate this effect with a combination of bump mapping and roughness mapping, but I doubt it. It might make sense to add this, but I have the feeling that surfaces with such a property are pretty rare in the real world, so it seems like a niche case.

User avatar
Theo_Gottwald
Posts: 76
Joined: Fri Apr 24, 2020 12:01 pm

Re: Angular roughness/Angular glossiness

Post by Theo_Gottwald » Thu Jul 16, 2020 6:46 am

Changing the roughness of an surface dependent of the angle of the camera-view to the surface is not possible?
Is there no way in Luxcore currently to use the "angle of the camera" to influence the material?

Why should this interfere with Photons, as there is very clear corelation of the camera standpoint to the Pixel on the surface?
WiIl say the Photons jump around, yes, but the roughness-value - it could be adjusted at start of render depending on the angle - not?
Register @Dreamstime and sell your Renderings to the world.

User avatar
Dade
Developer
Posts: 4496
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Angular roughness/Angular glossiness

Post by Dade » Thu Jul 16, 2020 8:06 am

Theo_Gottwald wrote:
Thu Jul 16, 2020 6:46 am
Changing the roughness of an surface dependent of the angle of the camera-view to the surface is not possible?
It is but it doesn't make any sense for the physic point of view (i.e. material micro-roughness is constant, it doesn't magically change according the view angle).
Support LuxCoreRender project with salts and bounties

User avatar
Sharlybg
Donor
Posts: 2151
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Angular roughness/Angular glossiness

Post by Sharlybg » Thu Jul 16, 2020 9:20 am

It is but it doesn't make any sense for the physic point of view (i.e. material micro-roughness is constant, it doesn't magically change according the view angle).
So our current shading definition doesn't suffer from any important missing realistic real world material behaviour ?
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

User avatar
FarbigeWelt
Donor
Posts: 946
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Angular roughness/Angular glossiness

Post by FarbigeWelt » Thu Jul 16, 2020 12:04 pm

Sharlybg wrote:
Thu Jul 16, 2020 9:20 am
It is but it doesn't make any sense for the physic point of view (i.e. material micro-roughness is constant, it doesn't magically change according the view angle).
So our current shading definition doesn't suffer from any important missing realistic real world material behaviour ?
Well. It is probably more common in nature than in man made things our days.
Actually every living thing with micro scales slows angular depending, best example the wings a butterfly. Its miraculous changing colors are not real colors but the effect of sugar and cotton based scales. Or think about flowers. One part of their color derived from natural dyes like carotinoids or indigo and many others. Another part, the shininess our glossiness depends on micro / cellular structure of the blossoms. Maybe you know golden bugs or metallic green ones. But there is not any color like metallic in nature you could use for your own projects. Because these bugs body colors are based on a similar effect as the butterfly wings. Larger natural structures do not change colors but they change its brightness depending on view angle. Imagine wahres out stones, buildings made from sandstone like gothic cathedrals.
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
160.8 | 42.8 (10.7) Gfp | Windows 10 Pro, intel i7 4770K@3.5, 32 GB
2 AMD Radeon RX 5700 XT, 8 GB || Gfp = SFFT Gflops

tokiop
Posts: 27
Joined: Fri Apr 13, 2018 8:11 pm

Re: Angular roughness/Angular glossiness

Post by tokiop » Thu Jul 16, 2020 12:22 pm

How I understand this question is similar to the "The grass is always greener on your neighbor's yard" proverb : seen from the top, we mostly see the brown ground, but seen from the side, everything looks green.

If a physical surface has a lot of microscopic hills, seen from the front, reflections are scattered in all directions; but seen from the side, we only see the summit of the hills, whose normals are perpendicular to the vision angle. The reflections that we see look much less scattered.

So even if a material has a high roughness, seen from the side, it's perceived roughness looks much lower. With current model, the reflection intensity gets higher, but the roughness stays constant.

Would it make sense from a physical point of view ?

Even if resource expensive, such effect could maybe be "faked" with micropoly displacement, but not with bump, because bump's "hills" don't hide it's "valleys".

So maybe a parameter could be helpful to fake it at a shader/microscopic level, like roughness or anisotropic parameters.

kintuX
Posts: 577
Joined: Wed Jan 10, 2018 2:37 am

Re: Angular roughness/Angular glossiness

Post by kintuX » Fri Jul 17, 2020 11:22 am

Yes, w/o doubt, it visually better represents any surface, since it's physically correct.
Couple of papers on the matter:

Geometry into Shading (Pixar Animation Studios)
Sometimes, when 3D CG objects are viewed from a distance, a great deal of geometry can end up inside asingle pixel. When this happens, full-sized facets, or pixelsinadisplacementmapshouldplaytheroleoftraditionalmicro-facets. Here we describe how to alter traditional shading calculations to take this into account.


Simulation Of Surfaces Microroughness By Means Of Polygonal Representation
The paper presents a method of visualisation of surface microroughness acquired by hydroabrasive division (AWJ – abrasive water jet), by means of polygon representation. The method stems from theoretical and practical possibilities of so-called global illumination mapping of unevenness using suitable image maps. Based on data interpretation stemming from measurement of the surface roughness, an original method is proposed and realised, which also enables to visualise light interactions in the visualised microsurfaces.


IMHO, it's another "standard" feature present in modern engines which should logically also be in LuxCore but is M.I.A. (missing in action, next to Multiple-Scattering Microfacet BSDFs with the Smith Model) ;)

User avatar
Theo_Gottwald
Posts: 76
Joined: Fri Apr 24, 2020 12:01 pm

Re: Angular roughness/Angular glossiness

Post by Theo_Gottwald » Fri Jul 17, 2020 7:45 pm

Its not hard to understand, every time in teh summer that you drive on a very long road, in the far you see the road reflective like a mirror.

And after i saw how they implemented it in Cycles, i believe that this could be even implemented "as a checkmark" nearby the roughness Parameter.´
What they do in the video is just a exponential curve from zero (See the road) to the given (maximum) roughness.
The angle to the camera should be available. So as i see it it could be a checkmark and all calculations under the hood.
Register @Dreamstime and sell your Renderings to the world.

Post Reply