tex-filtering, esp with tiles and the 62x62 hack

Discuss the future of Warzone 2100 with us.
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by kage »

Per wrote: Your tileset has names like tile-0.png, but it should be tile-00.png. Expand those single digit files with a zero. Maybe I said fixed this stupidity, but I guess I lied :P
it worked fine on mine, especially since you said that you're using sscanf, but if you're pushing that as the new spec, i'll adjust texpage2mipmap to be compliant.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by Per »

It "worked fine" because it loaded tile-N.png files from the original data file directory as a fallback, that is why some tiles showed up with the old graphics.
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by kage »

i get it. so on my tiles, it's only loading the double digit tiles (which happen to be identical to the single digit ones in that tileset, so it would've been hard to debug). nice work.

will fix the texpage2mipmap.py program, but i don't have time at this moment, so it might be a few days.

EDIT: i expect you're using cheap zero padding behavior, eg. if triple digit numbers were allowed (or support were added), it'd be read as follows:

01..09
10..99
100...
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by Per »

kage wrote: EDIT: i expect you're using cheap zero padding behavior, eg. if triple digit numbers were allowed (or support were added), it'd be read as follows:

01..09
10..99
100...
Yes. It is not very neat, but it gets the job done. I could dispense with the zero padding now, since it is no longer needed for sorting, but then I would have to rename lots of files in the repository. Or I could use two zeroes for padding (%03d) to allow for more than 99 tiles and still sort them correctly in the shell. I am unsure if either is worth it.
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by kage »

only change it once we have a good reason too -- once someone says "i have 240 tiles...", then we might look at it.
User avatar
Rman Virgil
Professional
Professional
Posts: 3812
Joined: 25 Sep 2006, 01:06
Location: USA

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by Rman Virgil »

* This is not exactly on topic (though I thoroughly appreciate the stakes involved in the issues raised here & their solution) but it seems a good place to ask a tertile set question.

* WZ map-makers have dreamed for years of being able to be able to at least double the number of tertile slots available in a given set...

* Such that on ONE map you could go from desert to mountain to urban landscapes...

* Is that a possibility or is there some obstacle that makes it unfeasible ?

* Also - each set has feature models that are not compatible with another tertile set and create bizarro busted gfx in-game if interchanged...... Why is that ? And is it feasible to rectify ?

* Appreciate your time & shared expertise.

- RV :)
.

Impact = C x (R + E + A + T + E)

Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by Per »

Rman Virgil wrote: * This is not exactly on topic (though I thoroughly appreciate the stakes involved in the issues raised here & their solution) but it seems a good place to ask a tertile set question.

* WZ map-makers have dreamed for years of being able to be able to at least double the number of tertile slots available in a given set...

* Such that on ONE map you could go from desert to mountain to urban landscapes...

* Is that a possibility or is there some obstacle that makes it unfeasible ?

* Also - each set has feature models that are not compatible with another tertile set and create bizarro busted gfx in-game if interchanged...... Why is that ? And is it feasible to rectify ?
The problem is the way transitions are done in the game currently. All tile to tile transitions need separate tiles, rather than blending them dynamically. That means the number of tiles needed (due to transitions) will go up very rapidly. It is not technically difficult to increase the limit, and just stuff every tile into a single tileset, but I do not think it is a good idea (not yet, in any case, maybe once we have improved the tile engine).

The other transition issue is how features are adapted to a given tileset. You can read a little bit about it here: http://wiki.wz2100.net/development:resource_handler
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."
User avatar
Rman Virgil
Professional
Professional
Posts: 3812
Joined: 25 Sep 2006, 01:06
Location: USA

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by Rman Virgil »

..............

* Thanks for breaking that down, Per, so I could get a good understanding of what's involved. :)

* "Transition" tiles... I know from paring away at the Arizona tile set for months to make room for Urban tiles & Custom tiles used to create "structures" outta terrain.... restrictions becoming the mother of ingenuity (there are also ways to make "quick" transitions acceptable & reasonable to the eye.)

* Well then the old bag of map-maker "tricks" will still apply for the foreseeable future.... not to mention the # & variety of high quality map features possible in a given set..... that's a rich palete to work from.

- RV :)
.

Impact = C x (R + E + A + T + E)

Contrast
Reach
Exposure
Articulation
Trust
Echo
.
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by kage »

texpage2mipmap.py has been fixed -- now it makes imagemagick output zero-padded filenames up to 2 digits (like wz expects). later, i'll add the number of digits with which to pad to the array of config/cli options, defaulting to 2, of course.  quick thought: i didn't update the version numbers, but atm, i'm not awake enough to care...  can be found at http://devel.last-ditch.net/warzone/texpage2mipmap.zip

as usual, if someone would be so kind as to commit it to svn, i'd appreciate it.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by DevUrandom »

kage wrote: as usual, if someone would be so kind as to commit it to svn, i'd appreciate it.
If someone does before me: Don't forget to update version numbers.
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by Giel »

Applied in r2542.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: tex-filtering, esp with tiles and the 62x62 hack

Post by kage »

cool, thanks.
Post Reply