Page 2 of 3

Re: Angular roughness/Angular glossiness

Posted: Wed Jul 15, 2020 4:14 am
by lighting_freak
Hi,

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

BR

Re: Angular roughness/Angular glossiness

Posted: Wed Jul 15, 2020 9:04 am
by Theo_Gottwald
How do we replace the "Layer Weight" node in Luxcore Materials, or is it not needed?

Re: Angular roughness/Angular glossiness

Posted: Wed Jul 15, 2020 11:40 am
by B.Y.O.B.
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.

Re: Angular roughness/Angular glossiness

Posted: Thu Jul 16, 2020 6:46 am
by Theo_Gottwald
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?

Re: Angular roughness/Angular glossiness

Posted: Thu Jul 16, 2020 8:06 am
by Dade
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).

Re: Angular roughness/Angular glossiness

Posted: Thu Jul 16, 2020 9:20 am
by Sharlybg
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 ?

Re: Angular roughness/Angular glossiness

Posted: Thu Jul 16, 2020 12:04 pm
by FarbigeWelt
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.

Re: Angular roughness/Angular glossiness

Posted: Thu Jul 16, 2020 12:22 pm
by tokiop
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.

Re: Angular roughness/Angular glossiness

Posted: Fri Jul 17, 2020 11:22 am
by kintuX
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) ;)

Re: Angular roughness/Angular glossiness

Posted: Fri Jul 17, 2020 7:45 pm
by Theo_Gottwald
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.