Is there a method to use 3dl files to prevent some models in the scene from being affected by 3dl material properties

Is there a method to use 3dl files to prevent some models in the scene from being affected by 3dl material properties

No 3dl file material, the model is shiny,Add a 3dl file to the scene, All models are affected。

Babylon, thank you. I need your help


2024-05-31_160714
Specific cases
https://playground.babylonjs.com/#1HMBOT#2

Hello :slight_smile:

Yes it’s possible, basically the problem come from the fact that the post-processing is camera based. Therefore you need to setup a multicamera scene. One camera for post processed meshes, the other for no postprocessing. I had explained a way in this topic.

Here is what is needed :

  • Creating 2 cameras : camera, noPostProcessCamera
  • Putting noPostProcessCamera on another layer (0x10000000), same for the unprocessed meshes

The above is quite simple and gives this result : Playground


Now the problem is that there is a depth issue with PostProcessing and multicameras. You need to setup a shared depth texture for the postprocessing pipeline :

  • Set up a RenderTargetTexture
  • Set up a PassPostProcess for the noPostProcessCamera
  • Share the depth with pipeline.imageProcessing.inputTexture.shareDepth(rtt.renderTarget)

Here is the thing put together : Playground


Hope it helps :slight_smile:

++
Tricotou

1 Like

Thank you for providing ideas. Thank you,
Is it necessary to use multiple cameras to achieve this

As far as I know, if you want to remove specific objects from PostProcessing, yes…
Otherwise an other way would be to do two render passes with the same camera, but I’m not sure it will ease the stuff ^^

1 Like