Jump to content

VERY NOOB QUESTION: Nomenclature for PBR Component Files


You are about to reply to a thread that has been inactive for 133 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts


So, I've been trying to learn how to create, edit, and use PBR materials, using glTF files. I've read the SL wiki page on PBR materials, which was occasionally a little confusing. I've purchased a couple of PBR packages on the Marketplace, and also tried downloading and then uploading into the viewer some materials from this Creative Commons site: https://polyhaven.com/textures

One of the MP PBR files I purchased consists of a glTF file/object that automatically goes into the Materials folder in my inventory, and seems to work -- but doesn't include legacy textures/materials, meaning it's entirely invisible to anyone not using a PBR viewer (and hence kind of useless right now).

Another consists entirely of component materials files, but not a glTF, and, most importantly, uses different names than LL uses for these (and includes nonsensical instructions).

The downloads from the web-based site allow one to download individual component files, and, supposedly, a glTF file, but it again uses different names than LL, and the glTF file is unreadable by the LL viewer.

QUESTION 1

So, a first question (I'll have others!): what alternate names are used for these files?

The dialog for editing or creating materials for PBR in-viewer includes the following four slots:

Base Color
Metallic-Roughness
Emissive
Normal

Some of these are obvious. Normal maps always seem to be called normal maps. But there seem to be variant names for everything else. The names I've come across from the three sources for materials I've mentioned above include . . .

Base Colour
Alpha
Occlusion
Roughness
Metallic
Normal
Emission
AO/Rough/Metal
Bump
Diffuse
Diplacement / Height
Rough
Spec(ular?)
AO
Albedo

My best guess so far as to how these correspond to the four slots in the viewer dialog are:

Base Color: Base color / Albedo / Diffuse
Metallic-Roughness: Roughness / Metallic / AO/Rough/Metal / Rough
Emissive: Emission
Normal: Normal / Bump

Are these correct?

I have NO idea what to do with the

Alpha (for transparency?)
Occlusion (for baked-in shadows??)
Displacement / Height
Specular
AO (I assume the same as Occlusion, above?)

QUESTION 2

So, I gather that I should try to create a glTF file before importing into SL, because otherwise some of the quality is degraded?

The "GLTF Packer" page, above, requires certain naming conventions to work, it would seem. So, I should take the component files, ensure that they are in PNG format, and rename them appropriately (using, as a reference, the above guide to names)? For instance:

Normals _normal, _norm, _nrml, _nrm, _nor
Ambient Occlusion _ambient,  _occlusion, _ao
Metallic _metallic, _metalness, _mtl
Roughness _roughness, _rough, _roug, _rgh
Emission _emission, _emiss, _emit
Alpha _alpha, _transparency

Which of these are unnecessary for SL? Ambient Occlusion and Alpha only?

 

Please explain like I'm an utterly clueless non-techie person who still wants to do her own texturing, please!

(Because that's exactly what I am.)

Thank you!!

  • Thanks 2
Link to comment
Share on other sites

The maps that glTF 2.0 uses are the following:

  • Base color (Sometimes called albedo) but NEVER diffuse - diffuse is something different entirely.
  • Normal (Same as Blinn-Phong)
  • ORM (Viewer and glTF call this Metallic-Roughness, however to avoid confusion many users say ORM to refer to the compiled map - this consists 3 greyscale maps of the Occlusion in the red channel, Roughness in the green channel and Metallic in the blue channel).
  • Emissive (Which parts of the texture should be unaffected by lighting (e.g. light sources))

If you see maps like:

  • Ambient Occlusion (aka AO)
  • Roughness (aka Rough)
  • Metalness (aka Metal)

Then SL won't take these as-is, because they need to be compiled into an ORM map first. AiAi's glTF packer can do this for you.

If you see a Diffuse map, this item is not a glTF compliant material and should not be used. (Diffuse maps contain baked lighting, which the base color map should not)

If you see a Specular map, this item should not be used (Either the item was made using the PBR Spec-Gloss workflow, which is not present in SL, or was made with another shader model in mind).

If you see an Alpha map, this should be merged into the alpha channel of the base color map. Again, AiAi's glTF packer can do this for you.

If you see a Displacement map, this can be ignored. SL does not implement this feature.

 

As with the above, including the separate textures is optional for creators. Applying a base color map as a diffuse map does not achieve what you may think it will, as the base color lacks information that is needed for a Blinn-Phong diffuse map; hence why creators may opt to not include the textures. The need to apply a Blinn-Phong and PBR material to objects is temporary during the transition period to PBR viewers, so will not be needed indefinitely.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

16 minutes ago, Scylla Rhiadra said:

Base Color: Base color / Albedo / Diffuse
Metallic-Roughness: Roughness / Metallic / AO/Rough/Metal / Rough
Emissive: Emission
Normal: Normal / Bump

Are these correct?

Mostly, except calling a normal map a bump map would be a misnomer. If it looks like a normal map with the blue overall look, then it's probably ok. If it's grayscale, then it's a height/bump map and won't work for normals.

Diffuse is supposed to be a baked representation of the lighting so it's not the same as base color, as used in old materials. I've certainly seen lots of "PBR libraries" advertised here and elsewhere where the base color/albedo texture is just a diffuse map, so it's not technically correct.. but might look just fine anyway. An actual diffuse could be thought of as base color+occlusion but it's not quite that simple.

17 minutes ago, Scylla Rhiadra said:

have NO idea what to do with the

Alpha (for transparency?)
Occlusion (for baked-in shadows??)
Displacement / Height
Specular
AO (I assume the same as Occlusion, above?)

Alpha is the transparency on the base color texture, i.e. its alpha channel. Occlusion/AO are the red component on the roughness-metal channel, it's more accurately occlusion-roughness-metal.

Displacement and height are probably misnomers (height and bump are a grayscale height map, not the same as normal). Displacement is not used in SL but it could be either in height or normal map format, and actually displaces the vertices instead of just altering the shading.

Specular could be specular strength (old materials: normal map alpha channel) or color (old materials: specular itself). Not used in SL PBR.

30 minutes ago, Scylla Rhiadra said:

Which of these are unnecessary for SL? Ambient Occlusion and Alpha only?

Oop mobile quoting changed the order. There's no simple answer, what channels you must include depends on what you're trying to accomplish. AO can be useful to define surface detail, and since it's a part of the O-R-M texture it's gonna be uploaded along the other two, anyway.

22 minutes ago, Scylla Rhiadra said:

So, I gather that I should try to create a glTF file before importing into SL, because otherwise some of the quality is degraded?

Normal maps get uploaded with lossless compression if you upload a gltf directly. Otherwise there's no difference; if your normal map is 128x128 or smaller, or the material doesn't care about compression artifacts, you can upload them separately.

  • Thanks 3
Link to comment
Share on other sites

@Jenna Huntsman @Frionil Fang and @arton Rotaru

Thank you all! This makes this stuff a lot easier to understand.

The Creative Commons PRB materials site I noted above doesn't include an Albedo or base colour map, but it does have something called "Diffuse." I'm assuming, because these are PBR textures, that this is just what they've chosen to call it. Here is what it looks like, with the list of components to the right. You can see the thumbnails for four of these at the bottom, and the A/R/M thumbnail above, to the right (in orange).

PBRMaterialsExample-Blank.thumb.PNG.9595219ee4cb44c57f0d626102286749.PNG

As I take it, using @Extrude Ragu's VERY handy little app, I should load

"Diffuse" into the "Base Color" slot
Leave the "Alpha" slot empty
"AO" into "Occlusion" (or not? Is it necessary if one is also loading A/R/M?)
"AO/Rough/Metal" into "Roughness??? or into Metalic? or should I load "Rough" there?

Ignore "Displacement"
"Normal" into the "Normal" slot
Leave the "Emission" slot empty.

What I suppose is confusing me is 1) where to load the AO/Roughness/Metal texture, or 2) whether I should leave it, and load "AO" and "Roughness" separately, and leave "Metallic" empty, or 3) whether I load all three of these (and if so, where does "AO/Roughness/Metal" go?).

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Just now, Scylla Rhiadra said:

What I suppose is confusing me is 1) where to load the AO/Roughness/Metal texture, or 2) whether I should leave it, and load "AO" and "Roughness" separately, and leave "Metallic" empty, or 3) whether I load all three of these (and if so, where does "AO/Roughness/Metal" go?).

The AO/Rough/Metal is a pre-packed image (aka. An ORM Map) - You wouldn't use this with GLTF Packer (You wouldn't pack something that has already been packed!)

In this case, you'd put AO in the occlusion slot, and Roughness in the Roughness slot. You'd leave Metallic empty. Only metallic materials come with a metalness map usually, which is why one isn't shown on the page.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

11 minutes ago, Extrude Ragu said:

You'd leave Metallic empty. Only metallic materials come with a metalness map usually, which is why one isn't shown on the page.

In this case your packer will create a metallic channel with a white color though, right? Which is metal, which means you want to set the metallic factor of the PBR material to 0.0 in-world.

Or your wood will be treated as metal. 🙂

  • Like 2
Link to comment
Share on other sites

42 minutes ago, Scylla Rhiadra said:

PBRMaterialsExample-Blank.thumb.PNG.9595219ee4cb44c57f0d626102286749.PNG

 

 

2 hours ago, Scylla Rhiadra said:

The downloads from the web-based site allow one to download individual component files, and, supposedly, a glTF file, but it again uses different names than LL, and the glTF file is unreadable by the LL viewer.

That screenshot explains it - The viewer will only accept glTF files with maximum resolutions within SL's resolution limits (currently, 1024px or 1K) - Change the resolution of the glTF on the download options on the site, and you should be able to import the downloaded glTF straight into SL.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

17 minutes ago, arton Rotaru said:

In this case your packer will create a metallic channel with a white color though, right? Which is metal, which means you want to set the metallic factor of the PBR material to 0.0 in-world.

Or your wood will be treated as metal. 🙂

The material will actually display correctly in-world.

GLTF Materials have an additional variable called `metallic factor` which is separate to the image and controls how much the image is used. When the slot is left empty, gltf packer automatically sets this value to zero so your material will display correctly in-world.

However, just in case you did  want it to be metallic. It does actually set the channel in the image to white, which allows you to edit the material in-world and set the metallic factor to 1 to use it.

Edited by Extrude Ragu
  • Like 4
Link to comment
Share on other sites

11 minutes ago, Extrude Ragu said:

Just realised I skim read and missed that you actually mentioned the metallic factor yourself. Whoops :) But yeah, it's set automatically, no need to fiddle

Yeah, it came to me that you would set the factor to 0, if the map is blank, in your packer already, the moment I have hit the Submit Reply button. I still haven't had a need for the packer yet, so I wasn't sure what it does. 😇

Edited by arton Rotaru
  • Like 2
Link to comment
Share on other sites

17 minutes ago, Jenna Huntsman said:

 

That screenshot explains it - The viewer will only accept glTF files with maximum resolutions within SL's resolution limits (currently, 1024px or 1K) - Change the resolution of the glTF on the download options on the site, and you should be able to import the downloaded glTF straight into SL.

Yes. Duh me. Thank you!

I'll download it again at 1k (or, I suppose 2k would work as well, as the viewer does accept images up to 2048px?).

The nice thing about these textures, as opposed to the ones I've bought on the MP, is that using the so-called "Diffuse" map and the AO map, I can create a regular diffuse texture, and load it, with the normal map, into the Blinn-Phong slots so that those without PBR-enabled viewers (which, for the time being, is most people) will still see something.

  • Like 1
Link to comment
Share on other sites

4 hours ago, Frionil Fang said:

Specular could be specular strength (old materials: normal map alpha channel) or color (old materials: specular itself). Not used in SL PBR.

The ALM/Materials Normal Alpha channel is NOT a specular strength map, it's aa specular TIGHTNESS map, that gets multiplied, Kodak Colour style,  by the Gloss parameter, so you could, and perhaps should use that for the roughness map in PBR conversions.

Alternatively, many people mistakenly assume the specular map is a specular strength map instead of a specular colour map, so sometimes you'd want to convert the spec map to 8 bit greyscale, and stick THAT in the roughness channel, depending on how badly the creator didn't RTFM when making the ALM/Materials.

 

2 hours ago, Scylla Rhiadra said:

I'll download it again at 1k (or, I suppose 2k would work as well, as the viewer does accept images up to 2048px?).

If you let a viewer/server do the 2048 to 1024 resize, the quality will suck. Do the resize your self BEFORE uploading texture maps.

  • Thanks 1
Link to comment
Share on other sites

13 hours ago, Scylla Rhiadra said:

The Creative Commons PRB materials site I noted above doesn't include an Albedo or base colour map, but it does have something called "Diffuse." I'm assuming, because these are PBR textures, that this is just what they've chosen to call it.

Slightly, but not completely, off topic: To understand this, it's important to realise that PBR is not a standard. It's a concept with a lot of different implementation. This is why there is so much confusion about the names of various maps.

The Khronos Group is trying to establish a standard for it now, based on Unity's old PBR system. But there are still lots of other variants around and there will probably always be, partly because some won't change, partly because glTF PBR is a very simplified take on the concept and may not be advanced enough for many uses.

  

10 hours ago, Zalificent Corvinus said:

If you let a viewer/server do the 2048 to 1024 resize, the quality will suck. Do the resize your self BEFORE uploading texture maps.

The SL software very often does a better job scaling from 2048 to 1024 than the most common scaling algorithms used by various image eitors. It's a bit of a hit or miss though and if you really, really, really want to make the most of each pixel and are willing to spend some time and effort on it, head over to the beta grid and try different scaling methods (including the one built into the SL software) and see what works best.

Edited by ChinRey
  • Thanks 2
Link to comment
Share on other sites

3 hours ago, ChinRey said:

partly because glTF PBR is a very simplified take on the concept and may not be advanced enough for many uses.

Well, the advanced stuff is handled with glft extensions. https://github.com/KhronosGroup/glTF/blob/main/extensions/README.md

In SL we have only the texture transforms extension added so far, though.

  • Like 3
Link to comment
Share on other sites

41 minutes ago, arton Rotaru said:

Well, the advanced stuff is handled with glft extensions.

There are still a lot of aspects of "full PBR" that are missing and for good reason.

For those not too familiar with the concept, the idea with Physical Based Rendering is that instead of simply reproducing the colors across a surface, we try to simulate all the physical factors that cause those colors. But there are so many such factors and they interact with each other in so many weird and wonderful ways. If we were to take PBR all the way, we would have to measure render lag in frames per year, not frames per second. Some people wouldn't be happy about that so we have to compromise a little bit to make it work.

  • Like 3
Link to comment
Share on other sites

14 hours ago, Zalificent Corvinus said:

The ALM/Materials Normal Alpha channel is NOT a specular strength map, it's aa specular TIGHTNESS map, that gets multiplied, Kodak Colour style,  by the Gloss parameter, so you could, and perhaps should use that for the roughness map in PBR conversions.

Oops, you're right, it is indeed the "glossiness" which serves a function roughly opposite to roughness. Brain fart.

 

9 hours ago, ChinRey said:

The SL software very often does a better job scaling from 2048 to 1024 than the most common scaling algorithms used by various image eitors.

The SL scaling is a basic bilinear scaling implemented in the file indra/llimage/llimage.cpp, he code is a little difficult to follow since it's quite optimized but from what I can decipher it doesn't do anything special. Most image editors have bilinear as an option among others, but having more choices lets you tailor the scaling to the needs of the image: bilinear certainly *can* be the best but it's generic and soft, other modes can preserve details better or even sharpen them. I will always advocate for scaling to correct resolution by yourself.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

3 hours ago, Love Zhaoying said:

Does this partly explain why SL PBR is coming in parallel with (Unity still?) SL Mobile? Presumably, having PBR gives both that in common.

Actually I don't think that any of this is the case. There are 2 established PBR workflows. One is the Specular/Gloss workflow, the other is the Metallic/Roughness workflow. The Khronos Group has settled on the latter, with a style of channel packing that is similar to the one of the Unreal Engine. "Based on Unity's old system" makes it rather sound as if the PBR implementation was treated as an unloved stepchild by the Khronos Group. The basic material is basic, but the extensions make it super flexible and future proof.
Pretty much anybody can write an extension against the glTF 2.0 Spec and have it ratified by the Khronos Group.

Given all the confusion this basic material is already spreading among the SL community, imagine LL had implement the PBR material with all it's currently available material extensions. 🙃

The decision for using Unity for the mobile app may have been made before the decision to implement the glTF standard into SL actually. At that time, it was probably more of a finacial driven decision to utilize an existing engine rather than writing everything from scratch in-house. That's all just speculation on my side indeed!

However, since I know you are on the mobile alpha, maybe you could tell me how the mobile app does handle PBR materials at this point? 😇

Edited by arton Rotaru
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

7 minutes ago, arton Rotaru said:

However, since I know you are on the mobile alpha, maybe you could tell me how the mobile app does handle PBR materials at this point? 😇

Good idea, I can take a look but here are related questions and comments:

1. I'll have to actually experiment with some PBR, I assume the "survival kit" is one place to start.

Otherwise, I wouldn't have anything to compare knowing it was "actually" using PBR textures.

2. However, I noticed a very distinctive "sheen" (shine) to my default (non-PBR) outfit under PBR, I can check if that is present or absent on Mobile.  (Mobile doesn't support everything in the outfit yet, but it is definitely something to check for to compare Mobile vs. Official Viewer.)  This would at least show me whether those "changes" I see in the PBR Official Viewer show up in the Mobile viewer too..

3. Also, related question:  I've been doing some experiments with Reflection Probes. Are those "technically" part of PBR, or glTF, or just unrelated features that were related at the same time as PBR?  I can check if those work (at all) in Mobile too.

 

  • Like 1
Link to comment
Share on other sites

25 minutes ago, Love Zhaoying said:

Good idea, I can take a look but here are related questions and comments:

1. I'll have to actually experiment with some PBR, I assume the "survival kit" is one place to start.

Otherwise, I wouldn't have anything to compare knowing it was "actually" using PBR textures.

2. However, I noticed a very distinctive "sheen" (shine) to my default (non-PBR) outfit under PBR, I can check if that is present or absent on Mobile.  (Mobile doesn't support everything in the outfit yet, but it is definitely something to check for to compare Mobile vs. Official Viewer.)  This would at least show me whether those "changes" I see in the PBR Official Viewer show up in the Mobile viewer too..

3. Also, related question:  I've been doing some experiments with Reflection Probes. Are those "technically" part of PBR, or glTF, or just unrelated features that were related at the same time as PBR?  I can check if those work (at all) in Mobile too.

 

I don't know about this survival kit, but there are a few PBR materials in the inventory library. You could rez a prim and drag one of those materials onto it.

The reflection probes are unrelated to the glTF 2.0 Spec, but they are pretty much a requirement for PBR materials in general to look good.

Edited by arton Rotaru
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Frionil Fang said:

I will always advocate for scaling to correct resolution by yourself.

Me too!

These are my 2cents on downsampling textures. First of all, I hate resampling textures because it is always destructive. So I create all my maps at target resolution already.

If I have to resample texture maps though, I use Photoshop and the Bilinear method. Then I apply some 20 - 25 % of sharpening.
Except for the normal map. For downsampling the normal I use Bicubic smoother (best for enlargement) without any sharpening afterwards. Or there might be not much detail left in the normal after downscaling.

So letting the viewer resample my textures isn't an option for me anyways.

Edited by arton Rotaru
  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 133 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...