Archived

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

ktron

simple direct3d questions?

Recommended Posts

Hey, I got a few questions about lightmapping for all you direct3d gurus! 1. First, I understand the basics of direct3d lights and the idea behind lightmapping. My question is, when custom lightmapping data is generated for, say, an entire map, how does the application know how to light a md3, say? As I understand it, lightmaping data is stored as a large texture that is blended over a bunch of primitives. This texture is pre-generated, correct? So how would an application know to light a md3 model for colored lighting? does the engine figure this out from it''s internal (custom) light list everyframe and color the model''s vertex''s based on the models location relative to the lights? 2. second, in quake3, the texture''s can be shaders, right? Does quake3 handle it''s own shader rendering in software sincehaardware shaders aren''t really common yet? That''s about it for now, thanks all. Kevin

Share this post


Link to post
Share on other sites
Actually, I was thinking about that myself the other day. This technique was used not only in Quake3, but in pretty much every FPS since Half-Life. I was thinking that in addition to the light mapping, there was also a D3D point light also placed in the same position as the lightmap, but it excludes lighting the level geometry, and only lights the character models. Perhaps as an optimization, they only turned on a D3D point light if the character was within a certain distance of the light. That way, they wouldn''t have to calculate lighting on every light in the map. I don''t know if this is really how they did it, but I guess it would work that way. Those are just my thoughts.

Ryan Buhr
Reactor Interactive, LLC.

Share this post


Link to post
Share on other sites