Author Topic: High Res Textures  (Read 2486 times)

0 Members and 1 Guest are viewing this topic.

Ok, so I spent the weekend fixing up the standard ship textures to run in 1024x768 resolution.  The conversion was easy enough to do, only did a bit of minor cosmetic bluring to smooth out the lines and details at the higher resolution.

When finished, at the 1024x768 resolution the ships are clear, and look pretty much like they do at the lower resolution.  The textures fit the models for a change, and the basic details are not jagged or blurred like they are when using lower resolution textures. The registry change for this works with both retail and the SCP versions as well.  I decided not to do a lot of detail work, especially as this was mainly a test.

Here's the killer part - just the fighters and support ships when compressed are 16+ megs.  For more detailed work the file size would get more massisve still.  There's no alpha channels, they aren't heavily reworked, they are just the basic files.  The full set of models including all ships and weapon shape skins is over 75 megs compressed.

As I explained to Galactic Emperor (all around good guy), I could spend excessive ammounts of time reworking the stock textures for greater detail but at best there would be perhaps a 10% over-all gain in the look of them over the present set I did up.  As previously noted the download size would only go up.  It would not really seem to be worth the trade-off.

I'm posting this here, I do not know if it has been discussed before.  Is it possible to have the game recognise a smaller image format?

And one for laughs, is it possible to get the game to recognise an animated image format for the models? For instance blinking running light textures for the ships (would be something in the realm of the glow maps)...
All I ask is a tall ship and a star to steer her by.
And a laughing yarn from a merry fellow rover.
And a quiet sleep and a sweet dream when the long trick's over.
- JOHN MASEFIELD

 

Offline FreeTerran

  • Master of the apocalypse
    Reset count: 1
  • 210
This threat and this threat is that not the same ?
Silva in lumine Lunae arcana est. Domos mea Silva in lumine Stellarum est.

 
No, they both deal with high resolution textures, but the other deals mainly with how-do-I-use-these-and-where-do-I-get-them.  This thread deals with actual file sizes, and the question if other image file types can be used.
All I ask is a tall ship and a star to steer her by.
And a laughing yarn from a merry fellow rover.
And a quiet sleep and a sweet dream when the long trick's over.
- JOHN MASEFIELD

 
Quote
Originally posted by Free Terran
This threat and this threat is that not the same ?


BTW, it's thread, with a"D".

dunno, this migt be an good idea, but i'm no coder.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Fry_Day

  • 28
1024x768???

Textures must be power-of-two sizes, as I mentioned in some other thread, so that doesn't make sense, since 768 is a sum of two power-of-two numbers (512+256, to the math-lazy, who never wrote programs that use shifts instead of multiplies). 1024x1024 would be good, as would 1024x512, but 1024x768 would have to be stored in a 1024x1024 texture, which is a horrible waste of memory space

 
Um, right...yeah.  Ok, I'll try again:  The textures were resized and blurred to look best with a screen resolution of 1024x768.  A common screen size.  They were not all resized to 1024x768.  The textures themselves vary greatly in actual size.  The game works fine with them when set to this resolution which is what I have most games running at.  

As far as wasteful, well, my system's an 800p3, 512megs ram, GF4ti@64megs.  It doesn't even hiccup on the missions with the most ships in screen.  At 1024x768.  With the afore-mentioned textures.  It's hardly considered mid-ranged for system specs.  

Wasteful or not, and I'm not even sure we are anywhere near the same wavelength on this topic, it works and looks fine.
All I ask is a tall ship and a star to steer her by.
And a laughing yarn from a merry fellow rover.
And a quiet sleep and a sweet dream when the long trick's over.
- JOHN MASEFIELD

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Quote
Originally posted by Fry_Day
1024x768???

Textures must be power-of-two sizes, as I mentioned in some other thread, so that doesn't make sense, since 768 is a sum of two power-of-two numbers (512+256, to the math-lazy, who never wrote programs that use shifts instead of multiplies). 1024x1024 would be good, as would 1024x512, but 1024x768 would have to be stored in a 1024x1024 texture, which is a horrible waste of memory space

Actually, "768 is a sum of two power-of-two numbers" is the only true statement in that post, I believe. :)
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Solatar

  • 211
I thought textures had to be square...didn't matter if they were 1234*1234, as long as it was square...

 

Offline Sandwich

  • Got Screen?
  • 213
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Gah, you're all wrong! Textures need to be multiples of the lowest common denominator between the number 849's root, and the amount of whiskers on your neighbor's dog's nose (not the eyebrow whiskers). Take that result, multiply it by 3.156, and that would be the length of the texture side in points. 72 points-per-inch, measure how many pixels per inch your monitor has, and do the math.

:nervous:  ....what!?
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 
But that equals 1024x768... :wtf:

I need a new abaccus...

But anyhow, back to the questions:

Quote
Is it possible to have the game recognise a smaller image format?

And one for laughs, is it possible to get the game to recognise an animated image format for the models? For instance blinking running light textures for the ships (would be something in the realm of the glow maps)...
« Last Edit: April 22, 2003, 08:00:18 pm by 1153 »
All I ask is a tall ship and a star to steer her by.
And a laughing yarn from a merry fellow rover.
And a quiet sleep and a sweet dream when the long trick's over.
- JOHN MASEFIELD

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
The actual texture maps can be at any resolution, the engine will just resize them to 256*256 for rendering if you don't use the registry hack.  Also, simply resizing the maps and adding a bit of blur doesn't really fix much, you'll get a small improvement but nothing too significant except perhaps file size.  Not worth it if you ask me, unless you actually add detail to the maps ;)

 
Yeah, I think I mentioned something similar to that.  

It gives you the same quality at the higher resolution as you would expect with the standard maps at the unmodified game's highest detail levels.  The blurring (very slight) was simply to smooth out the existing details to avoid the pixel edged look.  For some folks it might be worth doing on their own.  

As for adding more detail, it is tedious, irritating and time consuming using 256 colours.  Just blending in shaded areas is a time consuming keister-ache.  If that were going to be attempted, the suc...uh artist might as well reskin the whole shebang.  Many efforts I've seen to increase details when increasing resolutions often leave the models with a very cartoonish look.  

The gain is not really worth the time and filesize - which tends to increase even more as the details do.  That's why I'm interested to see if there is perhaps a way the game engine could be modified to allow a smaller image format for its model skins.
All I ask is a tall ship and a star to steer her by.
And a laughing yarn from a merry fellow rover.
And a quiet sleep and a sweet dream when the long trick's over.
- JOHN MASEFIELD

 

Offline Fry_Day

  • 28
Quote
Originally posted by Sesquipedalian

Actually, "768 is a sum of two power-of-two numbers" is the only true statement in that post, I believe. :)


Okay, I was wrong about hardware limitations and API limitations, to some degree  - You need to look for D3DPTEXTURECAPS_NONPOW2CONDITIONAL to see if your card supports non-power-of-two textures, and hardware older than the Matrox G400 (which includes, I believe, the Riva TNT 2 line, which is popular) most definitely doesn't have that capability, therefore, non power-of-two textures must be either scaled to power-of-two sizes, or stored in the nearest larger power-of-two size with a space-waste.

The origin of the power-of-two limit is of course in the way registers are handled internally, which means that if you force power-of-two sizes, you can do a shift instead of multiply per each pixel drawn, which was a considerable gain, most likely, when decided upon in the original 3D accelerators (though it actually slowed down my software rasterizer on my old Pentium system, since shifts take both pipelines on a Pentium).

Edit: The point is, forcing power-of-two sizes was simply a necessity, for speed and transistor-count purposes, but recent hardware seems to have spared transistors for it. Of course, power-of-two sizes are also cache-friendly, which is good.

Why is the shift used? When a polygon is drawn, the 3D coordinates are transformed into screen-space (2D) coordinates.
Then, a procedure called scan-converting of the polygon occurs, in which, basically, a polygon is dissected into many horizontal lines, by going through the edges of the polygon.


now that you have many horizontal lines (with texture coordinates, lighting, etc. computed for the edges), you have the most critical inner-loop, which draws them basically, it interpolates lighting values, and texture coordinates, reads from the texture, according to the interpolated texture coordinates, modulates with the lighting, and writes to the destination buffer.
The interpolation of texture coordinates is a simple pair of additions, but the resulting texture coordinates are an X,Y pair. A simple point on the texture. That needs to be converted into an offset inside the memory in which the texture is stored (The texture is generally stored as a simple linear array). the conversion is generally OFFSET = (X + Y*TextureWidth)*BytesPerPixel. BytesPerPixel is always a power of two, so that's naturally a shift, and if TextureWidth is a power of two, that's a shift also. Ta Da!

:sigh: What an essay... Look at what you've done to me, Sesquipedalian, turning me into a nattering nitpicker!

Edit 2: I also forgot to mention that the scan-conversion process is what causes the requirement for triangles to be passed to hardware in general, since convex objects can be scan-converted much faster, and triangles are guaranteed to be convex (Unless there's black magic involved :) ). That's also why Triangle Strips and Fans exist - Since the hardware can use the same scan-conversion data for more than one triangle (as triangles sare edges), stuff goes a whole lot faster.
« Last Edit: April 23, 2003, 04:48:42 pm by 791 »

  

Offline Sandwich

  • Got Screen?
  • 213
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Quote
Originally posted by Fry_Day


Okay, I was wrong about hardware limitations and API limitations, to some degree  - You need to look for D3DPTEXTURECAPS_NONPOW2CONDITIONAL to see if your card supports non-power-of-two textures, and hardware older than the Matrox G400 (which includes, I believe, the Riva TNT 2 line, which is popular) most definitely doesn't have that capability, therefore, non power-of-two textures must be either scaled to power-of-two sizes, or stored in the nearest larger power-of-two size with a space-waste.

The origin of the power-of-two limit is of course in the way registers are handled internally, which means that if you force power-of-two sizes, you can do a shift instead of multiply per each pixel drawn, which was a considerable gain, most likely, when decided upon in the original 3D accelerators (though it actually slowed down my software rasterizer on my old Pentium system, since shifts take both pipelines on a Pentium).

Edit: The point is, forcing power-of-two sizes was simply a necessity, for speed and transistor-count purposes, but recent hardware seems to have spared transistors for it. Of course, power-of-two sizes are also cache-friendly, which is good.

Why is the shift used? When a polygon is drawn, the 3D coordinates are transformed into screen-space (2D) coordinates.
Then, a procedure called scan-converting of the polygon occurs, in which, basically, a polygon is dissected into many horizontal lines, by going through the edges of the polygon.


now that you have many horizontal lines (with texture coordinates, lighting, etc. computed for the edges), you have the most critical inner-loop, which draws them basically, it interpolates lighting values, and texture coordinates, reads from the texture, according to the interpolated texture coordinates, modulates with the lighting, and writes to the destination buffer.
The interpolation of texture coordinates is a simple pair of additions, but the resulting texture coordinates are an X,Y pair. A simple point on the texture. That needs to be converted into an offset inside the memory in which the texture is stored (The texture is generally stored as a simple linear array). the conversion is generally OFFSET = (X + Y*TextureWidth)*BytesPerPixel. BytesPerPixel is always a power of two, so that's naturally a shift, and if TextureWidth is a power of two, that's a shift also. Ta Da!

:sigh: What an essay... Look at what you've done to me, Sesquipedalian, turning me into a nattering nitpicker!


Balaganist. :p
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill