Some Lighting Questions
Ok, I have been stuck on the issue of lighting for quite some time and its been holding up all of my projects. I just can't decide what to use, so I have some questions that maybe someone of you can help me with so I can better decide which path to take.
I really do not want to use any form of vertex lighting. I originally implemented the Fixed function D3D lights and VS lighting and was not pleased with the results at all. Ideally I want to do per-pixel lighting, at this point I dont really care how. I have 3dsmax7 so I can use those light maps but what is the best way to apply them to the models after I render to texture? I see that 3DS does it in the viewport and if I could just mimic that it would be fine. I also tried Dot3 bump mapping, but I only found information on using that with direction lights and I need point lights as well. Does anyone have some links to good tutorials for per-pixel lighting with Pixel Shaders or anything like that?
Thanks in advance for taking the time to read my post.
I can only give you hand with that dot3-bumpmapping with point lights:
to get the direction vector of the light you simply subtract the point lights origin from your current point so:
LightDir = LightOrigin - CurrPos
should be enough... the rest should be the same as for directional lights.
to get the direction vector of the light you simply subtract the point lights origin from your current point so:
LightDir = LightOrigin - CurrPos
should be enough... the rest should be the same as for directional lights.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement