Alphashadow - what do i wrong ?


(burzum) #1

The shadow is allways that ugly square shadow from the brush not the alphashadow that the leafs should cast - why ? :frowning:

textures/cambodia_nature/baum2krone
{
	surfaceparm trans
	surfaceparm alphashadow		
	cull none
        nopicmip

	{
		map textures/cambodia_nature/baum2krone.tga
		blendFunc GL_ONE GL_ZERO
		alphaFunc GE128
		depthWrite
		rgbGen identity
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}

Thanks !


(ratty redemption) #2

your shader looks fine to me, although I`m not sure you need the depthwrite or depthfunc equal, but I doubt that would be causing your problem here.

make sure you dont have any other conflicting shaders in other .pk3s or extracted that use the same shader name, as that could be overriding this shaders parms.


(Davros) #3

looks like you are missing q3map_alphashadow. just pop it under nopicmip


(ydnar) #4

Slow down kids.

depthWrite/depthFunc equal are required if you want a lightmapped masked shader.

q3map_alphaShadow is functionally identical to surfaceparm alphashadow. That’s how all the Raven/SOF2/JK2/JA q3map_ replacements for surfaceparms were implemented in Q3Map2.

Did you add the script’s name to shaderlist.txt? That’s the #1 common mistake when shaders aren’t working like you’d expect.

Also, make sure the shader’s image actually has an alpha channel for Q3Map2 to use.

Cheers,
y


(ratty redemption) #5

sorry, I didn`t know that but thanx for explaining.

@burzum, the problem is likely something simple, so the good news is, it should be easy to fix once you`ve tracked it tack.


(burzum) #6

Ok, it was the damn shaderlist.txt …

But ive got another problem while waiting for answers : My map compileswithout a leak or any errors and is 28mb (!) big. I havent changed any big stuff since it compiled the map with just 6,3mb.

Why ?
The most people will get the problem of a llow set com_hunkmegs var.


(ydnar) #7

Did you crank up lightmap res? Did you add _lightmapscale to any entities? Do you have any autoclipped models?

There are lots of reasons for a large BSP file.

y


(MadJack) #8

model autoclipping can size up the BSP? hmmmm… On what order of things? I guess it depends on how many models and how big they are?


(burzum) #9

Oh, i lowered the _lightmapscale in the wordlspawn from 0.1 to 0.25 and got an 11mb file now. Why blows a lower scale the file THAT much up ? And any suggestion about what the best settings are to compile a map with ?

And i have seven big ase models in my map.
Screens are here, nothing final yet but im on it :slight_smile:
http://doomzone.de/dstrike/

Its for the q3 mod http://www.truecombat.com
Just for the case that anyone is interested in.


(ydnar) #10

Uh, those trees aren’t supposed to be casting block shadows are they? Are you sure the shader script is listed in shaderlist.txt?


(Vic) #11

Missing q3map_lightimage then?


(ydnar) #12

This is a cross-post from Q3W LEM, but is pretty relevant. Just set up your shaders to look like this:


models/mapobjects/multiplant/fern
{
	qer_editorImage models/mapobjects/multiplant/fern.tga
	
	// newer versions of GtkRadiant (> 1.3.8) support masked textures
	qer_alphaFunc gequal 0.5 
	
	surfaceparm alphashadow
	surfaceparm pointlight
	surfaceparm trans
	
	{
		map models/mapobjects/multiplant/fern.tga
		rgbGen vertex
		alphaFunc GE128
		depthWrite
	}
}

Note that’s for vertex-lit shaders, which is a bit faster to render than lightmapped and saves a bit on map size if you have lots of trees/plants.

y