Page 1 of 1

Need to move directional lighting with 3D text

Posted: 07 Jul 2015, 18:21
by robertwinter
Is it possible to reposition a directional light with a piece of 3D text?

For example, say I have a very simple scene with a single word of 3D text with a beveled face at the bottom of the screen. I have it lit with a directional light source pointing slightly down. If I move that text to the top of the screen, the lighting on the text changes. I would like to have the lighting on that piece of text stay constant somehow, moving as the text moves.

I've tried putting an axis in front of the directional light but that has no effect, Is there any way to accomplish what I'm trying to do?

Re: Need to move directional lighting with 3D text

Posted: 07 Jul 2015, 18:52
by lerou
Hi Robert,

a directional light has no position. The light direction is the same for every vertex, so the position of the element does not make a change. BUT: the direction from the object to the camera matters!

The light used in Ventuz has several components. I'll show it to you with a simple scene. There is a rectangle with a very high tesselation and a light source that is slightly tilted.

- Ambient: this is light that is added to the object no matter what. No dependencies. As you can see in ambient.jpg: all parts are lit the same

- Diffuse: this is light thrown on the object by the light source. The amount of light (the brightness) depends on the angle between the surface and the light source. For a directional light the light direction is the same for each position on the rectangle (because it's flat). Check out diffuse.jpg, it's also just a single color all over the surface.

- Specular: this is the one that depends on the light direction and the direction towards the viewer - or the angle between those two directions. It simulates the reflection on different surfaces. Look at specular.jpg. The light direction is the same everywhere, but depending on the angle you're looking at it (imagine your eye being a infinitely small point at the camera position) the amount varies. It's like the sun's reflection on a window. The light direction is the same. But you can move around to either see the sun's reflection or not - the view direction is important.

So if you're using the specular part, you will get different results with your texts. Try to disable that for a test. Use only diffuse. The last image (compare.jpg) shows that. Left side: diffuse + specular. Right side: only diffuse. You can see that on the left the colors are different and on the right they are not.

Best,
rou

Re: Need to move directional lighting with 3D text

Posted: 07 Jul 2015, 18:53
by lerou
more attachments.