distancecull on textures


(Sternschubser) #1

hi folks

i want a shader for a riverplant, they dissapere in the distance. so i use the foliage shader and rewrite a lill bit so its wave and see from all sides.
looks perfect, but the schilf doesnt dissapere in distance…

i use a nodraw brush and set the texture on one side. perhaps here is the problem?
make the brush to md3 and set in the map is the same, they dont dissapere…

dont want to use a foliage-floortexture, i want to plant directly on spots in the map.

here the shader


textures/thb_gruen/schilfgras01
{
	qer_alphafunc greater 0.5
	qer_editorimage textures/thb_gruen/schilfgras01.tga
	cull disable
	distanceCull 256 4096 0.49
	sort seethrough
	deformVertexes autosprite2
	deformVertexes wave 15 sin 0 1 0 0.25
	surfaceparm pointlight
	surfaceparm trans
	surfaceparm nomarks
	nopicmip
	{
		map textures/thb_gruen/schilfgras01.tga
		alphaFunc GE128
		rgbGen exactVertex
		alphaGen vertex
	}
}

any ideas?


(IndyJones) #2

could u post pics?


(Sternschubser) #3

np, you see a ligghtly waves plant in a testmap… :smiley:

ok, here radiant

but problem is, not what you see, problem is, they dont dissapeare in distance…


(S14Y3R) #4

hey, i think your outer setting may be too high

distanceCull <inner> <outer> <alpha threshold>

your’s will disappear beyond 4096 units, bring it down to 1024 and retest :stuck_out_tongue:


(Sternschubser) #5

nope, test more than this last shader

its not the distance setting

any other ideas?


(Avoc) #6

I am pretty sure that you cannot make entire brushes dissappear using distancecull. Distancecull is for foliage.


(Detoeni) #7

There be a good reason why folks aways use a foliage-floortexture for this effect, its the only way that works.

There is info on why it has to be done that way in the W:ET Level Designers Reference.


(S14Y3R) #8

hmm, i didn’t realize the issue with the grass is like this. I was able to get culling working with the cattails texture, but it won’t work on grass for some reason.

I used Stern’s shader on both textures(changed 4096 to 1024 for testing):
models/foliage/grassfoliage1.tga
and
models/mapobjects/plants_sd/catail1.tga

The cattail culls at distance fine, and it autosprites normally. I looked at them both in photoshop, and both have the same alpha_channel fading(white to show, black to clear).

Any one noticed that before? Have a look at those two textures, does anyone know why cattails will cull but grass won’t?


(Sternschubser) #9

hmm, ok

nice dream of spots killed by engine :confused:

i try a floortile with foliage, hope the plants stand on the pos i want…

S14Y3R, i test the catile, they dont disapere (use showtris), they only to small an so you see nothing at a distance…

thx for trying