Jump to content

PBRMetallicRoughnessMaterial Bug, No Control Over Specular Intensity


Recommended Posts

I have searched high and low, and after a lot of digging, even through source of Babylonjs, unless I'm mistaken, there is no control over the intensity of specular reflections at all for the PBRMetallicRoughnessMaterial class. 

To replicate, open up this playground example, set the colour to solid black (0,0,0), set metallic to 0, and comment out the metallicRoughnessTexture.

No matter what I do, I can't achieve a perfectly black material, unless I disable the environmentTexture. But if I add a light to the scene, it once again is not perfectly black because there's no control over it's specular highlight. A perfect black material is simply impossible.

I've tried looking for other properties to alter, anything to get rid of the reflection, and it's impossible.

It should be possible under a PBR workflow to create a perfectly black material, even if they aren't naturally occurring.

Could we possibly get a specularIntensity property added to this class? Ideally the metallicRoughnessTexture could use the third unused texture channel to grab that property as well so we have per texel control?

Link to comment
Share on other sites

The specularity of a Metal/Rough material is entirely controlled by the roughness as it is controlled by the microsurface on a Spec/Gloss material. We do not need another extra channel to control it.

You can nevertheless rely on the full PBRMaterial if you wish where those parameters are available: specularIntensity and environmentIntensity to contol with more detail the impact of each chanels.

Migrating is detailed in this documentation: http://doc.babylonjs.com/how_to/physically_based_rendering_master#from-metallicroughness-to-pbrmaterial

Flagging the issue as solved as it is not a bug per se ?



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...