GLBasic forum

Main forum => Off Topic => Topic started by: erico on 2013-Nov-24

Title: Sprite Lamp - dinamic light
Post by: erico on 2013-Nov-24
Here is a project to bring dinamic light to 2d sprites.
Quite nice idea.
http://snakehillgames.com/spritelamp/
Title: Re: Sprite Lamp - dinamic light
Post by: Kitty Hello on 2013-Nov-24
As I see you need 4 light maps per sprite insread of ohe heightmap? If so... why!? It'd be easier to generate them from a height map imo.
Title: Re: Sprite Lamp - dinamic light
Post by: Kitty Hello on 2013-Nov-24
...but yeah, great concept!
Title: Re: Sprite Lamp - dinamic light
Post by: Wampus on 2013-Nov-24
I wonder what performance would be like on mobile devices. Could conceivably do lighting similar to The Swapper? Will be curious to see how this develops.
Title: Re: Sprite Lamp - dinamic light
Post by: mentalthink on 2013-Nov-24
Very very interesting...
Title: Re: Sprite Lamp - dinamic light
Post by: erico on 2013-Nov-25
Yep, nice concept. Could be achieved in GLB.
But one wonder about the ´at least 2 extra images per frame' situation and how/where exactly to use this.

I think it could be done with alpha blendings and we are probably looking into expensive use.?
Maybe not for a low res game without close background.
Title: Re: Sprite Lamp - dinamic light
Post by: mentalthink on 2013-Nov-25
I think in a first Step, use the Ligthmap image reduced twice timer or 4 , beause the lighting don't need the resolutión of the diffuse...

But know thinking in this cool trick, perhaps it's possible add another chanel like >Specular, and them really the flat image will be a very good fake 3D.
Title: Re: Sprite Lamp - dinamic light
Post by: fuzzy70 on 2013-Nov-25
I just wish I had the pixeling skills to draw just the diffuse map let alone 4 shaded one  :D

Cool looking result though I have to admit  :good:

Lee
Title: Re: Sprite Lamp - dinamic light
Post by: mentalthink on 2013-Nov-25
For the images I can do a simple Image and getout the normal map... the blue and pink Image it's normal map in 3D, I think have to works fine...
And someone test the Code...

This night I try to make some figure in Cinema, we look whats' happend.  :good:
Title: Re: Sprite Lamp - dinamic light
Post by: mentalthink on 2013-Nov-25
HI guys I never mind I have in my HD...
If anyone want make a test I leave attach 2 images , SCI-FI, normal and diffuse map (normal map it's only one image)
I bought some textures for the Black SUn, if you want use for you project or anything , no problem.

I think the trick can works if we put the neutral color in 4 images using this normal map, but modifing parts in top botoom left and rigth, then we mix with alpha... I suppose doing this have to works, playing with the 4 values of alphamode perhaos we get a cool FX...