Multiple textures on one object possible?

Hy, is it possible to have multiple textures on one object in that way, that i can give specific sets of triangles a specific texture? Each triangle should be affected by only one texture, so i am not asking for multitexture where several textures overlap.

I think this picture explains what i mean. Here the texture “ab” is applied to a set of 4 triangles.

What you want to do is create a texture set, similar to how models are done. That is, put all the textures you want to use into a single texture. Then using texture coordinates, define what part is used for a piece of your geometry. You don't want to use multiple textures in this case, as it would require multiple binding. Take a look at the Dr. Freak texture to see what I am referring to. Bodymillk on IRC is a good person to talk to about this as he just finished doing the same thing for his Settlers 2 game.

Mhh i am thinking about this. Thank you for your input. This technique sounds good for models, but would it work for big level too (where i have many types of walls with different types of windows, etc.)? If i would put all these types of walls, etc. in one big texture and would apply this to a "room" of the level, would this slow down the speed because of the big texture? Is there an openGL texture size limit and is this limit smaller for old graphic cards (like my GeForce2 MX)?

Would be very helpful if someone (mojo again?) knows answers. Otherwise i will try to contact Bodymillk.

Well, a big level is typically made up of multiple pieces of geometry, so each piece can have its own texture.

Ok but i am a little afraid whether multiple pieces of geometry will raise the error level of the physic engine. I think i will have to test this out. Looks like i have the answers now XD

Error level of the physics?  We don't have no errors!


I have one more basic texture question. What i would like to do is to use one texture and apply several pieces of it to several parts of one geometry by modifying the texture coordinates. Here is a picture of what i want to do:

As far as i understand it the green points need more than one texture corrdinates to do this. Is this possbile?

Nobody? I hope the question is not too stupid :?

You would have to repeat those vertices in your vertex buffer for it to work.

Thanks renanse.