Bump mapping

Started by sysaxed, June 29, 2012, 06:05:51 PM

Previous topic - Next topic

sysaxed

I'm using opengl renderer and trying to make bump mapping work.
I've read this article http://www.jpct.net/wiki/index.php/Shaders and I'm trying to make it load bump maps automatically.
I'm loading models from .obj files and in .mtl there are lines like:
bump bump.jpg -bm 5
Is there any way to get material info from Object3D?
I could parse .mtl files manually but it becomes more complicated when multiple objects are stored in one .obj file.
Maybe there's another way to make it work?

EgonOlsen

No, there's no such information stored inside Object3D and so there's no way to get it from it. jPCT has no material concept of that kind. I'm not sure what you are trying to do anyway, because obj-format doesn't support multi-texturing and you would need that to store all information about texture- and normal map per object/polygon.