• Advertisement

Archived

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

Simple radiosity?

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

What kind of textures do games use as lightmaps? Tons of small textures? A few building blocks used again and again? Unique textures all over the scene? I would like to do some radiosity on a simple scene without round edges a such. I only need one lightsource too (eg. like the sun), nothing fancy. What is the very, very simplest way to do it? Hounestly I have no idea where to start, and information on the internet is way too complicated to start up with. Im using OpenGL, but that shouldnt matter much. Thank you :o)

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Listening! =;-))

Share this post


Link to post
Share on other sites
Lightmaps are not re-used over and over; the verteces of any given polygon have a unique texture coordinates/texture combination. Better engines combine the lightmaps of multiple faces into single power-of-two textures to increase efficiency.

Now I'll give you some simple radiosity pseudocode:

    

For T = 0 To NUM_BOUNCES
Find patch L with highest light intensity
For each patch P
Cast ray from L to P
If ray not blocked
P.intensity += L.intensity * Cosine_of_the_angle_between_them
Next P
Next T



Edited by - TerranFury on February 23, 2002 11:13:24 AM

Share this post


Link to post
Share on other sites
Yup, you probably need one lightmap texture for every surface in the scene. However, lightmap textures can be of really low resolution and will usually look good enough as long as they are applied using interpolation, especially if they are blended with detail textures.

Share this post


Link to post
Share on other sites

  • Advertisement