So the thing I tried to do today was make it easier to texture the models. The earlier iteration of my file format required lots of hand-specified texture coordinates, which was going to get very hard very quickly especially considering I’m only allowing one texture per model, so any “different” images would have to be explicitly specified as regions inside the texture. The improvement takes two stages:
- First, I have a list of “subtexture” specifications in the XML file. This defines rectangular regions of the texture which the actual geometry can effectively treat as unique textures.
- Second, I’m arbitrarily limiting the way models can be textured to a single method executed by the computer for each distinct component type, and also assuming that components always arrive in a particular predefined orientation. So for example, with the pyramid component there’s a subtexture for the base and one for the side. The assumption is made that the pyramid is aligned to the Z axis. The base subtexture is then automatically projected in the Z direction, and the side subtexture is projected in the X direction.
Is this limiting? Theoretically, yes. In practice, who cares. Models will be made of a collection of simple components which should be simply textured, and if worse comes to worst I’m the guy who gets to decide if the situation absolutely needs another component, end of story.