Type 2 RGB

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Type 2 RGB

Post by tltrude »

Does anyone know how to save (or convert) a jpg or tga image to "type 2 RGB" with Adobe Photoshop 5.5?

I've tried all the different settings I can find, 32bit, 24bit, different quality settings, but nothing seems to work. The only way I can do it is to paste a layer onto an original game image, save it, and then change the name of the file. But, there should be an easier way.

I know there are different kinds of JPG image standards, but none of them are "type 2" in Adobe Photoshop. I can't find any difference in the properties of images that work and images that don't.

Image
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

is image->mode->rbg checked ?
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

What exactly are you using the jpg's for ? I have not come across type 2 before. Are you making custom textures ? I just save out a normal jpg from photoshop and they work fine, though the shader still has to point to a .tga, it automatically finds the jpg even though in theory its looking for a tga.
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

errors

Post by tltrude »

Well, most of the time when I make a new texture, or a loading screen, the game crashes and the console says "use only type 2 rgb tga or jpg images", or something like that. But, the image is already mode RGB. If you have never seen that error, you are very lucky.
Tom Trude,

Image
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

I have never seen that error before, very strange though.

Heres a shader I had for a Pole Dancing sign.

textures/odds_n_sods/neon_sign
{
qer_keyword nuggets
qer_keyword misc
qer_keyword panel
surfaceparm metal
qer_editorimage textures/odds_n_sods/neon_sign.tga
{
map textures/odds_n_sods/neon_sign.tga
depthWrite
rgbGen identity
}

The actual image is a JPG, the shader still says its a TGA, I think if it cant find a TGA with that name it substitues it for a JPG.

heres the image that went with the shader,

Image

I used the save for web function in photoshop, didnt do anything special to it, it worked for me, I guess you could test it with mine to see if it still produces errors.
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

error

Post by tltrude »

Here is the error I see a lot:

********************
ERROR: LoadTGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported

********************
----- Server Shutdown -----
==== ShutdownGame ====
Tom Trude,

Image
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

You will get that also if your shader still calls the alpha channel.

Get rid of the blendfunc gl_one_minus_src_alpha gl_src_alpha line, and it should work for .jpg.

Like mentioned earlier, still call the .tga in your shader, even though your image is a .jpg.

Also, save the .jpg with ICC channels, and with medium settings, not optimized. (5)

I'm sure there are other ways to do it, but this method works for me.

Kill Ya Later!
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

jpg

Post by tltrude »

I have gotten a jpg to work in a loading screen shader with out naming it a tga. I tried the following shaders with .jpg changed to .tga, but the game still crashes with the same error. I turned down the quality to 5 (medium), still crashes. Where do I find ICC in photoshop?

Code: Select all

textures/custom/fuhrer1
{
	qer_editorimage textures/custom/fuhrer1.jpg
	qer_keyword posters
	qer_keyword custom
      surfaceparm paper
	{
		map textures/custom/fuhrer1.jpg
	}

}

textures/custom/fuhrer2
{
	qer_editorimage textures/custom/fuhrer2.jpg
	qer_keyword posters
	qer_keyword custom
      surfaceparm paper
	{
		map textures/custom/fuhrer2.jpg
	}

}
The jpgs are ones I copied from the internet and they are both truecolor RGB images.

Image

Image
Tom Trude,

Image
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

Here is an example of a shader I used for a custom texture for wood:

textures/crunch/woodstack
{
qer_editorimage textures/crunch/woodstack.jpg
qer_keyword wood
qer_keyword wall
surfaceparm wood
{
map textures/crunch/woodstack.jpg
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}


The image is jpg, and renders perfectly.

The ICC selection will be in the pop-up window on the bottom when you
select save as-->jpg.

Kill Ya Later!
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

nope

Post by tltrude »

I tried your shader and it still crashes. There is no ICC at the bottom when I save as-->jpg in photoshop 5.5. The only options it shows are (as seen in the screenshot in the first post):

Baseline("standard") --which is default
Baseline Optimized
Progressive

Under the image/mode menu there is:

8 bit/channel --which is default
16 bit/channel

When I right click on one of the jpg files and check the properties it says:

File Type: Joint Potographic Experts Group (JPEG)
Width: 334
Height: 480
Horizontal Resolution: 72
Vertical Resolution: 72
Bit Depth: 24
Color Representation: True Color RGB
Tom Trude,

Image
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

Something is definately not right. I grabbed your images off the site, and with the shader above, and no changes whatsoever to the images, they appear perfectly in-game.

Image

This is with this shader:
textures/custom/fuhrer1
{
qer_keyword wood
qer_keyword wall
surfaceparm wood
{
map textures/custom/fuhrer1.jpg
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
textures/custom/dersieg
{
qer_keyword wood
qer_keyword wall
surfaceparm wood
{
map textures/custom/dersieg.jpg
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}


The shader is saved as custom.shader and the .pk3 is saved as custom.pk3. The images themselves are in the textures/custom directory, and the shader in the scripts directory.

I don't know why it is not working for you.
Image
Post Reply