Jump to content
  • Advertisement

Archived

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

lythm

About Shadow, Help plz

This topic is 5544 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to create shadow for my character system.How did you guys do in your engine.Is there any easy algorithm to do that? any idea or links will be appreciated. Thanks in advance. i found it hard, it''s hard to find, oh well whaterver nervermind.

Share this post


Link to post
Share on other sites
Advertisement
Are you using OpenGL or DirectX??? I ask that because i don't know if every aspect can be used in both of them!!! I'll talk about OGL.

If you are using OpenGL then nVidia's site is a start. Try to search for shadows. There are many ways of creating shadows. The main ingredient for all of them, is stencil buffer. If you know how to use stencil then you know the half part.

1) Planar Shadows
2) Shadow Volumes
3) Projected Textures
4) etc.

Also a good tut on shadows is NeHe's.

Start form nVidia to get the first idea. They have many demos, run everything you find, see the result and if you like it try it. I think NeHe's tut, is a little difficult for beginning, because it computes connectivity between polygons, computes a silhouette, and then it calcs the shadow from it. It's a little tricky...

Also try to find Mark Kilgard's paper on stencil buffer. It has the basics for stenciling and it shows you a simple (but slow) way to make shaodws. Planar Shadows.

Hope that helped.

PS. These ways i suggest, are suitable for dynamic shadowing. You talked about character system, didn't you. Other ways for static shadows, are lightmaps produces in different ways. Simple Calcs (point lights, with finite radius), Radiosity (Polys cast light to other polys), etc.

HellRaiZer

[edited by - HellRaiZer on April 18, 2003 2:55:01 AM]

Share this post


Link to post
Share on other sites
Thank you so much,HellRaiZer.
im working on a MMORPG game currently, can u give me some quick info about which technique is fit to make shadow in MMORGP? Im reading but it would take much time for me to make a conclusion, i think.

Share this post


Link to post
Share on other sites
If you desperatly want shadows...

glColor3f(0.0f, 0.0f, 0.0f);
glTranslatef(0, groundpos, 0);
glScalef(1.0f, 1.0f, 0.01f);
DrawObject();

glLoadIdentity();
DrawObject();

This is an extremely quick hack to implement shadows. It doesn''t take into account light position or anything.

However if you want to do proper shadows, check out the tutorial on NeHe''s site or on the NVIDIA Dev site.

Share this post


Link to post
Share on other sites
Choosing the shadow technique should not be based on the game style, but the visual quality and performance. You should read through the different methods briefly to get an idea of their features. Start with a simpler one and if it''s not enough in the end, change it.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!