Author Topic: Default ship image maps, and HT&L  (Read 4894 times)

0 Members and 1 Guest are viewing this topic.

Offline Odyssey

  • Stormrider
  • 28
Default ship image maps, and HT&L
It is my understanding that HT&L doesn't like large numbers of texture maps, as used by many standard FS2 ships.
It's a fairly simple process to bake all those textures together in lightwave, and as far as I know, nobody has done it yet.
So, would it be a good idea for me to go ahead and start making all FS2 ships into 1 (or 2+) 1024x1024 maps?

 

Offline Solatar

  • 211
Default ship image maps, and HT&L
Go right ahead. It would probably help us out later.:)

 

Offline Odyssey

  • Stormrider
  • 28
Default ship image maps, and HT&L
Right-o. One thing though - other people would need to test them as I turned them out, since my video card can only manage 256x256 textures ^_^

 

Offline magatsu1

  • 210
Default ship image maps, and HT&L
what is "HT&L" ?
Raven Shield quotes it in the minimum specs, but I don't know what it is !
Blitzerland: Knows what he's talkin' about

 

Offline Flipside

  • əp!sd!l£
  • 212
Default ship image maps, and HT&L
I'm not quite sure what the rules are for HT&L textures , the downside with 'Baking' textures is that I think it will include any shading on the Ship, which may look a bit odd when the 'shaded' side faces a star or the like,
I know Bobb posted something about a limit to the number of textures, but I think that is only supported by HT&L, so any further textures will be done software.
Maybe one of the SCP guys can clear this up a bit?

Flipside :D

Also, I can't see baking working for tile textures :(
« Last Edit: October 31, 2003, 12:29:11 pm by 394 »

 

Offline Sticks

  • 29
Default ship image maps, and HT&L
AFIAK there is no maximum number of textures per object. Either that, or it's something fairly unreachable, like 64 or something.

HOWEVER, and this is a big however, the smaller number of textures per object, the better. If each ship only had one or two different textures, you would definately see a substantial performance increase.


Hardware TnL affords a performance increase mostly due to the way things are sent to the GPU. Basically this means that we do this (in pseudo code):

For each model:
    Find all vertices with texture A
       Group those together
       Prepare them with the CPU
       Send them to the GPU
    Find all vertices with texture B
       etc...

Now, out of those steps, the most time consuming and expensive is to prepare them with the CPU. Once we send them to the GPU, it does it's job very quickly. Therefore, we want to make the number of times preparing the batches as small as possible, and the only way to do this is to use less textures. Then we can send tons and tons of vertices to the GPU and let it chew on those for a while while we do other stuff.


The above explanation is not purely accurate, but in this case suffices.

The pratical upshot is that any recent graphics engine is limited in performance by the number of textures that it uses, because changing textures is expensive and inefficient for a number of reasons. The more vertices that can be sent to a card at a given time, the better.
"Napalm is good as a quickfire solution, literally..." -- cngn

"Shh... [Kazan's] schizophrenia allows him to multitask." -- Goober5000

Why am I still coding at 12:35am?

SCP: Templum sanctus ingeniosus

 

Offline Flipside

  • əp!sd!l£
  • 212
Default ship image maps, and HT&L
Hmmmm... Well, in Freespace, nearly all of the fighters and all (I think) of the Capships use only one non-tiled texture, the rest are tiled, and baking an 8*8 grid of 256 x 256 textures into a single texture would actually lose resolution in game, so I'm not sure really what can be done :(
Also, wouldn't all the ships have to be rebuilt or edited in PCS with the correct texture references in place?

Flipside :D

 

Offline Sticks

  • 29
Default ship image maps, and HT&L
I think baking into a few 1024x1024 textures would help immensly, even if it means a bit of a resolution drop.
"Napalm is good as a quickfire solution, literally..." -- cngn

"Shh... [Kazan's] schizophrenia allows him to multitask." -- Goober5000

Why am I still coding at 12:35am?

SCP: Templum sanctus ingeniosus

 

Offline Flipside

  • əp!sd!l£
  • 212
Default ship image maps, and HT&L
I've never used baking on Lightwave, I'm going to try and find out a bit more about it, I hope I'm wrong, I really do, because anything that speeds up Freespace is obviously good, but I have a feeling there may be problems though...

1) Converting tiled textures will only increase the resolution of the one texture being tiled, and possibly decrease the quality. So it would take more Texture memory for less result.

2) All the POF files would have to be edited to make the references to textures point to the right files, the result may be worth the effort though.

If this does work out, remember to do them as 24Bit images now we have support ;)

Flipside :D

 

Offline Odyssey

  • Stormrider
  • 28
Default ship image maps, and HT&L
I don't quite see how I would do them as 24bit images when all I'm doing is combining originals ^_^
Resolution would not necessarily be lost, as I can simply chop up the UV map into, say four 1024x1024 blocks. I don't see the problem with converting tiled textures - I tried the whole baking process on a hippocrates just now, and it looked the same to me.
As for POF files being edited, well of course. My stage plan for each model thus far will be this:
  • Get it into lightwave
  • Bake the most detailed LOD of said model, chopping into what I feel are the necessary texture blocks to maintain resolution.
  • Use lithunwrap to then convert that LOD into truespace format.
  • Take the original converted model in truespace, delete said LOD, and replace it with new one.
  • Use PCS to convert back to .pof, importing all other pof data from old model.
  • Give it to someone with a better video card to test it looks the same.
If anyone sees any problem with that process, then feel free to pick it apart.

EDIT: Forgot subsidiary point:
  • Get a new video card so I can actually see what I'm doing
EDIT2: Shading is not an issue when baking the model. I just turn off all the lights and set ambient light intensity to 100%. Or just tell the baker plugin not to care about lighting. Either way it does the job.
« Last Edit: October 31, 2003, 01:54:03 pm by 493 »

 

Offline diamondgeezer

Default ship image maps, and HT&L
Alright, maybe talking out of my arse again here but will PCS let you do a global data import if you've been fiddling with the model i.e changing the texture names? I just added an additional text to a model and PCS crashed upon a global import. I assumed that this is becuase of the difference in the texture names... course if it isn't then I'd like to know what the problem is :)

 

Offline Odyssey

  • Stormrider
  • 28
Default ship image maps, and HT&L
I guess I'll have to find out. Not sure. If it doesn't, I've got loads of screens I can throw at it, so I'll just have PCS open on one computer with the old stuff, then copy it across to PCS on this computer manually. I've got 3 days coming up in which I have absolutely nothing to do, so I can handle it.

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
Default ship image maps, and HT&L
mmm I'm not sure too what speed gains you can obtain.. I mean, a tiled texture, a texture repeated many times, works only if it is alone, you can't unwrap and use repetitions at the same time (or you can but only in special cases).
Therefore, you will have to multiply a texture (a 256x 256 repeated 16 times generate a 1024x1024, if you don't want to loose quality) to match the original repetitions, and I'm not sure that the HT&L gains will match the huge overall texture's resolution increase
probably a mixed strategy, baking textures only when there are few repetions, could be the best one, and also use some good unwrapping strategies: for example, if a tiled texture is repeated only vertical or horizontally,  but not in both directions, you can use some repetitions althought unwrapping
« Last Edit: October 31, 2003, 02:36:45 pm by 433 »

 

Offline Odyssey

  • Stormrider
  • 28
Default ship image maps, and HT&L
I think it ought to handle it okay. Even if there isn't that much of an overall increase, then at least it'd be one hell of a lot easier to modify ships to include logos, etc.

 

Offline Odyssey

  • Stormrider
  • 28
Default ship image maps, and HT&L
How do video cards render tiling textures anyway? Presumably they still have to place them and wrap them around polygons, so it can't exactly be a super-fast process...

 

Offline Flipside

  • əp!sd!l£
  • 212
Default ship image maps, and HT&L
Well, I think they are wrapped around the polygon as any other UV map, and then the engine uses a texture repeating function, I think it's a basic DirectX Facility. I may well be completely wrong, mind, so best to wait till someone who knows what they are talking about comes along ;)

Oh yes, one other little question, even with 3 days, what kind of super mega whopper processor have you got that could bake all the textures?? LOL I've been baking a Deimos for 45 mins now and it's not even moderately brown :(

Either way, good luck with the project, if I get the hang of this, I'll see if I can lend a hand in any way :)

Flipside :D

 

Offline diamondgeezer

Default ship image maps, and HT&L
Er... K, obviously I have no idea what you lot are going on about with this whole baking thing (I'm hoping there's Shivan pie involved), but would it be possible to 'bake' all the non-tiled parts in to one map, leave the tiles as they currently are and then combine the whole lot?

Even if this approach would work, I see little point since the Deimos, for example, consists almost entrely of tiled textures. But then I assume you lot know more about this jiggery pokery than me :nod:

 

Offline Odyssey

  • Stormrider
  • 28
Default ship image maps, and HT&L
Quote
Originally posted by Flipside
Oh yes, one other little question, even with 3 days, what kind of super mega whopper processor have you got that could bake all the textures?? LOL I've been baking a Deimos for 45 mins now and it's not even moderately brown :(

A giant galactic super-oven. I bought it from a charity shop. It says on the label that it can bake anything up to a sathanas 'in 20 minutes'.
Pretty cool huh.

And DG, 'baking' is just basically taking the model and using a tool to render out the model into one flat image. If anything's tiled, you'll just see lots of it on the baked version. If I could find the baked texture for the hippocrates, I'd show it to you.
You can't really leave one bit tiled and one not. And I'm guessing that the only disadvantage to using one big texture is that it takes up more filesize - the video card still has to render the same amount of pixels, tiled or not. Something like that, anyway.
« Last Edit: October 31, 2003, 06:15:30 pm by 493 »

 

Offline Flipside

  • əp!sd!l£
  • 212
Default ship image maps, and HT&L
Hmmm... Got that Deimos thingy finished...I'll have to look up how to apply your freshly baked image back into the original model :)

Flipside :D

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
Default ship image maps, and HT&L
Quote
Originally posted by diamondgeezer
would it be possible to 'bake' all the non-tiled parts in to one map, leave the tiles as they currently are and then combine the whole lot?


this has been already done by :v::)