Page 1 of 2
Custom Texture Mess
Posted: Mon Sep 06, 2004 6:45 am
by spy0012
Hey all me again.
I created a texture for my map and also the shader in the script folder, problem is as follows.
I have loaded the texture in mohradient and positioned it with surface inspector and looks perfect, BUT
I compile the map and load the map but when i view the sign i made it's all tiled and unreadable, basically multiple views of the image not just one full image as per look in mohradient, contents of shader is here any mistakes let me know pls.
rules.shader
textures/farmhouse/rules
{
qer_keyword farm
qer_keyword wall
surfaceparm wood
{
map textures/farmhouse/rules.tga
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
And the texture i called rules.tga and placed in textures/farmhouse/
Any help would be appriciated, does it have to be a set size file or am i missing an alpha channel please help
Alpha channels i have are
RGB
red
green
blue
Help pls
Posted: Mon Sep 06, 2004 7:15 am
by bdbodger
maybe add qer_editorimage textures/farmhouse/rules.tga to the shader ?
Posted: Mon Sep 06, 2004 7:29 am
by spy0012
bdbodger wrote:maybe add qer_editorimage textures/farmhouse/rules.tga to the shader ?
Will try it and see, i have done ctrl F to fit image but makes it referse the image so i rotated the board the image is on to make it appear right, trying that then will try adding that line to shader
Cheers
Posted: Mon Sep 06, 2004 8:01 am
by spy0012
That did not fix the problem, the image is still tiled, does the image require an alpha channel as i do have one.
what is the required image size is there one
Screenshots are should look like and what it looks like in game
Radient View
Game View:
If someone could help me it would be greatly appriciated, the file is 256x256 in size i read somewhere to do it that size, but needless it does not appear right in game
HELP PLZZZZZZ
Posted: Mon Sep 06, 2004 8:11 am
by Shuriken1
I'm new to making textures for mohaa too. I've just created a sign and this is the shader file I am using (stolen from another texture):
Code: Select all
textures/outoforder/out_of_order
{
surfaceParm rock
{
map textures/outoforder/out_of_order.tga
rgbGen identity
depthWrite
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
depthFunc equal
}
}
As you have said, I also had to do ctrl-f and X-Flip it too, but it is fine for me. I hope that is of some use to you.

Posted: Mon Sep 06, 2004 8:32 am
by spy0012
I did what u said above do i need to re apply the texture with the new shader as i changed shader but not reapplied, i know just changing the shader did nothing.
More help still needed please help sofar has been great
Posted: Mon Sep 06, 2004 8:53 am
by Shuriken1
You definately need to restart Radiant and I would also reapply the texture, apply something else first just to make sure. You are using MBuilder to compile your map aren't you? The in-editor compilers make a mess of your map, including tiling your textures.
Posted: Mon Sep 06, 2004 8:58 am
by spy0012
Re-Applied texture, re-compiled using mbuilder which i always do, my image size is 256x256 32 bit tga file with alpha channel
Still tiles which dosen't show that in radient which is winding me up lol,
I have no idea why it does it, is the image size correct?, 32 bit right?
if anyone has any ideas i would be very grateful as the map is nearly complete just this stopping me releasing the map, i need these boards to hide the jail doors when they rise.
Thanks for the help Shuriken1, but i do not know why it don't work any answers to the image size and bit will be good or something
Cheers
Posted: Mon Sep 06, 2004 11:07 am
by Shuriken1
I originally did my texture as a jpg until I realised that the shader only does tga's. Although, I found out afterwards that it will load a jpg but u have to put tga in the shader.
Anyway, I did my texture 400x100 because that related to the shape of the face I was putting it on. It turned out to be far too big for the face but ctrl+f and an x-flip sorted it.
have you changed your shader file to match the one I posted (minus path changes)?
512
Posted: Mon Sep 06, 2004 11:49 am
by tltrude
Texture images should be 512 X 512 in size. But, it can be smaller if you keep the numbers divisible by 32.
265 X 512
128 X 64
512 X 128
64 X 32
Like that.
Posted: Mon Sep 06, 2004 2:39 pm
by Ezykeyal
I think the Alpha channel is unneeded here.
Have no sollution for the texture problem itself though.
Hmmm when i look at your image in your radiant texture chooser it does not look 256x256 to me, if that was the correct size it would be square and equel which it is not.
wrong dimensions
Posted: Mon Sep 06, 2004 3:25 pm
by panTera
Yes, no need for a 32bit alpha tga as the texture doesn't have any see-through parts. For images with text just save it as 24bit tga. Not using the right dimensions is most likely the reason for this strange tile effect. Like Ezykeyal said the texture in the texture browser doesn't look like a 256x256 image. You can use rectangular images as long as the dimensions are divisible by 16 and the outcome is an integer number. Also you might want to add nopicmip to the shader just below the surfaceparm part. This will keep the texture sharp/readable even if people lower their settings.
Posted: Mon Sep 06, 2004 5:10 pm
by spy0012
I have changed the tga to 24bit and changed the size to 512 x 512, modified shader to include nopicmip provided by penTera
If this does not work i will scream lol it's taking to long to fix, i may just ad a texture to it and a light above hanging over if this does not work
Cheers for the help
No Luck i give up
Posted: Mon Sep 06, 2004 6:29 pm
by panTera
If you still want to give it a shot, here are some more things you could try:
- remove custom pk3's from the main folder if you haven't already,
- rename the shader from rules.shader to farmhouse.shader,
- or, disable/remove the shader and see what happens? If it still acts weird at least you know it's not the shader,
- apply a different standard texture to the same brush and see if this one gets tiled too.
If you want I can send you a PM with my email, then mail the texture to me and I'll see if I can find what's wrong with it. Just lemme know!
Posted: Mon Sep 06, 2004 6:37 pm
by spy0012
Hi penTera, i have done what u said and no joy, if you coul look at it for me i would appriciate it, let me know what u need from me and i will mail it
Cheers