Landmines


(GTBGranny) #1

Hi guys, I just need one more bit of help before my map is completely finished.

I cannot lay mines on the grassy area of my map.

I was hoping someone could explain it to me like I was a five year old.

I have read all the surfparm guides but can’t seem to get mu head around it.

Many thanks
Granny


(IndyJones) #2

are you using custom grass texture?


(FireFly) #3

It’s probably a problem with the shader you are using for your grass texture…
Could you post the shader you are using for the grass texture in your map?


(GTBGranny) #4

My apologies for not replying sooner, I have just finished a night shift.

I am using the straw texture, for grass area of map.

Many Thanks
Granny


(GTBGranny) #5

Well I tried this in my shader script.

I copied from the RADAR shader file and changed the texture.

But as expected it didn’t work, everything just went Orange.

I really need a tutorial that a halfwit can understand !

levelshots/mad44_automap 
{
 
       nopicmip 
       
       nocompress

       nomipmaps
       {   
                    clampmap levelshots/mad44_cc.tga 
                    
                    depthFunc equal

                    rgbGen identity
 
       }   
} 

levelshots/mad44_cc_trans

{
 
       nopicmip 
       
       nocompress

       nomipmaps

       {
   
                    clampmap levelshots/mad44_cc.tga 
                    
                    blendfunc blend

                    rgbGen identity

                    alphaGen vertex
 
       }   
} 

{
	q3map_normalimage textures/terrain/straw.jpg
	
	q3map_lightmapsize 512 512
	q3map_lightmapMergable
	q3map_lightmapaxis z
	
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	q3map_tcMod scale 2 2
	q3map_tcMod rotate 37
	
	surfaceparm grasssteps
	surfaceparm landmine	
}

Many Thanks
Granny


(GTBGranny) #6

OK to simplify my question.

I have a grass texture in textures/terrain called straw.jpg

Can anyone see any reason why at least one of these four shaders will not work?


1
textures/terrain/straw
{
	qer_editorimage textures/terrain/straw.tga
	q3map_nonplanar
	q3map_shadeangle 120
	surfaceparm grasssteps
	surfaceparm landmine
	implicitMap textures/terrain/straw.tga
}

2
textures/terrain/straw
{
	qer_editorimage textures/terrain/straw.jpg
	q3map_nonplanar
	q3map_shadeangle 120
	surfaceparm grasssteps
	surfaceparm landmine
	implicitMap textures/terrain/straw.jpg
}

3
textures/terrain/straw1
{
	qer_editorimage textures/terrain/straw1.tga
	q3map_nonplanar
	q3map_shadeangle 120
	surfaceparm grasssteps
	surfaceparm landmine
	implicitMap textures/terrain/straw1.tga
}

4
textures/terrain/straw1
{
	qer_editorimage textures/terrain/straw1.jpg
	q3map_nonplanar
	q3map_shadeangle 120
	surfaceparm grasssteps
	surfaceparm landmine
	implicitMap textures/terrain/straw1.jpg
}

Cheers
Granny


(IndyJones) #7

are you using all of these shaders at once?
make sure your texture in radiant has a GREEN border.


(GTBGranny) #8

Hi, thankyou for replying.

I am not using all four, this is just the four I have tried with no success.

The texture I am using has a green box around it.

This is my shader script file as it stands now.

levelshots/mad44_cc_automap 
{
 
       nopicmip 
       
       nocompress

       nomipmaps
       {   
                    clampmap levelshots/mad44_cc.tga 
                    
                    depthFunc equal

                    rgbGen identity
 
       }   
} 

levelshots/mad44_cc_trans

{
 
       nopicmip 
       
       nocompress

       nomipmaps

       {
   
                    clampmap levelshots/mad44_cc.tga 
                    
                    blendfunc blend

                    rgbGen identity

                    alphaGen vertex
 
       }   
}

textures/terrain/straw
{
	qer_editorimage textures/terrain/straw.jpg
	q3map_nonplanar
	q3map_shadeangle 120
	surfaceparm grasssteps
	surfaceparm landmine
	implicitMap textures/terrain/straw.jpg
}

Many Thanks
Granny


(IndyJones) #9

open your .map in notepad and see if there is a .jpg in texture name.

btw. your screen is huuuuge! :lol: i had to scale it a lot…


(GTBGranny) #10

LOL, Sorry, wanted to make sure you could see the green line around texture.

I have loads of these lines in my .map file



// brush 781
{
( 8272 4632 -8 ) ( 3664 4632 -8 ) ( 3664 -8 -8 ) terrain/straw 16 0 0 0.5 0.5 0 4 0
( -8 -8 856 ) ( 4600 -8 856 ) ( 4600 -8 848 ) terrain/straw 16 -32 0 0.5 0.5 0 4 0
( 2440 -472 856 ) ( 2440 4168 856 ) ( 2440 4168 848 ) terrain/straw 0 -32 0 0.5 0.5 0 4 0
( 4600 4632 856 ) ( -8 4632 856 ) ( -8 4632 848 ) terrain/straw 16 -32 0 0.5 0.5 0 4 0
( -8 4632 856 ) ( -8 -8 856 ) ( -8 -8 848 ) terrain/straw 0 -32 0 0.5 0.5 0 4 0
( 32 4632 0 ) ( 4640 4632 0 ) ( 32 -8 0 ) terrain/straw 0 0 0 0.5 0.5 0 0 0
}

hope that answers the question.

Cheers


(GTBGranny) #11

My apologies, I should have read the question properly.

No there is no .jpg anywhere in the file.

So I tried this and it didn’t work either.

levelshots/mad44_cc_automap 
{
 
       nopicmip 
       
       nocompress

       nomipmaps
       {   
                    clampmap levelshots/mad44_cc.tga 
                    
                    depthFunc equal

                    rgbGen identity
 
       }   
} 

levelshots/mad44_cc_trans

{
 
       nopicmip 
       
       nocompress

       nomipmaps

       {
   
                    clampmap levelshots/mad44_cc.tga 
                    
                    blendfunc blend

                    rgbGen identity

                    alphaGen vertex
 
       }   
}

textures/terrain/straw
{
	qer_editorimage textures/terrain/straw
	q3map_nonplanar
	q3map_shadeangle 120
	surfaceparm grasssteps
	surfaceparm landmine
	implicitMap textures/terrain/straw
}

(GTBGranny) #12

After doing a bit more research I have found a thread which tells someone to put the name of the terrain shader in the shaderlist.txt

I assume this is the shaderlist found in the scripts folder of etmain.

I added straw and it didn’t work either.

Just to make doubly sure I did it right, I just have my grass as normal caulked brush with a straw texture (which looks like grass)

I haven’t got to do anything special to each brush have I ?

When I look at the entities of the brush it just appears as worldspawn with coordinates.

:mad:


(IndyJones) #13

try compile it under radiant 1.4… :slight_smile:


(GTBGranny) #14

OK I tried that and that didn’t work either.

Where can I get an image of someone smashing his PC to pieces so I don’t have to actually do it myself !!!


(IndyJones) #15

not exacly what are you looking for…


(GTBGranny) #16

Well it made me feel a bit better.

I have just tried using a different texture.

grass_dense1 that can be found in the pak0 file.

That didn’t work either with this shader.

levelshots/mad44_cc_automap 
{
 
       nopicmip 
       
       nocompress

       nomipmaps
       {   
                    clampmap levelshots/mad44_cc.tga 
                    
                    depthFunc equal

                    rgbGen identity
 
       }   
} 

levelshots/mad44_cc_trans

{
 
       nopicmip 
       
       nocompress

       nomipmaps

       {
   
                    clampmap levelshots/mad44_cc.tga 
                    
                    blendfunc blend

                    rgbGen identity

                    alphaGen vertex
 
       }   
}

textures/terrain/grass_dense1
{
	qer_editorimage textures/terrain/grass_dense1
	q3map_nonplanar
	q3map_shadeangle 120
	surfaceparm grasssteps
	surfaceparm landmine
	implicitMap textures/terrain/grass_dense1
}

aaaaaaaaaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrgggggggggggggghhhhhhhhhhhhhh !


(GTBGranny) #17

Also tried this:

textures/temperate_sd/grass_dense1
{
	qer_editorimage textures/temperate_sd/grass_dense1
	q3map_nonplanar
	q3map_shadeangle 120
	surfaceparm grasssteps
	surfaceparm landmine
	implicitMap textures/temperate_sd/grass_dense1
}

I give up, who wants mines anyway !!!


(GTBGranny) #18

I assume I am doing the right thing by putting this in the script folder as <mapname>.shader


(Magic) #19

The name shouldn’t matter - as long as the content is right.
And dont forget to put in <mapname> to your shaderlist


(Pande) #20

Just noticed one thing on your shaders: you have no lightmap stage!

This can cause random errors.

Just add

{
map $lightmap
rgbGen identity
}

Also, you are using the implicitmap thing, which has never worked for me in organized tests. I dunno what requirements for it are, but it would be much easier for you to make a separate stage for your image. Your shader might look like this:

textures/terrain/straw
{
qer_editorimage textures/terrain/straw.tga
q3map_nonplanar
q3map_shadeangle 120
surfaceparm grasssteps
surfaceparm landmine
{
map $lightmap
rgbGen identityLighting
}
{
map textures/terrain/straw.tga
rgbGen identity
}
}

Last thing to check… open up properties of the image and look at file extension. If it says .jpg or .tga or .png your ok, but if it says .jpeg, the texture won’t work because it is too advanced for the game engine.

Simply open in GIMP or PS and resave making sure to put .jpg at the end instead of .jpeg.