View Single Post
Costin83
Senior Member
Join Date: Jul 2008
Location: Romania
Old 12-26-2011 , 15:06   Re: [TUT] How to overcome some annoying problems on converted models for CS 1.6
Reply With Quote #11

As long as you don't have the source texture, you might want to keep what you have unaltered as much as possible.

Terms:

1. Resize/Scale(up/down): change a picture dimension(s) to a smaller/larger picture size.
2. UpScale: change a picture dimension(s) to a larger picture (stretching it)
3. DownScale: change a picture dimension(s) to a smaller picture.
4. Indexed 256colors: The color depth a texture for HL Engine uses.
5. RGB TrueType 24bit: The maximum color depth a simple picture/texture (single layer, no transparency) can have

Resize, Scale, UpScale, DownScale have nothing to do with color depth of a picture/texture.

If you must scale a 256color texture in any way (that means you don't have the original texture) then you must first convert the texture to RGB True Type 24bit, then do your scaling and after that it's done you convert your texture back to Indexed 256color.

If you have non-standard size textures, you might want to use the most close standard size your texture is near to.
So: If you have a 292X498px texture you will go for a 256X512px texture.
But, if you have a 387X498px texture you will go for a 512X512px texture.

For getting a right texture size there are more things to take in account:
a. Is the texture full size or it was cropped on compiling ?
b. Is the texture used for a small or a big object ?
c. Is the texture filled by the UV-Map or just partially ?
d. Can the full texture be used for a model or just a part of it ?

a. If the texture is full size (not cropped and standard size 128/256/512/etc.) you might want to leave it as is.
If the texture is cropped to 500X508 for example your best choice it's to add borders to fill up to 512X512. Stretching it to 512X512 will just add some artifacts to your texture and will f**ck up the aspect ratio; plus you will loose some quality by converting to 24bit and back to 256color.
b. If your texture is used for small/distant objects you might want to downscale it keeping it's aspect ratio. In other situations, if the texture is small and you want it for a big model upscaling it for example from 256X256 to 512X512 won't help you at all.
c. If you have a texture that is just partially used (UV-Map only covers a small part of your texture) you can use just that part of the texture by cropping it to a standard size that covers your part of the UV-Map.
d. If you for example have a player model texture and you just want to use a part of it think twice. Maybe that texture might be extracted and used for other model that's using the whole texture...
There can be other things to take in consideration but I'm quite in a hurry now and these are the first things that came through my mind right now...
__________________
Originally Posted by Hawk552
Actually, if your style pisses me off enough, I'll generally go through your code and find some reason to unapprove it or at least hold it back.

Last edited by Costin83; 12-26-2011 at 15:17.
Costin83 is offline
Send a message via Yahoo to Costin83