TEXTURE
TEXTURE_LIT
TEXTURE_NOWRAP
TEXTURE_NOWRAP_LIT
etc. It's a bit of a disasteer. The problem is that the command is encoding two separate ideas:
- What the texture is used for (primary texture vs. lit vs. composite vs. mask)
- How the texture is loaded (with wrapped vs clamped edges)
Internally we deal with this by marking textures as "not to be compressed" -- this is why the clouds don't look ugly. I thought, "why don't I make this available in OBJ and pol files...that's not very hard". But do we really want this?
TEXTURE_LIT_NOCOMP
TEXTURE_LIT_NOCOMP_NOWRAP
So I'm thinking we may need a syntax that separates the "what" (what slot in the scenery the texture is used for) from its settings. Something like this:
TEXTURE2 -nocomp -wrap my_truck.png
TEXTURE2_LIT -comp -nowrap my_truck_LIT.png
The "flags" would affect how the texture is loaded (the two obvious ones are wrapping/clamp controls, and compression-inhibition) and the command name would say what the texture is used for.
I am also looking at adding normal maps to objects - this would be a third texture attached to the object (so you could have a base texture, normal map, and lit texture). The advantage of this scheme is we'd need only three commands with a pile of flags.
Anyway, just something I'm thinking about.
(One thing I haven't worked out is how this would interface with dataref-driven textures, which would require yet more file format gunk.)
No comments:
Post a Comment