Jump to content
  • Advertisement

Archived

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

Rikk

Non-real-time shadows?

This topic is 6388 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

Hi. I''m pretty new to c programming and very new to OpenGL so I thought it would be a great idea to make a 3D engine for my second c game. So far I''ve made a basic program to look around a 3d world and a simple windows style map making program. I''ve seen the real-time shadows you can produce with OpenGL but there is a lot to be said for non-real time lighting effects like in quake2 and improved Half-life. Is there a way to map darkness or color onto only part of a textured face/quad without splitting it up into many smaller pieces? Is there a way to do it using one of the glColor...() functions?

Share this post


Link to post
Share on other sites
Advertisement
>>? Is there a way to do it using one of the glColor...() functions? <<
not really have a search for lightmapping on the web

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
I have never read some theory about lightmapping/shadowmapping, but i suspect that you have to use Multitexturing, first texture the walls with the normal texture, follow that with a texture which is your shadow texture (use alpha blending), you have to precalculate the shadow textures though.

Share this post


Link to post
Share on other sites
cool. thanx. I searched for help on lightmapping and I got some great help. it''s running sweet at the moment but needs tweaking.

Is there a simple way of doing multitexturing? the tutorial with the bumpmapping is way to complex for me.
I just want to multiply the two textures together in one pass, to speed things up.

Share this post


Link to post
Share on other sites
a lot of examples of multitexturing on my site . also theres a couple of bumpmapping as well

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
You can do fake non real time shadows very simply by drawing a dark spot textured quad underneath an entity.
this doesn''t require multitexturing.

And no, the V2''s definitely do not support Multitexturing.

-Mezz

Share this post


Link to post
Share on other sites
I''ve seen that method before. Simple, but effective. I will probably use that, thanks.

Share this post


Link to post
Share on other sites
You can do multitexturing without the extension:

1) Make sure that the Zbuffering is set at less than or equal(forgot the constant)

2) Draw the first Triangle with the color texture

3) Draw another Triangle at the same place with texture of the lightmap in the alpha channel

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!