3

I'm working on 3d app using Libgdx engine, and using 3d API.

I need to change intensity of the light over time. I know there are three types of lights: Ambient, Directional, Point.

Only PointLight has option for changing intesity.

I'm trying to change intesity of Ambiental and Directional light, using alpha component of Color that I set to the light. But it's not working.

For example:

environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 1f, 1f, 1f, 0.1f));

and this:

environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 1f, 1f, 1f, 1f));

Are looking exactly the same, the same thing is with DirectionalLight.

Is there a way to achieve this???

Thank you!

Veljko
  • 1,893
  • 6
  • 28
  • 58
  • Intensity = brightness? – noone Aug 19 '14 at 11:40
  • Yes brightness. I guess i can proportionally reduce r g b components. – Veljko Aug 19 '14 at 11:42
  • Yeah, that would have been my solution now. – noone Aug 19 '14 at 11:43
  • How to acess again ambient light after I set it. I can easily access point lights and directional lights via environment.pointLights and environment.directionalLights. But I cant see how to access ambient light to change its brightness. – Veljko Aug 19 '14 at 20:26

0 Answers0