CollisionTreeExample - Displaying Colours LightState Disable
3 posts
• Page 1 of 1
CollisionTreeExample - Displaying Colours LightState Disable
Hi
The light-state in the CollisionTreeExample example is set to false and we see the colours of the objects and collisions:
If we enable the light-state we only see a gray-scaled model:
How do we view the colours with light-state enabled?
Graham
The light-state in the CollisionTreeExample example is set to false and we see the colours of the objects and collisions:
- Code: Select all
protected void initExample() {
_lightState.setEnabled(false);
If we enable the light-state we only see a gray-scaled model:
- Code: Select all
protected void initExample() {
_lightState.setEnabled(true);
How do we view the colours with light-state enabled?
Graham
- gmseed
- regular
- Posts: 117
- Joined: Tue Jan 03, 2012 3:53 pm
Re: CollisionTreeExample - Displaying Colours LightState Dis
See BoxExample:
When lighting is enabled, colors come from your MaterialState instead of vertex colors. But if you setup your MaterialState as above, it will pass through the vertex colors for the given property (Diffuse, Ambient, etc.)
- Code: Select all
// Add a material to the box, to show both vertex color and lighting/shading.
final MaterialState ms = new MaterialState();
ms.setColorMaterial(ColorMaterial.Diffuse);
box.setRenderState(ms);
When lighting is enabled, colors come from your MaterialState instead of vertex colors. But if you setup your MaterialState as above, it will pass through the vertex colors for the given property (Diffuse, Ambient, etc.)
Gratitude is a mark of a noble soul and a refined character.
-

renanse - Site Admin
- Posts: 2958
- Joined: Tue Oct 28, 2008 6:49 pm
- Location: Austin, TX
Re: CollisionTreeExample - Displaying Colours LightState Dis
Hi
Thanks for your reply - that resolved the problem.
Graham
Thanks for your reply - that resolved the problem.
Graham
- gmseed
- regular
- Posts: 117
- Joined: Tue Jan 03, 2012 3:53 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest