Using ReflectionProbe.cubeTexture as scene.environmentTexture has different effects comparing with other textures such as HDRCubeTexture

Here is the demo:

Hi,I’m trying to config a neutral scene environmentTexture just like the texture generated by RoomEnvironment scene and PMREMGenerator.fromScene in threejs.In this demo,you can see what I have done;To be honest,it is quite close to the threejs effect.The question is the model using PBRMaterial will reflect all of the RenderTargetTexture even the wall with transparency.Just like this below:

even the wall reflect the cube from the RenderTargetTexture

But if I use the HDRCubeTexture,the wall will never reflect details but affected by lights

as you can see,the wall is clean.

So what’s the difference between RenderTargetTexture with other type texture as scene envrionmentTexture?I was confused

The main diff is that the texture has not been pre processed to create an environment.

You should use real time filtering for this: Real time PBR filtering is coming to Babylon | by Babylon.js | Medium

Wow,thanks for your help!It works,but it also has performance problems.When I use ArcRotateCamera and zoom or pan the scene,it resulted low fps.Have any advice?:slightly_smiling_face:

Another problem,it’s about the OpenPBRMaterial which merged into the code repo recently.I tested this material and it looks better than PBRMaterial especially processing the transparency and refraction, but when I import gltf file like in the demo above,some textures render with errors and webgl report errors.

I tested it on the mac os.

Could you share a repro for the issue ?

Since the OpenPBRMaterial has not yet published,maybe you have to try it locally and the model you can use to test is in the demo I provided . Just use the ImportMeshAsync and set the options.useOpenPbr as true ,and set the scene a ArcRotateCamera then you zoom or pan the scene, you can see the errors reported by the webgl and the some parts of the ground in the model just render dark color

it is available in the playground

ok,please wait

You can try it by zooming the scene until you can see the model,and the errors in the console panel will just like this

the ground renders not properly

maybe it just lose the texture information

Let see if @MiiBond can have a look but I am sure he will pumped to know ppl are already using his new addition :slight_smile:

About the performance issue,will you provide some advices?please

@sebavan

I have temporarily reduced the size of realTimeFilteringQuality to alleviate the lag phenomenon, but I would like to ask what impact this attribute has on material rendering from 1 to 8. I have made several comparisons and did not find any significant differences

@sebavan

This PR will fix the problem with the shader:

Thanks :smiling_face_with_three_hearts:

Oh,the shader no more reports errors,but the ground texture still render as a dark plane,will you fix this?Or @MiiBond can help ?

I had a look, the plane renders black because specular weight is 0 for the material.

@MiiBond Shouldn’t we set the specular weight to 1 by default?

Here’s the PG I used to unit test:

The full PG, with specularWeight sets to 1 for all OpenPBR materials:

I have a rough idea of what’s going on. It seems that in OpenPBR Material, all materials are treated as metallic materials, and no special treatment is given to non-metallic materials with metallicFactor 0 or undefined values. Therefore, non-metallic materials will appear as metallic black if their specular factor is 0