custom textures

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

Moderator: Moderators

User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

custom textures

Post by small_sumo »

Got a funny thing where they come out like the setting is 10% of specified size. Erm not the best description but if you know what I mean please help. I set it nicly in radient and then in game comes out tiny.

:(

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

no clue

Post by tltrude »

I have no clue what you are talking about. Can you post a screenshot or the texture image and the shader text?
Tom Trude,

Image
Oddball_Woof
Sergeant
Posts: 74
Joined: Tue Aug 06, 2002 9:32 am
Location: London UK

Post by Oddball_Woof »

Having a bad memory and being as old as Balr does not help at all

But if my leaky memory serves could you have changed the tessSize by accident?

But you do need to explain what texture what shader values etc you are on about?
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

here is some pics
Image
Image

and the shader looks like this


textures/small_sumo/easy
{
qer_keyword door
qer_keyword snow
qer_keyword metal
surfaceparm metal
{
map textures/small_sumo/easy.tga
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}

textures/small_sumo/tmt
{
qer_keyword door
qer_keyword snow
qer_keyword metal
surfaceparm metal
{
map textures/small_sumo/tmt.tga
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}

textures/small_sumo/nosirree
{
qer_keyword door
qer_keyword snow
qer_keyword metal
surfaceparm metal
{
map textures/small_sumo/nosirree.tga
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}

and I wrote the others the same. Thanks for yer help lads.

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

Ok

Post by tltrude »

That is called "tiled". It means the image is repeated in it's original size to fill the space. I don't know why it is doing it. Is it a decal? I think decals need another file. One of your posters looks right, so you should find all the files for that one and compare them.

Isn't there a preference setting for "tiled" textures? Try clicking that big "A" button and change the "eye" to "no number" once to see what that does.
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

A: View alpha textures as they would be shown in-game.
Eye: Selects the modes of camera movement
These two buttons won't help. :cry:

The shader looks fine, the problem must be somewhere else.

I had this just once in GTK Radiant and never again, but others had it as well. The posts in this forum regarding this topic aren't very helpful, but it might help to delete and rebuild the brushes and realign those textures. :?
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

Strange its happend cos I never had that problem on my dozer before and now its doing it. The dozer is to the right of what is depicted.
Erm not a decal..... mmmm its a bit strange. Never used to have shaders for my custom textures, I was happy with the default sounds and all, I just started writing them because of this problem, though it never did fix it.

Anyway maybe somone stumbled on the answer and will happen bye here.

Thanks all the same guys.

Bye
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

Hmmm I think I might have the answer, I found a brush with an invalid texture on it. Might be the problem.

Hope I'm right.
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

adding 'clamp' might do the trick, but this can also have a disadvantage and cause weird stretching. Tip: don't use clampmap for textures that are specifically made to tile. But for paintings it's okay.

{
clampmap textures/small_sumo/easy.tga
depthWrite
rgbGen identity
}
Oddball_Woof
Sergeant
Posts: 74
Joined: Tue Aug 06, 2002 9:32 am
Location: London UK

Post by Oddball_Woof »

I have had one of em days today too. map would compile then crash in MOH saying wrong type of TGA ...ARG!!!!!! BUT WHICH ONE there were dozens!!!!!
Finicky shader problems didnt help either.

Basically it looks as though those textures dont even need shaders unless you want to use the decal features. try with the shaders disabled. Have you used an MOH shader with similar properties as a template?

Some shader attributes have to be in a specific order I notice that you have a slight variation in order.

textures/general_structure/door_offwhite2
{
qer_keyword wood
qer_keyword door
surfaceparm wood
{
map textures/general_structure/door_offwhite2.tga
>>rgbGen identity
depthWrite
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
>>> rgbGen identity
depthFunc equal
}


Try copying this version from MOH in the same order you never know.



A more likey possibilty is have you checked in radiant the the brushes havent somehow gotten world spawn attributes, failed sky boxes tile like that?


Check that the TGA is the correct type.

check there are no conflicts with older versions of shader elsewhere in MOH.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

use JPG

Post by tltrude »

If you use JPG images, the file size of your final pk3 will be much smaller. You really only need to use TGA for see-through textures.
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

yep! jpg is better regarding size. Nevertheless, in the shader a picture.jpg you must call picture.tga!
Oddball_Woof
Sergeant
Posts: 74
Joined: Tue Aug 06, 2002 9:32 am
Location: London UK

Post by Oddball_Woof »

There is a good reason jpg is smaller, its called compression ;-)
Even at best resolution a jpg distorts more than a tga because of the way the jpg format stores the image information.
Hence in PSP for example you can use the jpg artifact remover to in some ways improve the image by removing in the worst case very obvious blocks the draw back is the grainy image produced is an approximation to the original image before compressed by the jpg format.

Hence a tga can be blown up more as it carries more image information than the same size jpg image.

You dont need to use tga in the shader if the file it refers to is jpg that wouldnt make sense, any image can be a tga in MOH but not all can be jpg as trude said only tga used in MOH carry an alpha channel used to create masks opaque or transparent.

Only certain types of tga file will carry an alpha channel usable by MOH.

BTW certain shader properties can be altered in the script such as tcmod properties thus you can change the values to create different effects when for example triggered by the player.

Its a good way to test these properties in game through the console rather than continually creating new maps to test them.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Oddball_Woof wrote:You dont need to use tga in the shader if the file it refers to is jpg that wouldnt make sense
No it wouldn't make sense but that's how it works though. Mohaa never actually made sense ;) (nor quake)
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

jv_map wrote:
Oddball_Woof wrote:You dont need to use tga in the shader if the file it refers to is jpg that wouldnt make sense
No it wouldn't make sense but that's how it works though. Mohaa never actually made sense ;) (nor quake)
If you want to use a picture called rustywood.***, you can save it as rustywood.tga or as rustywood.jpg. If it has an alpha channel, you'd choose tga format (because Targa is capable to hold this channel), else you'd take jpg (because Jpeg is smaller). But: Saving it as rustywood.jpg, you MUST NOT use the correct filename rustywood.jpg in the shader, but you have to write rustywood.tga!
Anything clear now? :wink:
Post Reply