Archived

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

n0ob

Lighting effects...

Recommended Posts

I need to have effects of explosions in my terrain, in the form of lighting right now. I was using d3d lights, but that''s a bit too slow for me right now. So I''m thinking about using other methods. I still want to use alpha blending to create cool additive effects for my lights. So I was thinking of using vertices with position and diffuse, and then use a material to animate the light so it fades out. Or I was thinking I could use a texture for alpha values, letting me use a single quad for each light. I need advice. Help? Thanks!

Share this post


Link to post
Share on other sites
A combination of that affect is what I use. You can see a demonstration here. I create temporary DX lights for localized effects like explosions, laser blasts, etc. and then draw an addative-blended quad on top of the scene at the center of the light. It''s simple, but it works amazingly well for the sort of scenery I have.

Since you''ve got terrain, you will have to be careful how you draw your quads, so they aren''t masked by the terrain.

---
http://www.gapingwolf.com

Share this post


Link to post
Share on other sites
Well, my ''terrain'' is flat: i''m doing a 2d top-down game. This should make things a tad different ^_^ Could you explain a bit more about what you meant by ''localized'' effects, and ''temporary'' lights? I see you drew an additive quad, but what part of the quad is creating the effect? Texture? Material? Thanks.

Share this post


Link to post
Share on other sites
Ahh, I think I see what you mean now.. You created the light to light up the ship model in that example, and drew the quad for the flare effect. So you have different flare textures and stuff, in the shape of a laser, or flare that you put on the quad as a texture? thanks!

Share this post


Link to post
Share on other sites