Easy way to apply a normal map ?

Started by robert, April 18, 2012, 02:49:07 AM

Previous topic - Next topic

robert

Hello,

I would like to know if there is any easy way to apply a normal map texture without using GLSL, as I have no idea how it works, and don't really have the time right now to learn another language...

Thank you.

EgonOlsen

No. For applying a normal map, you have to use shaders. You'll find a parallax mapping shader in the examples that come with the engine. That's basically an advanced normal mapping shader with the extension of a height map. You can strip that code, so that the height map part is gone and you'll have a simple normal mapping shader.

robert

Thanks for the fast respone EgonOlsen. I recall you said in a message that shaders are somewhat slow on mobile devices... do you think a normal map shader will slow down the framerate significantly ? Considering the fact that mobile devices also don't handle "high" polys very well, that's why I was going to use a normal map in the first place, to fake real topology...

P.D: I tried a normal map of a 9000 tris rotating human face using libgdx with specular, diffuse and ambient lighting and it was really fast (60fps, limited by vsync).


EgonOlsen

It depends on what you are after and on which device. This...



...is an example of a dungeon with full parallax mapping on all surfaces. It runs between 22-30 fps on a Galaxy S class device. On the other hand, this means that it'll run too slow on devices like the Nexus One.