Archived

This topic is now archived and is closed to further replies.

penetrator

Lesson27 me too ...

Recommended Posts

penetrator    122
I have two problems: the first is that i am not able to render objects in different colors, the get the light color only. Second problem: if you take a look at the objects1.txt that loads the model, i recognize the 16 verticies but what are the 24 planes and how are they retrieved ?

Share this post


Link to post
Share on other sites
BGCJR    100
the planes hold indexes to the vertices.
maybe a color before drawobject or in drawobject function.
and disable Lighting.


[edited by - BGCJR on August 14, 2003 9:45:26 AM]

Share this post


Link to post
Share on other sites
penetrator    122
Thanks BGCJR, lighting is ok now. What i cannot understand is how to load more complex objects. For example, if i want to load a sphere or smt with lot of verticies, how would i correctly generate the .txt file to load ? In the tutorial is not very explicit.

Share this post


Link to post
Share on other sites
Wildfire    154
It''s not "wrong". The problem is that stencil shadows are not "cut off" once they''ve hit an object. You could implement all sorts of clipping, this could also improve performance quite a bit.

If the sphere was also casting a shadow you wouldn''t notice it though. Because the ''shadow on the back'' would be hidden by the spheres own shadow.

Share this post


Link to post
Share on other sites
Wildfire    154
Sorry, I''ve never done NeHe''s Tut #27. I''ve learned how to do stencil shadows by reading various tech-papers on nVidias site. Nehe''s tutorial wasn''t up at that time...

My best guess would be that he updated the code, but forgot to update the tutorial as well...

I think that''s the one I used most.

Share this post


Link to post
Share on other sites