TGA or JPEG ?

Post your skinning / modelling questions or answers here

Moderator: Moderators

Salombo
Sergeant
Posts: 61
Joined: Mon Jun 05, 2006 1:30 pm
Location: New York

TGA or JPEG ?

Post by Salombo »

Hello All
I have made a skin pack and changed a few textures from tga to jpeg ... this saves a lot of space. The shader didn't have to be updated.
And the skins work perfectly.

Is there a rule for using tga when jpeg works too ?

Thank you

using psp(mac) and gimp(pc)
Image
Runt
First Lieutenant
Posts: 188
Joined: Wed Feb 11, 2004 5:03 pm
Location: The Netherlands
Contact:

Post by Runt »

I think the shader has to be tga. The real textures can also be jpg.
Salombo
Sergeant
Posts: 61
Joined: Mon Jun 05, 2006 1:30 pm
Location: New York

Post by Salombo »

Yeah true 8-)

A skin I downloaded had a tga shader and a jpeg texture. That's what made me check this out. I reduced the size of the skinpack from 25mb to 9mb by converting large tga files to smaller jpegs. Haven't noticed a loss in detail or quality.

That's why I was wondering if there was some sort of rule for using tgas instead of jpegs. I don't want to end up crashing the server or causing a conflict in any way.

Thank You for answering :wink:

Respectfully :D
Image
Runt
First Lieutenant
Posts: 188
Joined: Wed Feb 11, 2004 5:03 pm
Location: The Netherlands
Contact:

Post by Runt »

tga's can handle alpha channels. used for transparant parts of textures.
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

If the tga carries an alpha channel - it will be lost in the jpeg.

/forum/viewtopic.php?t=11914
Salombo
Sergeant
Posts: 61
Joined: Mon Jun 05, 2006 1:30 pm
Location: New York

Post by Salombo »

Well Thank You Guys
That clarifies the dos and donts.

cheers :wink:
Image
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

i have seen skin shaders where the file type was changed to .jpg though i see no reason to go through that if the file type lists .tga and it still accepts .jpg .
i'm not f****** angry, i'm from philadelphia .
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

I do.
quake3-1.32b/code/renderer/tr_image.c wrote:

Code: Select all

if ( !Q_stricmp( name+len-4, ".tga" ) ) {
	  LoadTGA( name, pic, width, height );            // try tga first
    if (!*pic) {                                    //
		  char altname[MAX_QPATH];                      // try jpg in place of tga 
      strcpy( altname, name );                      
      len = strlen( altname );                  
      altname[len-3] = 'j';
      altname[len-2] = 'p';
      altname[len-1] = 'g';
			LoadJPG( altname, pic, width, height );
		}
;)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

the canuk skin shader in city nights final :
jyd_tunic
{
qer_editorimage textures/flak/forces/jyd_tunic.tga
{
map textures/flak/forces/jyd_tunic.tga
rgbGen lightingSpherical
}
}
jyd_pants
{
qer_editorimage textures/flak/forces/jyd_pants.tga
{
map textures/flak/forces/jyd_pants.tga
rgbGen lightingSpherical
}
}
jyd_boonie-tops
{
qer_editorimage textures/flak/forces/jyd_boonie-tops.jpg
cull none
{
map textures/flak/forces/jyd_boonie-tops.jpg
rgbGen lightingSpherical
}
}

jyd_boonie-sides
{
qer_editorimage textures/flak/forces/jyd_boonie-sides.jpg
cull none
{
map textures/flak/forces/jyd_boonie-sides.jpg
rgbGen lightingSpherical
}
}
jyd_face
{
qer_editorimage textures/flak/forces/jyd_face.tga
{
map textures/flak/forces/jyd_face.tga
rgbGen lightingSpherical
}
}
jyd_tunic_c
{
qer_editorimage textures/flak/forces/jyd_tunic.tga
{
map textures/flak/forces/jyd_tunic.tga
rgbGen lightingSpherical
}
}
jyd_blank
{
qer_editorimage textures/flak/forces/jyd_blank.tga
{
map textures/flak/forces/jyd_blank.tga
rgbGen lightingSpherical
}
}
45holster_jyd
{
qer_editorimage textures/flak/forces/45holster_jyd.tga
{
map textures/flak/forces/45holster_jyd.tga
rgbGen lightingSpherical
}
}
sv_jyd_sleeve
{
qer_editorimage textures/flak/forces/sv_jyd_sleeve.tga
{
map textures/flak/forces/sv_jyd_sleeve.tga
rgbGen lightingSpherical
}
}
i'm not f****** angry, i'm from philadelphia .
Image
User avatar
k47a
товарищ
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post by k47a »

not very on topic

i get a 'load tga' error when loading the game when i use custom jpg textures... any ideas how to solve this problem (last time i had to change every jpg tex to tga to fix the problem :? )?
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Make sure your .jpg image is a 24 bit rgb color image . What are you useing to make the jpg ?
Image
User avatar
k47a
товарищ
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post by k47a »

Thanks! I'm using PS to make them; where can i check that it's 24 bit rgb?
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

they released Q3 codebase? i thought thye just released Q2...
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

lizardkid wrote:they released Q3 codebase? i thought thye just released Q2...
news to Lz2the k-i-d; vader is luke's father .
i'm not f****** angry, i'm from philadelphia .
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

If that means Photo Shop then on the image menu with a graphic loaded click mode and make sure it says rgb color and 8 bits per channel .
Image
Post Reply