Basically, a small change to the TER format (by a few bytes per TER) could expand the maximum number of textures from 16 to 256. It would likely also have a knock-on effect throughout the game's base code, and may require entire sections to be rewritten.Mortarion wrote:as a computer illiterate that went way over my head, but thanks for taking the time to explain it, ill look over that another time... lol
Possible to use more than 16 textures per map?
Moderators: GSH, VSMIT, Red Devil, Commando
Re: Possible to use more than 16 textures per map?
Re: Possible to use more than 16 textures per map?
It might actually be doable, it depends on code I don't know (99.9% of BZ2). I just know some snippets of how TERs load from when I was helping OM with Winter.Mortarion wrote:as a computer illiterate that went way over my head, but thanks for taking the time to explain it, ill look over that another time... lol
When I said it was not doable I was forgetting that there is an even number of textures per cluster. I was afraid of this: 'FF FF becoming FFF FFF', even though the system reads 2 Fs at a time. Since there is, to put it simply, and F per layer per cluster, that is 4 Fs per cluster currently, doubling that would be FF FF FF FF rather than F F F F, which is still pretty easy to read.
The format, ignoring BZ2, could be changed to hold 64 or 256 textures instead of 16 rather easily. But as a 10+ year old binary format, change is hard on a fixed system (BZ2).
Making it 64 textures would increase the map size by a factor of 1/14th.
Making it 256 would increase it by a factor of 1/7th.
Either would make BZ2 throw a massive hissy-fit.
Re: Possible to use more than 16 textures per map?
sounds interesting
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Possible to use more than 16 textures per map?
Now i'm confused again... 

- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: Possible to use more than 16 textures per map?
I think the gist of it is that yes its technically possible to extend the TER file specification at the cost of a little bit of disk space. What's unsaid, however, is the answer to whether it would be technically feasible to pull off (since some things would most certainly need to be rewritten on the BZ2 executable), and would it break backwards compatibility, and finally would GSH be willing to implement it given the limited amount of free time he has.
- MrTwosheds
- Recycler
- Posts: 3059
- Joined: Sat Feb 19, 2011 8:37 am
- Location: Outer Space
- Contact:
Re: Possible to use more than 16 textures per map?
Of course you can have more than 16 terrain textures! You have to make new terrain objects to put them on though, fun.
Select terrain area with environment editor option.
Editor.environ.export myterrain.xsi in the console.
Notepad edit file created in addon to add a new terrain texture to it. Place on map.
Comes complete with vertex colored terrain exactly the same as the original terrain coloring.
++Edit the xyz values of that terrain piece (precisely to 0.050000 accuracy) to create vertical or overhanging terrain++
Using max you could even add more than 1 texture to it, like different 4 square tiles, bit tricky to do in notepad though.
Select terrain area with environment editor option.
Editor.environ.export myterrain.xsi in the console.
Notepad edit file created in addon to add a new terrain texture to it. Place on map.
Comes complete with vertex colored terrain exactly the same as the original terrain coloring.
++Edit the xyz values of that terrain piece (precisely to 0.050000 accuracy) to create vertical or overhanging terrain++
Using max you could even add more than 1 texture to it, like different 4 square tiles, bit tricky to do in notepad though.