Render unlit surface
4 posters
Render unlit surface
For my background I want to render an unlit plane in the background.
My problem is that although I call
sio2LampReset();
Light::ResetCurrentLightNum();
sio2LampResetLight();
the surface is still lit. I guess I am missing some reset method.
My problem is that although I call
sio2LampReset();
Light::ResetCurrentLightNum();
sio2LampResetLight();
the surface is still lit. I guess I am missing some reset method.
AstAn- Posts : 12
Join date : 2009-08-22
Re: Render unlit surface
Does anyone has an idea why this happens?
AstAn- Posts : 12
Join date : 2009-08-22
Re: Render unlit surface
Its hard to tell with the little information you post up there... anyway... check tutorial08, you have there everything you need to know about lighting.
If you want to see some advanced technique of ligthing using SIO2 I suggest you to take a look at the meditation garden source...
Good luck,
If you want to see some advanced technique of ligthing using SIO2 I suggest you to take a look at the meditation garden source...
Good luck,
Re: Render unlit surface
I found something that might help to track the problem.
When I set the ambient light with sio2LampSetAmbient then the last value I set is used to render all objects.
So when I do
sio2LampSetAmbient(white);
RENDER_UNLIT_OBJECTS
sio2LampSetAmbient(default);
RENDER_LIT_OBJECTS
Then all objects are rendered with the default ambient light, including the unlit ones.
Something seems still to be wrong with my light set up.
Here is the whole rendering I do:
sio2LampResetLight();
sio2LampReset();
RENDER_CAMERA
sio2CameraUpdateFrustum(camera);
SORT_OBJECTS
RENDER_UNLIT_OBJECTS
RENDER_LIGHTS
sio2LampEnableLight();
RENDER_LIT_OBJECTS
At the end all objects are lit
When I set the ambient light with sio2LampSetAmbient then the last value I set is used to render all objects.
So when I do
sio2LampSetAmbient(white);
RENDER_UNLIT_OBJECTS
sio2LampSetAmbient(default);
RENDER_LIT_OBJECTS
Then all objects are rendered with the default ambient light, including the unlit ones.
Something seems still to be wrong with my light set up.
Here is the whole rendering I do:
sio2LampResetLight();
sio2LampReset();
RENDER_CAMERA
sio2CameraUpdateFrustum(camera);
SORT_OBJECTS
RENDER_UNLIT_OBJECTS
RENDER_LIGHTS
sio2LampEnableLight();
RENDER_LIT_OBJECTS
At the end all objects are lit
AstAn- Posts : 12
Join date : 2009-08-22
Re: Render unlit surface
Check tutorial08 for a simple example or, for an example of advanced rendering check the MeditationGarden source.
Good luck!
Good luck!
Yes, get the MeditationGarden source.
The MeditationGarden source clears up a lot of things. It is well worth the price (I think $99) and will save you a huge amount of research (trial & error) time. Also, the MeditationGarden source demonstrates complete game architecture (including multithreading for sound and physics culling), whereas the tutorials tend to focus on specific things (leaving out the big picture). This is not a paid endorsement. I am giving you my own personal experience.
sgreenwalt- Posts : 18
Join date : 2009-04-24
Location : Layton, Utah
Re: Render unlit surface
sgreenwalt wrote:The MeditationGarden source clears up a lot of things. It is well worth the price (I think $99) and will save you a huge amount of research (trial & error) time. Also, the MeditationGarden source demonstrates complete game architecture (including multithreading for sound and physics culling), whereas the tutorials tend to focus on specific things (leaving out the big picture). This is not a paid endorsement. I am giving you my own personal experience.
I totaly agree
Similar topics
» Sub Surface
» problem with surface
» Ball on surface physics
» Getting objects to "stick" to a surface with friction
» Render 3D Object in GUI
» problem with surface
» Ball on surface physics
» Getting objects to "stick" to a surface with friction
» Render 3D Object in GUI
Permissions in this forum:
You cannot reply to topics in this forum