Re-done PIEs

Improving the artwork in Warzone2100 - not for mod discussions
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Re-done PIEs

Post by kage » 03 May 2007, 08:40

DevUrandom wrote: Well, there you need it again: Texture arrangement.
The texture will not always be of halved sidelengths, there might be several textures of the same size, or a lot of big ones, or a lot of small ones. You all need to get them into a sane order.
For the best result you might want to guess which textures will be possibly used at the same time, so you can put them on one page. What would make it again slightly more complicated.
if we keep the "must be power of two dimensioned square texpages" rule, then every single texpage will be able to tile evenly with something else... granted, there'll often be some blank space at the end, but if you arrange textures by size before hand, you can cram things in fairly tight, and without a lot of code. arranging is perhaps not the term i'd want to use, since it makes it sound like the code has to do something smart... this is more like "variable-size simple texture stacking".

Computerboy319
Rookie
Rookie
Posts: 28
Joined: 29 Mar 2007, 16:07

Re: Re-done PIEs

Post by Computerboy319 » 03 May 2007, 12:58

but unfortunately it will require redoing all exist pies and re-texturing all the newly created ones,which is a bit unrealistic in the foreseeable future.
What do you think this topic is about? Update: My tech project is almost done, and I've already got all the designs on paper for the new light cannon, it's just a matter of making it.

User avatar
Hatsjoe
Trained
Trained
Posts: 285
Joined: 20 Feb 2007, 19:57

Re: Re-done PIEs

Post by Hatsjoe » 03 May 2007, 14:01

can't all textures be loaded seperatly ? Do they really have to be combined in one big texpage ?
Image

Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: Re-done PIEs

Post by Giel » 03 May 2007, 15:09

DevUrandom wrote: I'd like to know what you mean by "appending".
If you have for example three texture pages of 512x512 stored on disk you might load them into memory and then sort-of stick them together in a large 1024x1024 texture.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3753
Joined: 03 Aug 2006, 19:39

Re: Re-done PIEs

Post by Per » 05 May 2007, 14:14

Just food for thought: Most graphics card nowadays support 2048x2048 sized textures. and you can fit all the current texpages (1x1152x1280 terrain page, 19x256x256 pages and 2x512x512 pages) into one 2048x2048 texpage, and still have some room to spare.
"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."

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3753
Joined: 03 Aug 2006, 19:39

Re: Re-done PIEs

Post by Per » 05 May 2007, 14:23

Hatsjoe wrote: can't all textures be loaded seperatly ? Do they really have to be combined in one big texpage ?
We could split up the texpages into a ton of separate texture files instead, if this is better for artists to work with. How they are stored on disk and how they are accessed in memory can be totally different. I think it would be advantageous to reassemble the textures on loading in any case. Of course, once we start changing this, we break the pieslicer, so we better have some replacement tool available first.
"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
Hatsjoe
Trained
Trained
Posts: 285
Joined: 20 Feb 2007, 19:57

Re: Re-done PIEs

Post by Hatsjoe » 05 May 2007, 14:24

Per wrote: Just food for thought: Most graphics card nowadays support 2048x2048 sized textures. and you can fit all the current texpages (1x1152x1280 terrain page, 19x256x256 pages and 2x512x512 pages) into one 2048x2048 texpage, and still have some room to spare.
but we all know that the resolution of the current texpages are to low.
Image

User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Re-done PIEs

Post by kage » 05 May 2007, 23:09

Per wrote: Just food for thought: Most graphics card nowadays support 2048x2048 sized textures. and you can fit all the current texpages (1x1152x1280 terrain page, 19x256x256 pages and 2x512x512 pages) into one 2048x2048 texpage, and still have some room to spare.
most... nowadays... it's a good idea, but may obliterate support for machines without one of these cards... perhaps if there's some kind of opengl routine to retrieve the maximum supported texture size of a given card, and adjust for that. and further, how do we know that gfx cards don't do this kind of stuff internally already? if it's more efficient for the gfx card to hold one large texture instead 80 small ones, then the gfx card designers, who'll do whatever they have to in order to come out on top, would've already thought of this, and their cards may silently rearrange and combine textures as they're allocated.

User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Re-done PIEs

Post by DevUrandom » 06 May 2007, 00:35

kage wrote: most... nowadays... it's a good idea, but may obliterate support for machines without one of these cards... perhaps if there's some kind of opengl routine to retrieve the maximum supported texture size of a given card, and adjust for that. and further, how do we know that gfx cards don't do this kind of stuff internally already? if it's more efficient for the gfx card to hold one large texture instead 80 small ones, then the gfx card designers, who'll do whatever they have to in order to come out on top, would've already thought of this, and their cards may silently rearrange and combine textures as they're allocated.
You have to bind each texture to the texturing unit... The driver might optimize this away with some magic, but I guess it is quite hard as the usage of textures is unpredicable (from the driver POV, not from our). And from a friend I know that graphics drivers don't do optimizations which are much simpler than that, so I guess this is unlikely to be happening in the driver.

User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Re-done PIEs

Post by kage » 06 May 2007, 09:42

okay. well, i'm hardly an expert on gl stuff, so it's easy for me to be wrong in that area.

as for the unpredictability, when you look at the problem in a certain way, it seems similar to writing memory management code for a kernel (with a few added restrictions or a large increase in code complexity). when i think about that, yeah, i know that i wouldn't want to make that kind of optimization either.

Kyor
Trained
Trained
Posts: 73
Joined: 03 Apr 2007, 15:28

Re: Re-done PIEs

Post by Kyor » 09 May 2007, 19:45

Check it out:

Those are well-made 1024x1024 textures, in the warehouses.

Don't look to the arrows, they're a personal change =)

-Screenshot 01: Warehouse : Max. Zoom
http://img142.imageshack.us/img142/3576/wz01fp9.jpg

-Screenshot 02: Warehouses : Almost Max Zoom : Compare the warehouses with the ground and Command Relay center textures.
http://img142.imageshack.us/img142/3615/wz02au9.jpg

User avatar
Hatsjoe
Trained
Trained
Posts: 285
Joined: 20 Feb 2007, 19:57

Re: Re-done PIEs

Post by Hatsjoe » 09 May 2007, 20:36

Kyor wrote: Check it out:

Those are well-made 1024x1024 textures, in the warehouses.

Don't look to the arrows, they're a personal change =)

-Screenshot 01: Warehouse : Max. Zoom
http://img142.imageshack.us/img142/3576/wz01fp9.jpg

-Screenshot 02: Warehouses : Almost Max Zoom : Compare the warehouses with the ground and Command Relay center textures.
http://img142.imageshack.us/img142/3615/wz02au9.jpg
Exactly what i was trying to say before. It looks great. I like the dark roof better than the other one. But i find the arrows the best thing :d
Image

Kyor
Trained
Trained
Posts: 73
Joined: 03 Apr 2007, 15:28

Re: Re-done PIEs

Post by Kyor » 09 May 2007, 20:58

The arrows goes up and down =D

But it's not perfect, something like 2~4 fps.

New Screenshot.

As you can see, there are two warehouse models (check that i've changed the roof of one of them) and a hut model, with a few arrows (you asked for).

http://img517.imageshack.us/img517/1167/wz03ds7.jpg
Last edited by Kyor on 09 May 2007, 22:37, edited 1 time in total.

Computerboy319
Rookie
Rookie
Posts: 28
Joined: 29 Mar 2007, 16:07

Re: Re-done PIEs

Post by Computerboy319 » 18 May 2007, 13:10

Okay, my project is DONE. I've done a little work on the light cannon today (though I'm not sure how much more I'll get done today, since prom is tonight...) and hopefully it should be done in a few days.

User avatar
Hatsjoe
Trained
Trained
Posts: 285
Joined: 20 Feb 2007, 19:57

Re: Re-done PIEs

Post by Hatsjoe » 18 May 2007, 13:59

Kyor wrote: The arrows goes up and down =D

But it's not perfect, something like 2~4 fps.

New Screenshot.

As you can see, there are two warehouse models (check that i've changed the roof of one of them) and a hut model, with a few arrows (you asked for).

http://img517.imageshack.us/img517/1167/wz03ds7.jpg
Nice. wz high res :)
Image

Post Reply