blender multi-texture to opengl

Started by
3 comments, last by trentfaris242 8 years, 5 months ago
Hi,
There are a lot of tutorials and questions online about multiple textures however most concentrate on mapping two or more textures to one place. If you have a mesh in blender which is textured with multiple textures, how can do you let opengl know which textures goes with which coordinates. When exported as an .obj file nothing indicates which image maps to specific set of coordinates. What strategies would you use to get over this problem??
Advertisement
I don't think Wavefront .obj files can deal with that in a standard way. Wavefronts are nice to get things started but I would not consider them for serious work.

This has nothing to do with OpenGL, by the way.

I don't think Wavefront .obj files can deal with that in a standard way. Wavefronts are nice to get things started but I would not consider them for serious work.

This has nothing to do with OpenGL, by the way.


So what would you advise for serious work?
I have written a class which reorders all the vertices and the texels in .obj file to be compatible with the GLDrawElements() call. And now I faced this problem with multiple texturing, what are other guys using?

Almost every game engine has a custom file format for meshes. This usually involves writing a custom converter from a more well known format. A nice portable format I have had luck with is collada. It is a feature rich format so it is easy to get lost in it, however, you should be able to get by implementing just the parts you need.
My current game project Platform RPG

I don't think Wavefront .obj files can deal with that in a standard way. Wavefronts are nice to get things started but I would not consider them for serious work.

This has nothing to do with OpenGL, by the way.

So what would you advise for serious work?
I have written a class which reorders all the vertices and the texels in .obj file to be compatible with the GLDrawElements() call. And now I faced this problem with multiple texturing, what are other guys using?

I have the same problem in my engine. Early on when developing it I recognized that this would be a problem, but I've put it off until later. I'll work on it as soon as someone gives me a definitive "you should use X". Until then I'll keep scraping by. smile.png

This topic is closed to new replies.

Advertisement