Solid NODRAW brushes


(stephanbay) #1

Hi fellas,

I have lot of Nodraw brushes with one side showing a foliage shader. the problem is that some of those brushes are solid and some are not.
here is the shader (working perfectly)

textures/pha_foliage/foliage_1
{
	qer_trans 0.85
	qer_editorimage textures/pha_foliage/foliage_1.tga
	cull disable
	nomipmaps
	nopicmip

	surfaceparm nomarks
	surfaceparm alphashadow
	surfaceparm grasssteps
	surfaceparm pointlight
	surfaceparm trans

	implicitMask textures/pha_foliage/foliage_1.tga
}

any idea?

thank you


(carnage) #2

from what i can tell your shader is actuly solid but since i gess you have nodraw on the other side of the brushes this is whats causing your effect

basicaly the compiler gives the solid/nosolid state to a brush from the first shader it gets on the brush so in some cases your hitting the nodraw shader first and getting a non solid brush. in other cases your hitting the foliage shader and getting a solid brush

your options are add the surfaceparm nonsolid to your shader

or the far more complex download the custom updated compiler from somewhere floating in these forums that allows shaders to be given priority ratings so if the nonsolid shader had a higher priority rating on a brush the brush would always be non solid regardless of what face it procesed first. personaly id take the first option


(stephanbay) #3

Alright got it. Thank you ill take the first option.


(Flippy) #4

ive had this problem before, and i always solved it by turning it into a script_mover (dont check “solid” ofcourse)

carnage, so what your saying is that if you apply the nodraw texture FIRST to the brush (all sides) and THEN the foliage shader to one side, it’s non solid. But if you apply the foliage shader first, then texture all other sides with nodraw, its solid… if that’s so, i cant really image people having this alot, cause who would go about texturing 6 faces one after the other, or one face (and the rest automatically by selecting with Shift+click)

(i guess that didnt make sense…)


(sodsm live) #5

possibly he was refering to compile-time selection of brush. if the first side the compiler comes to on a brush is a solid shader then the whole brush will be solid. and vice-versa. i always use the firs option at those times and clip manually if needed.


(kamikazee) #6

AFAIK, it’s not really dependant on the order that people textured the brush. It depends on the way Radiant writes the map file. One time it will write the non-solid texture side first, then the solid-texture side. In the last case, you’d get a solid brush.

What I do know is that Reyalp made a cust om Q3Map2 version which selects those brush content flags more carefully, though I can’t remember the exact way it works.


(=PoW= Kernel 2.6.5) #7

I have the same problem with brushes behaving badly (things acting solid that shouldn’t AND sometimes the other way around).
What’s even more weird is that if I recompile the map withput making changes, the brushes behave differently on each compile.

There is also a NoDraw NonSolid texture in common textures. That may help.

Also adding nonsolid to your shader should help.


(stephanbay) #8

In fact, adding nonsolid to the shader fixed the problem easily. Make a brush fully Nodraw and add your shader and it will works sweetly. Thank you guys for help


(carnage) #9

In fact, adding nonsolid to the shader fixed the problem easily. Make a brush fully Nodraw and add your shader and it will works sweetly. Thank you guys for help

this is actuly not the reason problems are no longer occouring, ill just finish this off with a short sumary for any future searches for the problems like this

the reason that no brushes are now solid is that all sides of the brush have the surfaceparm nonsolid on them since every shader on the brush contains this surfaceparm. thefore when the map is compiled the compiler will allways hit a side of the brush that has the surfaceparm nonsolid so the brush is always made as a non solid object

problems were occouring prior to adding the surfaceparm nonsolid to the shader on one of the sides on the brush because in some occasions the compiler reached this as the first surface on the brush and asumed the brush to be solid since the first shader on the brush told it that the brush was solid and so assumed all the other sides of the brush to also be solid

becasue of this sometimes the brushes were solid and sometimes not since the compiler could reach a non solid face on a brush and a solid face on a differnt brush meaning that the brushes were allmost randomly chosen to be solid non solid (however since the .map is saved using an algorithm and also compiled to a .bsp using an alggorithm the same .map will likely compile the same brushes as solid nonsolid but AFAIK would be to hard to actuly predict what brushes would be solid/nonsolid and defaintly not worth the work compared to just taking more care when writing shaders)


(stephanbay) #10

V57