RE: [Algorithms] Simplified Dynamic Lighting For Animated Characters
Brought to you by:
vexxed72
From: Eric M. <ema...@um...> - 2001-09-03 22:08:20
|
> If all you want is to reduce the "tonal range" then having your diffuse > light contribute only a little bit (the 200/55 division) will take care of > that. However, the distance over which this range fades (the transition > between lit and shaded) is still fairly wide, in angle-over-surface terms. Yeah, I'm looking for a combination of both effects. More contrast (ie. harsher transitions from lit to unlit) for the edges and less tonal variation within the lit and unlit portions. > Basically, the normal direction at the point you're rendering is used to > look up a texel in a cube map (which consists of six separate square > textures, conceptually) -- after that, it's all regular multitexturing. If > you have multiple lights that you want to take into consideration, you'll > have to generate the cube map once per frame, from the point of view of the > object -- perhaps you could cache it and only regenerate it if the > object/lights moved "enough". To get a crisp transition band, you'd render > this cubic light maps as medium gray background (for shadow) with white, > softed circles(*) for the positions of the lights. This may get expensive > quick, though; especially if you want to do it once per skinned character > per frame (although still cheaper than true dynamic environment maps, as the > poly count is just one quad per light -- the cost should be all in the > set-up overhead). Thanks for the update on cube maps. :P Sounds like updating the cube map every frame or so will cost too much for the project I'm working on... > When I measured it, it was more like one-half more character on the screen. > But the stuff I'm working on has substantial other costs per character, > besides rendering. thanks for doing the test. characters will have quite a few costs other than rendering for my project too. That's why I'm trying to get the rendering portion simplified enough so the rest of the features can make it into the project. You're right, that the only way to really know is profile and do a test app...thanks for your help. it definitely helped me realize the other options out there. Well, time to play around with this. :P thanks again for yours, and everyone else's help. E. |