3D Screen Elements not affected by scene exposure

I have some text elements laid out around my scene using 3D Screen components. I am also controlling the exposure of my scene using this.app.scene.exposure.

For some reason, the 3D Screens are not affected by scene exposure - when I bring exposure down to zero, they are still totally visible. I have tried changing the layer from UI to World but it makes no difference.

Is there any way around this?

Hi @steve_wk,

I think that’s by design (@yaustar) since UI elements aren’t usually affected by the scene lighting.

Though for 3D screens I think you have a point, they should. If you use a regular material instead of a texture or sprite in your elements and set the render layer to World then exposure affects the element.

I understand though this is partially a fix since the same can’t be used with text elements.

1 Like

We have a 3d text script somewhere (final stage of this) https://twitter.com/willeastcott/status/1350781522891198466

scripts: https://github.com/playcanvas/engine/tree/master/scripts/textmesh

which is getting lights and stuff … perhaps that could be useful to you if you only need text.

2 Likes

Yep, by design. The material is fully emissive IIRC.

There is private API for changing the material if you want to go down that route: https://github.com/playcanvas/engine/blob/47ea4e509ef771c27ecf1fc43626e34f0a7bf84f/src/framework/components/element/text-element.js#L562

1 Like

Thanks everyone. That 3D text script is really cool, definitely going to come in useful at some point in this project I think!

For now, since I’m driving the exposure value of the scene with an event anyway, it was pretty quick to make a script to add to text elements which just uses the same value to drive opacity. Does the job just fine for now.

Thanks!

2 Likes