Home Artists Posts Import Register

Content

Retroquad's FQT/FQM texture format is monolithic, containing all layers of the texture, which helps to ensure compatibility since the Retroquad rasterizer requires that all layers have the same dimensions. Also, a monolithic format looks more clean to the filesystem.

However, that becomes complicated when the amount of layers and the variety of their types keeps increasing. Retroquad supports extra layers for scrolling sky overlays, glowmaps, glassmaps, and soon there will also be foam maps.

Also, a monolithic format means that if you want to combine different diffuse images with different layers (e.g. a TV screen turned off without a glowmap, and the same TV screen turned on with a glowmap) you need to generate a whole texture file for each combination. This results in duplicate image layers accross multiple textures, which is a waste of storage and RAM.

The solution that makes the most sense for this is to implement a texture script format similar to Q3A shaders. Instead of loading the texture images directly, the script would instruct the engine as to which layers the texture should have, and which image should be used for each layer. Frame animations, interpolation, timing, scrolling and other properties could also be scripted this way.

The only limitations that Retroquad will always have are that all layers (of all frames) in a texture (animation) must have the same dimensions, and that all layers will always have the same projection and scrolling properties, because the Retroquad rasterizer reuses the same texture mapping coordinates on all layers, for performance.

I'm not sure if I should work on this right away, but it's definitely the right path. The tricky part will certainly be to future-proof the texture scripting format so I won't have to keep modifying it afterwards.

Compatibility with custom Quake assets could also be a little tricky. Retroquad would most certainly have to automatically generate script files for FWQ textures compiled from external TGA images. We can't simply expect everyone to create texture scripts by hand.

With the current texture format, the only way to implement a foam map on glowmapped liquids is to shoehorn it, which could make the code harder to work with in the future.

So, I'm going to do some preliminary work to allow for a better texture format to be implemented. Easier to customize, more dynamic, more scalable, and modular with interchangeable contents.

Comments

No comments found for this post.