Now you work, now you don't.


(Mr_Tickles) #1

I’m not sure if it’s radiant, the compiler, or something i’m missing, but maybe someone can enlighten me.

I’ve made a chainlink fence and it’s properties seem to vary whenever I compile and run it. I’ve constructed it by first making a clip_missile brush then adding the alpha-texture to one face. The problem is, there are several sections to this fence, all built in exactly the same way. However, in game, one piece of the fence works perfectly, blocking missiles, players, but not bullets, and other pieces of the fence just act as if they are solid blocks, i.e. preventing bullets, missiles and players from passing through. Also sometimes they can just let anything through, although this was when I was using nodraw primarily then applying clip_missile to one face, and the alpha texture to the other.

In addition to the fence problem, I have a func_explosive, which is really quite basic, it just sits there till you attack it. This also has the same problem, sometimes when I run the map (after compiling), the brush is explosive, and other times it’s not. I know i’m not doing anything to this brush in radiant each time I compile because it’s in a completely different part of the map to where I’m working.

I’m confuesd, can someone suggest a remedy please.

I’m using q3map2 with compile options -meta -light -filter -samples 2 -vis -fast -saveprt


(MuffinMan) #2

I can’t help with the func_explosive but with the fence - in fact you don’t need to actually do anything, radiant rewrites all the brushes all the time and it doesn’t care for the order of the planes in each brush - the problem is that the first plane seems to be important, the shader applied to it marks the properties of the whole brush, so you might be safe making your fence completely clip_missile but not using any other texture on it. I had the same problem sometime ago, all I could do was retexture the thing everytime I did a compile, then it worked sometimes. maybe you can as well open your map with notepad, search the fence brushes and move the clip_missile planes to the top of each brush, would be a pain in the ass and might be rewritten by radiant again but it’s worth a try…


(Mr_Tickles) #3

Hmmm, do you think if I deleted all the fence brushes, made them all again, using clip_missile, then it may solve the problem? I’ll go try it. I did originally use caulk on it so it may have some of this left over. I’ll remake the explosive thing again as it may have similar problems.

Thanks :slight_smile:


(seven_dc) #4

You should really create fences with one side textured with alpha texture and others nodraw. then create another brush with clip_missile ontop of the orginal brush. It is the only way to make sure.


SANTERIA FORUMS


(Mr_Tickles) #5

Ahh, I see what you mean, so then it makes sure that there a six planes of clip_missile and not just 5, so it makes sure that missiles can’t get through the alpha textured side. Ok, I’ll try that in a bit aswell. Thanks


(Gringo Starr) #6

What about adding the clip surfaceparms to the fence shader?


(SCDS_reyalP) #7

BINGO! :beer:

The only correct way to do it is to have the content params from all faces of your brush match. Otherwise, you are playing the content param lottery.

If you did it as seven_dc suggests, you can still run into problems, because 1 in 6 compiles, the fence might stop bullets too.


(Ifurita) #8

I made a copy of the fence texture, put it into /textures/zeppelin/catwalk, the created a new shader:


textures/zeppelin/catwalk
{
	cull disable
	nomipmaps
	nopicmip
	surfaceparm clipmissile
	surfaceparm nomarks
	surfaceparm alphashadow
	surfaceparm metalsteps
	surfaceparm pointlight
	surfaceparm trans
	implicitMask -
}

The only new surfaceparm is the clipmissile. Then, my catwalks are just a block of /common/clipmissle with only the top face textured as /zeppelin/catwalk


(SCDS_reyalP) #9

As an aside, it seems like q3map2 could assign priority to content parms, rather than just using the ‘first’ surface, making this much more convenient. This could be either automatic (things like water and clipmissle always higher priority, and thus used if they are on any surface of the brush) or manual, or a combination.

At the very least, a warning given for mixed content parms should be possible.

Another thought would be to give surface and content params different keywords, to highlight the difference. I’m not sure if this would upset the game or not.


(ydnar) #10

That’s an interesting idea.

y


(Ifurita) #11

Ydnar, is there anyway to use a spawnflag =2 on a misc_model and have it output brushes with a slick surfaceparm?


(WolfWings) #12

It’s actually the same way the BSP/VIS/RAD tools for Quake2 worked. If any content flags mismatched between sides, the compile tools would error out to let the map designer fix it.

I would prefer being able to mark some content-flags as ‘priority’ though, instead of always having the default ‘error’ response.


(Mr_Tickles) #13

Thanks for all the help guys, I’ve done it seven_dc’s way and it seems to be working well at the moment. The clip_missile brush has 6 faces of clip_missile, and the overlaid brush has 5 faces nodraw, and one with the fence alpha texure on it. I did try to alter the shader for the fence before I posted this topic but got confused when there was no reference to the image in the shader and there was no texture which was the same as the one I saw in radiant, and indeed the game. I’m using “fence_m02”. I think I may have missed your meaning about the 1 in 6 compiles SCDS_reyalP. Was it refering to the method of using the clip_missile brush and then texturing one face of that with the alpha texture? Are the content params affected by the two overlapping brushes? Would be nice to have some indication or method of changing what the content parms of a brush are though :slight_smile: Would it necessarily have to be attached to what the surface pams are? i.e. could you make a water content if you’ve textured each face with a fence?


(SCDS_reyalP) #14

common/nodraw is actually nodraw + nonsolid.
Your fence shader most likely doesn’t have any surfaceparms except for trans, meaning it defaults to solid. Since you are mixing solid (your fence) and nonsolid (nodraw), the compiler will have to choose one or the other. It currently does this by the ‘first’ plane in the brush. Radiant re-orders the planes every time you save (or something like that), meaning which face is ‘first’ is effectively random. So for a 6 sided fence brush, with 5 sides of nodraw and one side of fence, you have a 1 in 6 chance of having it be completely solid. You roll the dice every time you compile.

The fact that you put a clipmissile brush over this doesn’t change that. It just makes it so it will always behave as clipmissile, but sometimes still be completely solid (clip bullets as well).

To avoid this, you make a new shader like this (which I used in an RTCW map)


// alpha fences that clip missles, based on alpha shaders with the same name,
// _mc added to the end of the name
textures/murderhill/fence_m02_mc
{
    qer_editorimage textures/alpha/fence_m02.tga
	qer_trans 1
    surfaceparm nomarks
	surfaceparm playerclip
	surfaceparm clipmissile
    surfaceparm metalsteps
    nomipmaps
    nopicmip
    cull disable
    {
        map textures/alpha/fence_m02.tga
        alphaFunc GE128
        depthWrite
        rgbGen vertex
    }
}

Then you texture the other 5 sides with missile clip, and this fence will work 100% of the time, and not require extra brushes.

qer_editorimage is added since the image name is no longer the same as the shader name. Without this, the editor would show you the ‘missing image’ instead.

qer_trans is added so you can see through the transparent parts of the fence in the editor. This isn’t required, but it makes things a little easier to see.

surfaceparm playerclip and surfaceparm clipmissile are added to make it behave like the common/clipmissile shader.

Everything else was in the original shader, if I remember correctly.

Note, if you choose to do this, you can user find/replace to replace all of your fence_m02 with the new one.


(Mr_Tickles) #15

Brilliant! Thank you for explaining all of that. Immense help :slight_smile:
I’m going to do that right now.


(Mr_Tickles) #16

Just one question, It’s a bit odd, but I don’t seem to have a fence_m02 in the alpha folder from the Pak. Although it shows up in game and radiant, I’m completely baffled by that. Can someone point me the way please?


(ratty redemption) #17

you could do a windows find files search, of the scripts folder and have it also search for containing text “fence_m02”

then open up any .shader files windows finds and use the notepad or wordpad find text search, again for “fence_m02” and you should find any shader lines that references it.

this is a way I find paths to images that arent in the image folders Id expect them to be, or if I know the image name and can`t find the shader :wink:


(Mr_Tickles) #18

I know where the shader is for it. It’s just the basic alpha one, and it does have “fence_m02” in it, it’s about half way down. But what I find odd is that there isn’t a line which refers to fence_m02.tga, or if it’s supposed to use the shader name to get the image, the image isn’t in the textures/alpha folder. :huh: :???: :banghead:


(ratty redemption) #19

I noticed some ja shaders don`t have an image extension like .tga or .jpg on the end of their image paths, but unless that fence_m02 your looking for was just used as an editor image, then it should be in one of the image folders, have you tried extracting all the tex and doing a windows search for it?

hang on… does the shader use an implicitmap ? …if so that means use the same image name as the shader, iirc, although that doesn`t work in rtcw.


(Mr_Tickles) #20

Yeah, I think I know what you mean Ratty, the problem is sorted with the fence for the moment by using seven_dc’s way, but I would like to be able to do it SCDS_reyalP’s way aswell.
I just have no idea where this pic is hiding. :???:
It does appear in the editor, both in the 3D window and the textures window. It also appears in the game.

Here is the part of the shader with which fence_m02 is concerned:

textures/alpha/fence_m02
{
	cull disable
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm alphashadow
	surfaceparm metalsteps
	surfaceparm pointlight
	surfaceparm trans
	implicitMask -
}

Here is the directory where it should be:

  Directory of C:\Games\Wolfenstein - Enemy Territory\Pak	extures\alpha\

 
 
   C:\Games\Wolfenstein - Enemy Territory\Pak	extures\alpha\
   ================================================================
   barb_wire.tga                          128 KB   03/03/2003 02:41:30 PM      a 
   bars_m01.tga                           256 KB   03/03/2003 02:41:30 PM      a 
   bel_orn_m01.tga                         32 KB   03/03/2003 02:41:30 PM      a 
   chateau_c06a.tga                       256 KB   03/03/2003 02:41:30 PM      a 
   chateau_c07.tga                        128 KB   03/03/2003 02:41:30 PM      a 
   chateau_c08.tga                        128 KB   03/03/2003 02:41:30 PM      a 
   chateau_c11.tga                        128 KB   03/03/2003 02:41:30 PM      a 
   fence_c10.tga                          256 KB   03/03/2003 02:41:30 PM      a 
   fence_c11.tga                          128 KB   03/03/2003 02:41:30 PM      a 
   fence_c14.tga                          256 KB   03/03/2003 02:41:30 PM      a 
   fence_m01.tga                          256 KB   03/03/2003 02:41:30 PM      a 
   fence_m06.tga                          512 KB   03/03/2003 02:41:30 PM      a 
   fence_m06b.tga                         512 KB   03/03/2003 02:41:30 PM      a 
   ladder.tga                              32 KB   03/03/2003 02:41:30 PM      a 
   mesh_c02.tga                           256 KB   03/03/2003 02:41:30 PM      a 
   mesh_c03.tga                           256 KB   03/03/2003 02:41:30 PM      a 
   truss_m03.tga                          256 KB   03/03/2003 02:41:30 PM      a 
   truss_m06.tga                           32 KB   03/03/2003 02:41:30 PM      a 
   truss_m06a.tga                          16 KB   03/03/2003 02:41:30 PM      a 
   truss_m06r.tga                          32 KB   03/03/2003 02:41:30 PM      a 


  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Total 0 folder(s); 20 file(s)

  Total files size: 4 MB; 3857 KB; 3949424 Bytes

  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Lol, I seem to keep getting problems for you ratty, sorry. Did you ever manage to re-create the dual water surfaces?