ok i just built a dynamic sky dome which has a sun and a moon with their colors changing based on the current time.
i tested it with terrain, it works great. the terrain color gets affected by the sunlight and moonlight as they shine on it.
but i couldnt get the light to work with models.
i loaded a 3ds model (maggie) and a max model (toy soilder) into the scene. but the light barely has any effect on them.
but after i removed the material from the model, the light starts making changes to their colors.
my question is, how do i make the light affect these models?
I guess that is because those models use vertex coloring, which replaces lighting. Try using the emissive material mode.
so i should modify those models?
is there anything i can do programatically?
this topic is moved to the general section.
MaterialState ms = (MaterialState) model.getRenderState(RenderState.RS_MATERIAL);
ms.setColorMaterial(MaterialState.CM_EMISSIVE);
thx for the reply~ i found something interesting…
i accidentally moved the camera inside the model, and i found that the model inside is changing color based on the lighting~ whats going on? :?
is it a normal problem?
thx alot!!!
i finally found out whats messing with the lighting. the model's normal wasnt flipped~so all the lighting effect was inside the model~
i use maya flipped the normal, and everything now works perfectly fine!