I'm currently working on a dynamic 'door' creator, and I'm trying to decide which is more efficient. Not much experience with 3D render speeds, so I'm asking before I choose which direction to go because its a lot of work either way. (The doors will be able to open/close.)
So I came up with two possibilities.
- I generate all the triangles (as in the left picture), and go on my way.
- I generate only two triangles, then create and save a whole new texture that is filled only with pixels that are not 'covered' by the door (the others are marked as transparent). I would then dynamically add the texture to a texture atlas. Then when the outside portion (gray) of the door is drawn, it would appear as in the right picture.
Hence, more vertices, or more textures? Before I start down one road, any advice on this? Or any other suggestions?
Thoughts: Creating a new texture for each instance would eventually take up too much memory, but they would be reusable. My gut says this would be better for a small game world with not many unique doors, so maybe I should just implement both and let the user decide.