Jump to content
  • Advertisement

Archived

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

Petru

Lightmap + Bump(DOT3)

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

Has anyone an ideea about how to combile a lightmap and a bumpmap done with Dot3? DOT3 gives as result gray collors form (0,0,0) to (1,1,1). If I modulate that with lightmap, it''s not very real. Any ideea? Thanks, Pet.

Share this post


Link to post
Share on other sites
Advertisement
quote:

If I modulate that with lightmap, it''s not very real.


Why not ? DOT3 basically gives you monochrome shadow information. The higher the value, the more light the texel recieves. Lightmaps define how much (coloured) light a texel receives, when there is no perpixel shadowing.

So, multiplying both will yield correct results:

cres = base_texture * lightmap * dot3_shadow

/ Yann

Share this post


Link to post
Share on other sites
Yes, I figure it out that if the lightmap contains light information without angle attenuation (just distance attenuation) it will work. But only for 1 light.
After trying different methods, the conclusion I jumped to is that for doing real lighting with more than 1 light you have to do one pass for each light. And to do it faster you need more that 2 textures stages which is not available on my GF2MX. At least, it said it supports 8 blending stages but max 2 simpultaneous textures, which is pretty dumb .
An appropiate to real model is by premultipling bump maps for all lights and then modulate that with a global lightmap for all lights. That''s for a polygon.
Pet.

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!