Page 1 of 1
Type 2 RGB
Posted: Tue Aug 19, 2003 1:28 am
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.

Posted: Tue Aug 19, 2003 11:04 am
by bdbodger
is image->mode->rbg checked ?
Posted: Tue Aug 19, 2003 11:43 am
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.
errors
Posted: Tue Aug 19, 2003 1:06 pm
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.
Posted: Tue Aug 19, 2003 4:38 pm
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,
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.
error
Posted: Wed Aug 20, 2003 5:28 pm
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 ====
Posted: Wed Aug 20, 2003 11:41 pm
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!
jpg
Posted: Thu Aug 21, 2003 12:12 am
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.

Posted: Thu Aug 21, 2003 12:29 am
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!
nope
Posted: Thu Aug 21, 2003 1:00 am
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
Posted: Sun Aug 24, 2003 4:49 am
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.
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.