Jump to content
You are about to reply to a thread that has been inactive for 136 days.

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

Recommended Posts

Posted

Hi everyone. I have a quick question if I may, regarding PBR material fallbacks.

With materials I have purchased, they often come with classic fallback textures. However, I am confused as to what goes where, mainly the normal and specular maps.

I get that diffuse is the normal texture, and normal map is usually a blue thing for the bumps (I think)? But some also include an orange ORM texture and not sure where that goes? I tried it in specular (shine) but you see orange hue, so that cannot be right. One developer also included another texture called glossy which was a white/black variant of ORM, which I think is for specular?

4acebb20fd2bdf8a65cbf6fff841b3b3.png

Can someone tell me if I have done this right? 

Many thanks, Adam

Posted (edited)

ORM is like a combined map and is not used. It's Occlusion & Roughness & Metallic in one. Presumably it is just included because it was part of the export from whatever application was used to produce the textures, I believe you can just ignore it.

The blue one is the normal map and the white/black (glossy) one can be used as your specular map I think, correct. I'm not sure this is 100% correct - I'm not sure a PBR glossy map directly translates into a Blinn-Phong specular map but it might be close. I'm thinking it might just look a little too shiny if used as this but could be wrong there.

 

 

 

Edited by AmeliaJ08
  • Like 1
Posted
1 minute ago, AmeliaJ08 said:

ORM is like a combined map and is not used. It's Occlusion & Roughness & Metallic in one. Presumably it is just included because it was part of the export from whatever application was used to produce the textures, I believe you can just ignore it.

The blue one is the normal map and the white/black (glossy) one can be used as your specular map I think, correct. I'm not sure this is 100% correct - I'm not sure a PBR glossy map directly translates into a Blinn-Phong specular map but it might be close.

 

 

Thanks for responding to my query @AmeliaJ08

Posted

There is no direct translation between a PBR texture with ORM and BlinnPhong.

You can create a passable specular map by taking either the metal or roughness (which ever is most interesting) from the ORM, inverting them, pushing the contrast a little and adjusting the values in SL till you get something "near enough"

Chat GPT suggests

ffmpeg -i input_orm.png -vf "extractplanes=y, lutrgb=r='255-val':g='255-val':b='255-val', eq=contrast=2" -c:v png output_specular.png
Quote

 

This command does the following:

  1. -i input_orm.png: Specifies the input ORM texture map.
  2. -vf "extractplanes=y": Extracts the Y (luminance) plane, which often represents the roughness channel in a grayscale image.
  3. lutrgb=r='255-val':g='255-val':b='255-val': Inverts the colors (inverts the roughness channel).
  4. eq=contrast=2: Adjusts the contrast, where 2 is an example value to increase contrast. You can adjust this value as needed.
  5. -c:v png: Ensures the output is in PNG format.
  6. output_specular.png: Specifies the output file name.

You can adjust the contrast value in the eq filter to achieve the desired effect for your specular map.

 

 

I have not tested this. Good Luck.

  • Like 1
  • Haha 1
Posted
1 hour ago, Coffee Pancake said:

There is no direct translation between a PBR texture with ORM and BlinnPhong.

You can create a passable specular map by taking either the metal or roughness (which ever is most interesting) from the ORM, inverting them, pushing the contrast a little and adjusting the values in SL till you get something "near enough"

Chat GPT suggests

ffmpeg -i input_orm.png -vf "extractplanes=y, lutrgb=r='255-val':g='255-val':b='255-val', eq=contrast=2" -c:v png output_specular.png

 

I have not tested this. Good Luck.

That doesn't seem right.

A better approach is to duplicate your Albedo map and use that for your specular colour, then take the roughness channel of the ORM map, invert it (turning it into a "smoothness" aka specular exponent map) and add it as the alpha channel of the normal map.

The metalness map is closest in functionality to the environment intensity map so you can just add that as the alpha channel of your specular colour map.

The biggest issue with converting from PBR materials to Blinn/Phong is that you may need to regenerate your normal map using MikkT space (assuming that it was originally generated using Lengyel's tangent space).

  • Like 2
Posted

Thanks for your responses @Coffee Pancake and @Fluffy Sharkfin

It does seem like a complex process, especially for something which is only a fallback. Using the glossy black/white version for specular seemed to have pleasing results in terms of how the object looked. I have gathered from this thread that ORM's cannot be used directly in Blinn-Phong. I think what confused me was the fallback files given to me which also included the ORM. I assume the creator of the material would do all the conversion work when providing fallback textures (as you can see in my original post screenshot).

I suppose all of this won't matter so much in a year or two, as most will be on PBR-compliant viewers by then as older ones are blocked. 

Thanks again for taking the time to look into this.

Posted (edited)
1 hour ago, AdamBravis said:

Thanks for your responses @Coffee Pancake and @Fluffy Sharkfin

It does seem like a complex process, especially for something which is only a fallback. Using the glossy black/white version for specular seemed to have pleasing results in terms of how the object looked. I have gathered from this thread that ORM's cannot be used directly in Blinn-Phong. I think what confused me was the fallback files given to me which also included the ORM. I assume the creator of the material would do all the conversion work when providing fallback textures (as you can see in my original post screenshot).

I suppose all of this won't matter so much in a year or two, as most will be on PBR-compliant viewers by then as older ones are blocked. 

Thanks again for taking the time to look into this.

Are they actually calling them fallback? it just looks like these are individual PBR textures and as mentioned apparently the normal map isn't in the correct format as well as the 'glossy' map not being a specular map as we'd expect for Blinn-Phong. It'll be close but the results might not be acceptable, I'm kinda curious how an older viewer interprets these files in Blinn-Phong though. Maybe the result will be acceptable enough.

Edited by AmeliaJ08
  • Like 1
Posted
8 hours ago, Fluffy Sharkfin said:

That doesn't seem right.

A better approach is to duplicate your Albedo map and use that for your specular colour, then take the roughness channel of the ORM map, invert it (turning it into a "smoothness" aka specular exponent map) and add it as the alpha channel of the normal map.

The metalness map is closest in functionality to the environment intensity map so you can just add that as the alpha channel of your specular colour map.

The biggest issue with converting from PBR materials to Blinn/Phong is that you may need to regenerate your normal map using MikkT space (assuming that it was originally generated using Lengyel's tangent space).

This is the logic I use when I go from one set of textures to the other, but it's a rather manual process with lots of eyeballing. The results have generally been "good enough".

BP->PBR

  1.  base color = hue/saturation of diffuse, quite tricky to pull off from a very baked diffuse though since hue/sat tend to change from the baked in light
  2.  base alpha = diffuse alpha (but new rendering uses a different scale for alpha so adjustments may be necessary)
  3.  occlusion = specular intensity/diffuse intensity, as in grayscaled versions of them, or some combination thereof
  4.  roughness = inverse of normal alpha but not a direct mapping, adjusting levels may be necessary
  5.  metallic = specular alpha, unless it wasn't meant to be metal and just plastic/glassy, this is very per-case basis and needs consideration
  6.  normal = normal without the alpha but the specification says alpha is ignored so possibly not necessary to touch; all the normal maps I've made over the years are either hand-drawn tileables or already baked as MikkT so the tangent space has not been a problem

PBR->BP

  1.  diffuse color = base color * occlusion
  2.  diffuse alpha = base alpha
  3.  normal color = normal color
  4.  normal alpha = inverse of roughness, not a direct mapping
  5.  specular color = base color if the pixel is metal, otherwise specular color = some level of grayscale (maybe take it from the occlusion map)
  6.  specular alpha = metallic, unless plastic/glassy sheen is desired on non-metal
  • Like 2
  • Thanks 1
Posted
20 minutes ago, Frionil Fang said:

This is the logic I use when I go from one set of textures to the other, but it's a rather manual process with lots of eyeballing. The results have generally been "good enough".

BP->PBR

  1.  base color = hue/saturation of diffuse, quite tricky to pull off from a very baked diffuse though since hue/sat tend to change from the baked in light
  2.  base alpha = diffuse alpha (but new rendering uses a different scale for alpha so adjustments may be necessary)
  3.  occlusion = specular intensity/diffuse intensity, as in grayscaled versions of them, or some combination thereof
  4.  roughness = inverse of normal alpha but not a direct mapping, adjusting levels may be necessary
  5.  metallic = specular alpha, unless it wasn't meant to be metal and just plastic/glassy, this is very per-case basis and needs consideration
  6.  normal = normal without the alpha but the specification says alpha is ignored so possibly not necessary to touch; all the normal maps I've made over the years are either hand-drawn tileables or already baked as MikkT so the tangent space has not been a problem

PBR->BP

  1.  diffuse color = base color * occlusion
  2.  diffuse alpha = base alpha
  3.  normal color = normal color
  4.  normal alpha = inverse of roughness, not a direct mapping
  5.  specular color = base color if the pixel is metal, otherwise specular color = some level of grayscale (maybe take it from the occlusion map)
  6.  specular alpha = metallic, unless plastic/glassy sheen is desired on non-metal

There's definitely some fine tuning required if you want to faithfully reproduce the same material on both systems.  I suspect the majority of existing maps are already calculated using MikkT space anyway (the differences are quite minor and barely noticeable for most content).

If you're multiplying the albedo map with the occlusion map to create the diffuse map then it makes sense to use the occlusion map when creating the specular colour map too.  I guess  the simplest way is to use the occlusion map as a base layer then overlay the albedo/base colour with the metalness map applied as a mask so the effect that the colour of the surface has on its specular colour is governed by the metalness of the surface.

  • Like 3
Posted

As you can see, using what I did in the Blinn-Phong as a fallback has decent results (although could be tweaked further in settings). 

90c4811956ea0c03e2a6d80c4fe53f6a.jpg

I don't think it looks terrible, and is acceptable as a non-pbr fallback I guess.

These are the kinds of textures I am experiencing in packaged when purchasing PBR materials, so somehow they are the only things available to use in Blinn-Phong.

Thank you for all your contributions to the thread so far. Really appreciate it!

  • Like 1
  • Thanks 1
Posted (edited)
1 hour ago, AdamBravis said:

As you can see, using what I did in the Blinn-Phong as a fallback has decent results (although could be tweaked further in settings). 

90c4811956ea0c03e2a6d80c4fe53f6a.jpg

I don't think it looks terrible, and is acceptable as a non-pbr fallback I guess.

These are the kinds of textures I am experiencing in packaged when purchasing PBR materials, so somehow they are the only things available to use in Blinn-Phong.

Thank you for all your contributions to the thread so far. Really appreciate it!

In order to get that "patchy" effect of shiny and scuffed areas that you can see on the PBR version you'd need to export the normal map and the glossy map and combine them in Photoshop (or similar app) so that the glossy map is used as the transparency (alpha channel) of the normal map.  That will change the level of glossiness on the object based on the pixels in the glossy map.

You could also export the ORM map and load that into photoshop then copy the blue channel (metalness) and add that to the alpha channel of a new image filled with grey or white (from the screenshot it looks like 50% grey would be a good base colour), using that as your specular colour map will mask the environmental reflections based on the metalness of the surface, making the highlights on non-metal areas appear more grey.

ETA: On second thoughts it may be better to use white as the base colour for your specular colour map since you have the option of using the colour picker to add a grey tint to the specular colour of the object in-world in which case using white would allow you a wider range of adjustment.

Edited by Fluffy Sharkfin
white not grey?
  • Like 1
Posted
20 hours ago, AdamBravis said:

As you can see, using what I did in the Blinn-Phong as a fallback has decent results (although could be tweaked further in settings). 

90c4811956ea0c03e2a6d80c4fe53f6a.jpg

I don't think it looks terrible, and is acceptable as a non-pbr fallback I guess.

These are the kinds of textures I am experiencing in packaged when purchasing PBR materials, so somehow they are the only things available to use in Blinn-Phong.

Thank you for all your contributions to the thread so far. Really appreciate it!

This is very useful to see, I think it's probably acceptable enough

  • Like 1
You are about to reply to a thread that has been inactive for 136 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
×
×
  • Create New...