The color of the model changes when the DepthRange is modified

When calling setDepthRange(nodeIds, 0.0, 0.1);, the color of the model becomes darker. What additional steps are required to prevent this issue?

Hello @kwkang,

In the screenshots you provided, it looks like you have ambient occlusion on. With a depth range of [0.0, 0.1], the maximum depth range is reduced which is amplifying the ambient occlusion effect. You can try reducing the radius of the ambient occlusion via the function setAmbientOcclusionRadius to lessen the effect.

Also, are you applying depth range to the entire scene? Setting the depth range is more commonly used for specific nodes to always keep them rendered in the foreground.

Thanks,
Tino

I apply depthrange to only certain nodes, so that the amplification of the ambientocclusion effect occurs and is amplified only on the specific nodes where I apply depthrange. As far as I know, it is not possible to disable ambiendtocclusion for only specific nodes. How can I remove the ambientocclusion effect for only the nodes to which I have applied depthrange? Is there a way?

It’s not possible to apply ambient occlusion only at the node-level. It is applied to the entire scene.

If you would like to create a feature request through the Support Portal, it would very helpful if you also include the model you are using as well as specific settings to demonstrate the issue. This just makes it easier to evaluate your request, if you decide to create one.

Is there a way to not apply ambient occlusion to only certain nodes?

Ambient occlusion is applied scene-wide at the View level so it’s not possible to include or exclude specific nodes.