Detail on the properties in the material PBR

Hello,

I learn a little more about the material PBR and realize that we do not have enough detail on each property or that some have none.

For example : indexOfRefraction, minimumThickness, maximumThickness.
and what is a thicknessTexture

I can not understand the propertys I am quoting. Some are explain in the doc, but not all.
Would it be possible to get its details in addition to the materials PBR, it would be really good to understand better.

Thank you

It is all described here: Master Physically Based Rendering (PBR) - Babylon.js Documentation

Please note that here the index of refraction represents the value you can find in the nomenclature and not its inverse like in the legacy setup.

By default the thickness of the material is understood to be the maxThickness value of the subSurface. You could easily change the thickness by relying on a thickness map

The actual thickness per pixel would be then = minimumThickness + thicknessTexture.r * maximumThickness. This helps clamping the actual value between a min and max defined by a texture

Do you see anything missing ?

I missed them. I had not seen. You have to read all the page to find the information.
After the explanation on the index of refraction have not clear to me. I do not know what the nomenclature and legacy setup ? it’s complicated words that only speaks to people expert with PBR. Maybe an explanation with an example use case can help to see it more clearly, I suppose.

Thank you Sebavan

Index of refraction is the same that you study in physics: Refractive index - Wikipedia

I ll try to update the doc.

This topic is sort of close to what I am looking at now. I am thinking about how to map more properties of Blender’s Principled shader involving sub-surface. I am using the Subsurface Color for tintColor, & a value of greater than 0 for Subsurface to send the color.


I do not know what any of the Subsurface properties in Blender really do. The radius thing is actually 3 numbers, so forget that. Too wierd.

Was thinking the Subsurface could be more than just a switch, like some type of intensity. Looking a source, the tint is a color3, not color4. I did see a translucencyIntensity. This is not documented.

I am just going to try it, and see what happens, but just for reference, what is it supposed to do?

What Blender support looks like subsurface in term of ray entering at point A and exiting at point B on the same side of a material.

It is usually achieved through post process and not supported in Babylon.

The translucency is more ray crossing a material from their back. the translucencyIntensity defines like all the other intensity how much a material is translucent. Basically how much of the light rays going through the material can reach the other side.

I never study physics. I stopped school very quickly to do a CAP apprenticeship. So sorry if I do not understand everything. However, I learn quickly with concrete cases.

Thanks again for your explanations.

Well, I have not changed the exporter yet, but I put subsurface into my own little exporter tester. As soon as subsurface gets turned on, isRefractionEnabled, it changes, but translucency slider does not do anything.

https://palmer-jc.github.io/scenes/dr_demo/MH.html

I am pretty sure I am assigning it, since if you change materials, then change back, the value in the slider is remembered. Is this to be expected?

using translucency is used with isTranslucencyEnabled = true, isRefractionEnabled = true enables the refraction.

@Dad72, it is exactly why I need to change the doc, I needs to address everybody who wants to learn :slight_smile: and it is currently not doing it.

2 Likes

After you pointed out the second Enabled, at first, I implemented both as checkboxes. I found once refraction is on, transparency does nothing.

If this is always true, perhaps a 3 way {None, refraction, transparency} mode models better than 2 booleans. Would better from a documentation standpoint as well.

The link above, now uses only transparency, since I only have enough controls in Blender to do one. This is not in the exporter yet, but on my list for the next release. Works to make more “materials” than there are coming from diffuse textures by themselves.

Here is a pastie white red head, from a less white brown haired.

Transparency and refraction are not really compatible as refraction is a way to see behind distorted by the refractive index. Keeping them both is weird as you would have a mix of distorted and normal blend.