Jump to content

PBR Breaking Changes


Recommended Posts


After one year of the PBR Material, we collected most of the required feedback to make it Awesome. But unfortunately, this will go with some breaking changes.. I am really not happy to integrate them but they are for the best and I will fully document them. Knowing our backward compatibility Philosophy in BJS, I just want to give a long time ahead with our plan to ensure this will cause the lowest level of disruption on your projects. Strikeout tasks have been completed.

  1. First thing, is the migration of the current PBRMaterial in MaterialsLibrary under the name LegacyPBRMaterial to ensure that the ones among you relying on it can continue to find the current version as of today. This will not be fully maintained but mainly keep for reference during the time everybody migrates to the newer/greater one. Only urgent fixes will be addressed on it.
  2. As nobody seems to rely on them, the overloaded values used for debug but taking quite a big amount of code will be removed from the material.
  3. All the scalar values will be multiply by their respective maps like albedoColor * albedoTexureSampled (currently it is totally inconsistent and depends of the channel)
  4. The different channels will be renamed to map with the GLTF nomenclature (At least I will not have anymore issues in naming :-) ) to allow an easier adoption of BJS and less ramp up for everybody. For example, the material microsurface will be named back to glossiness and reflectivity to specular...
  5. All the Maths issues and bugs presents in the material will be fixed.
  6. The environment blur will be fixed through offline and/or loadtime GPU generation. (This should be compatible with browser not supporting both FullFloat and Texture LOD)
  7. A migration from full float to LUV is in our minds for the environment to allow the use of none full float buffers with HDR compatibility.
  8. UBO, Push Mode and the full sets of greatest new features will be added to the new version.
  9. A new light type will be created to ensure an easier management of the intensity value in PBR mode.

I should not forget a lot here and I hope you understand the future change. This is planned to happen during this month so do not hesitate if you have any feedback, think about any blockers or other evolution you would like to see in.

As a consolation gift for the breaking change, I can propose to add the pbr exporter in 3dsMax or blender ?

Link to comment
Share on other sites

So 3 and 4 have been done in : https://github.com/BabylonJS/Babylon.js/pull/2238

This also adds a few goodies I will document at the end of the week. Basically instead of introducing a Big Breaking change, we decided to kept the old fat PBR and add two new smaller ones fitting better with your favorites workflow Metal/Roughness and Spec/Gloss. They are matching pretty much with the gltf 2.0 definition from Krhonos.

To simplify the setup, the environment texture is now available and shared directly from the scene and you also can directly create your Skybox from there with the createDefaultSkybox method (more documentation to come soon).

As loading those texture might be slow and you do not necessarily want to wait for them before rendering, a new property of the Textures called isBlocking has been introduced to allow rendering during the texture loading.

I am now strictly dedicated to fix the PBR Maths issues until the end of the week.

... Almost There ;-)

Link to comment
Share on other sites

  • 2 weeks later...

I was a bit distracted (for the best) with shadows and lights issues :-) so can come back to this now.

So 9 was done as part of this and 8 has been almost all done as well it is getting definitely closer.

For 9 (new light type), we did chose to keep back compat at max level and we only introduced a new intensityMode on the existing lights really usefull in PBR.

For 8 (UBO, push and so on) @Deltakosh volunteered himself to do it so was easy for me :-)

Link to comment
Share on other sites

  • 4 weeks later...

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...