Specular highlight on a 2D shape,
Members - Reputation: 136
Posted 14 July 2012 - 04:09 PM
What would be the fastest way to render a dynamic specular highlight (light reflection) to a 2D shape?
I'm talking about this effect:
I have no idea how those are made, but in both examples the highlight moves dynamically along the surface of the shape.
Of course, as this is not a 3D mesh, but rather a flat object, none of the common shading algorithms ( http://en.wikipedia.org/wiki/List_of_common_shading_algorithms ) work here.
I couldn't find anything helpful though Google as I don't know the name the effect.
Members - Reputation: 3018
Posted 14 July 2012 - 04:30 PM
Now, if you are talking about a 3d object thats being represented by a 2d sprite, then you simply normal map it and shade it like normal http://en.wikipedia.org/wiki/List_of_common_shading_algorithms
Members - Reputation: 1819
Posted 15 July 2012 - 07:02 AM
I see what you did there!
shade it like normal
(Also your advice is bang on the money.)
Members - Reputation: 2384
Posted 15 July 2012 - 08:35 AM
I have to stick with a 2D mesh, so I have to find a way to fake the effect.
You allready did get answer how to fake it. Use normal map. You can simplify the process becouse you don't need to care about tangent space or such. Just use object space normal map and transform lights to object space and done.
Crossbones+ - Reputation: 4524
Posted 16 July 2012 - 03:13 AM
once you have the height map, you can do emboss bump mapping, to have a specular highlight, you just need to remap your linear intensity to some curve.
that's how we were doing it back then, on amiga etc.
this one has some nice pictures that explain it on high level: