Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Glowing Effect
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Orkl
Squire

10 Posts

Posted - Apr 24 2003 :  10:49:09 PM  Show Profile  Reply with Quote
In a game (for example Helbreath or Dungeon Siege) sometimes an Item will "Glow", I was wondering how you could do that? If anyone has any suggestions... Post 'em :

Eric Coleman
Gladiator

USA
811 Posts

Posted - Apr 24 2003 :  11:13:17 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
For a glowing effect, you would render a slightly larger copy of the model using special textures and alpha values depending on the normal. To make the model "grow", not the same as scale, you need to add a small percent of a vertex's normal to itself. This makes each piece of geometry grow outward as though its expanding like a balloon. The next step is to take this modified geometry and alter the alpha value per vertex relative to the camera viewport. I think a nice glow would be a cosine curve of the dot product between the "lookat" vector and the vertex normal. Of course, you can use a different curve if you would like. If you do a search for my name at http://www.planetsourcecode.com/ you'll fine a transparency sample that I uploaded. The vertex alpha is the opposite of what you would want. The effect that I was trying to create was a membrane effect, like a jellyfish, where the surface is transparent when you look at it in a straight line, and then becomes less transparent when you look at it from an angle. A glow effect would the opposite I think. I think I use a sin^10 function for the alpha values. You could easily change the sin to cos in the source code to see what I'm talking about. Of course, its been so long since I looked at that code, I may have my sin and cos mixed up. Its either one or the other.

Go to Top of Page

Orkl
Squire

10 Posts

Posted - Apr 25 2003 :  02:34:22 AM  Show Profile  Reply with Quote
ok, i have no idea what: Vector, Vertex or Alpha values mean.. lol

or how you would use sine and cosine in programming =S
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Apr 30 2003 :  10:01:56 AM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
Well, to do any advanced game programming, you'll need to be fairly proficient with math. Also, you never said if this was for a 3D game or for a 2D game. For a 2D game its a bit easier. You would simply use Adobe Photoshop or Gimp or whatever your favorite image editing program might be, and then apply a glow filter/effect to the sprite. Then just blt the "glowing" sprite instead of the normal sprite whenever you want it to glow.
Go to Top of Page

Orkl
Squire

10 Posts

Posted - May 09 2003 :  08:43:04 AM  Show Profile  Reply with Quote
ahhh ok, well it was for a 2d Isometric game :D

i know I need to be proficient at maths, but hey, only s**t they teach us in year 10 is "Indicies" and "Square Root"... Like i'll EVER need that...
Go to Top of Page

AT
Squire

18 Posts

Posted - May 09 2003 :  5:29:44 PM  Show Profile  Reply with Quote
That trig might come in handy ...
What do you think you need to use for distance calculations ?
Go to Top of Page

Bonez2044
Squire

USA
15 Posts

Posted - May 12 2003 :  02:00:47 AM  Show Profile  Send Bonez2044 an AOL message  Click to see Bonez2044's MSN Messenger address  Send Bonez2044 a Yahoo! Message  Reply with Quote
I just wanted to know if i can make my sprites glow that only i wear?

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.