Sign in to follow this  
Carlos Martinez

SFML - Is there a way to implement lights?

Recommended Posts

Well, this is what I have done:

 

http://www.youtube.com/watch?v=WscKWTXxvbY&feature=youtu.be

 

It's nothing amazing, but ignoring it, I was looking for a way to implement a small light on every bullet, first because the bullets can't be seen very well, but I don't want to use sprites for these... Is there a way to do that? I've been trying the sf::BlendMode::Add, but idk how does that exactly work sad.png.

Share this post


Link to post
Share on other sites
BeerNutts    4400

Let me add, you can also do something much simpler, which is create a larger "layer" of all white for your glow around your bullets, and then do blendmode on it

 

Like this (see the player with glowing armor, and glowing bullets):

enemies1.png

 

Here's a link describing creating the glow image.

 

See my blog entry here detailing the code to do this.  You can find gimp tutorials on how to create the fuzzy white outlines for the glow effects.

Edited by BeerNutts

Share this post


Link to post
Share on other sites

Let me add, you can also do something much simpler, which is create a larger "layer" of all white for your glow around your bullets, and then do blendmode on it

 

Like this (see the player with glowing armor, and glowing bullets):

enemies1.png

 

Here's a link describing creating the glow image.

 

See my blog entry here detailing the code to do this.  You can find gimp tutorials on how to create the fuzzy white outlines for the glow effects.

 

Great work with that, thanks!

Share this post


Link to post
Share on other sites
superman3275    2061

For lighting, I use a matrix of black pixels with different transparency values and draw them on top of my image. Depending on the lighting in that area, the transparency is changed.

 

Cheers :)!

Share this post


Link to post
Share on other sites

For lighting, I use a matrix of black pixels with different transparency values and draw them on top of my image. Depending on the lighting in that area, the transparency is changed.

 

Cheers smile.png!

 

Hmm, that sounds simpler, the problem is that every bullet is a mini-circle, it has the same color all over it, I try it, but I can't see any difference, lol

Share this post


Link to post
Share on other sites

Here's a link describing how to do make the glow around your objects.

 

Begginer question here, does gimp have a way to paint all the silhouette white?

 

Edit: Solved, but i think my gimp have a bug, when i apply the DoG all the layer gets transparent, what the..

Edited by Carlows

Share this post


Link to post
Share on other sites
superman3275    2061

I'm just going to say this as someone who has done advanced graphics design work with Photoshop and Gimp: Just use one of the many great selection tools to get rid of everything around your ship, and delete it. Then, use a selection tool to get the area around your ship only. Then run the paint brush (with your glow color selected) over this selected area.

 

I hope that wasn't too confusing.

 

Cheers :)!

Share this post


Link to post
Share on other sites
frob    44911

The discussion was happily concluded eight months ago.  The little demo movie is cool, but probably belongs in its own thread. I'm closing this one so it can resume its peaceful "long slumber". 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this