Skip to main content
GameDev.net gamedev.net
🔒 Locked

Lightmap + Bump(DOT3)

Started by Petru Jul 25, 2002 at 2:45 AM 1 replies 800+ views
Original Post
Petru
Petru
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.
Yann L
Yann L
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
Petru
Petru
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.