Specular highlight on a 2D shape

This topic is 2342 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi,
What would be the fastest way to render a dynamic specular highlight (light reflection) to a 2D shape?

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.

Share on other sites
Well, flat objects don't have specular highlights like that.

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

Share on other sites

I see what you did there!

Share on other sites
I have to stick with a 2D mesh, so I have to find a way to fake the effect. Edited by pekhe

Share on other sites

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.

Share on other sites
even if your shape is 2d, you can usually create a height map. simplest one is by using the alpha map (white for visible, black of transparent) and do a Gaussian blur.
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:
http://www.tweak3d.net/articles/bumpmapping/

simple tutorial
http://www.delphi3d.net/viewarticle.html

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 9
• 11
• 9
• 9
• Forum Statistics

• Total Topics
633710
• Total Posts
3013486
×