Render unlit surface

View previous topic View next topic Go down

Render unlit surface

Post  AstAn on Sun Sep 27, 2009 12:11 pm

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.

AstAn

Posts : 12
Join date : 2009-08-22

View user profile

Back to top Go down

Re: Render unlit surface

Post  AstAn on Tue Sep 29, 2009 10:07 am

Does anyone has an idea why this happens?

AstAn

Posts : 12
Join date : 2009-08-22

View user profile

Back to top Go down

Re: Render unlit surface

Post  sio2interactive on Fri Oct 02, 2009 6:28 am

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,

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Render unlit surface

Post  AstAn on Sat Oct 10, 2009 5:45 am

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 Sad

AstAn

Posts : 12
Join date : 2009-08-22

View user profile

Back to top Go down

Re: Render unlit surface

Post  sio2interactive on Sat Oct 10, 2009 3:20 pm

Check tutorial08 for a simple example or, for an example of advanced rendering check the MeditationGarden source.

Good luck!

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Yes, get the MeditationGarden source.

Post  sgreenwalt on Sun Oct 11, 2009 1:59 pm

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

View user profile

Back to top Go down

Re: Render unlit surface

Post  IanLinart on Sun Oct 11, 2009 3:29 pm

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
avatar
IanLinart

Posts : 26
Join date : 2009-08-12
Age : 29
Location : Montréal

View user profile http://iapps.linart.qc.ca

Back to top Go down

Re: Render unlit surface

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum