Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Need to move directional lighting with 3D text

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
robertwinter
Posts: 49
Joined: 27 Nov 2012, 21:53

Need to move directional lighting with 3D text

Post by robertwinter » 07 Jul 2015, 18:21

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?

User avatar
lerou
Posts: 345
Joined: 06 Sep 2013, 07:14
Location: Hamburg, Germany

Re: Need to move directional lighting with 3D text

Post by lerou » 07 Jul 2015, 18:52

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
Attachments
specular.jpg
Specular
diffuse.jpg
Diffuse
ambient.jpg
Ambient

User avatar
lerou
Posts: 345
Joined: 06 Sep 2013, 07:14
Location: Hamburg, Germany

Re: Need to move directional lighting with 3D text

Post by lerou » 07 Jul 2015, 18:53

more attachments.
Attachments
light.vza
(21.24 KiB) Downloaded 220 times
compare.jpg
Compare

Post Reply