Hi to everyone, I’ve got some questions about lightstyles.
I can’t understand how to make them work, can someone explaine me step by step? I also downloaded a .pk3 file from www.shaderlab.com, it contains a .map and a .bsp, the bsp have flashing lights, but if I compile the map i obtain only static lights…
Why?
How does it works?
How does alphagen etc works?
Do I need some special comand line? or some special file? or what?
Plz… I need a step by step help about it. Help me.
P.s. how does decals works on q3map2?
tnx to everyone who will help me.
Lightstyles and decals. I need help!
What version of q3map2 do you have? Depending upon what game you are mapping for, lightstyles weren’t fully introduced until version 2.5.5-test-11.
textures/yourmap/decal
{
surfaceparm trans
nomipmaps
polygonOffset
{
map textures/yourmap/decal
blendFunc blend //or the blendfunc of your choice
}
}
some of theses have custom info parms for a q3 mod .
Flag on wall
textures/5th_banners/5th_dbsnake_wall
{
surfaceparm nonsolid
polygonOffset
sort 6
{
map textures/5th_banners/5th_dbsnake_wall.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen vertex
alphaGen vertex
}
}
Picture on wall.
textures/clansigs/tc_sig1man
{
surfaceparm nonsolid
polygonOffset
sort 6
{
map textures/clansigs/tc_sig1man.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen vertex
alphaGen vertex
}
}
Light emmiting decale:
textures/5th_indoor/cabinet_light_decal
{
q3map_lightimage textures/UTCMP_colors/yellow_light.tga
qer_editorimage textures/5th_indoor/cabinet_light.tga
q3map_surfacelight 3000
polygonOffset
sort 6
surfaceparm glass
{
map $lightmap
}
{
map textures/5th_indoor/cabinet_light.tga
blendfunc gl_dst_color gl_zero
rgbgen identity
}
{
map textures/5th_indoor/cabinet_light_glow.tga
blendFunc GL_ONE GL_ONE
}
}
icicle decal draws over object’s: it hangs off the wall it is drawn over:
textures/snow_bridge/decal_icicle
{
qer_editorimage textures/snow_bridge/icicle.tga
surfaceparm nolightmap
surfaceparm trans
surfaceparm nonsolid
// surfaceparm ice
cull disable
polygonOffset
sort 8
nopicmip
{
map textures/snow_bridge/icicle.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen vertex
}
}
When I pull down the consol, I see
“Enable spawning
_decal does not have a spawn function
_decal does not have a spawn function
_decal does not have a spawn function
_decal does not have a spawn function
_decal does not have a spawn function
Disable spawning”
Hm, what does it mean?
I do not think it affects the game. It looks alright.
// Loffy
And, my second question is also about decals.
Let’s assume I want to make a decal with nothing more that the numbers “1,618”. I make the image a .tga (in Photoshop), 128 x 128 pixels. Numbers in bright red (or whatever) and a white background.
How can I make only the numbers to be projected onto the surface? I mean, when I try, I get the whole square (the total image) projected. That is, the numbers AND the white background of the image. That is un-cool.
// Loffy
In the shader, use:
blendFunc GL_DST_COLOR GL_ZERO
If you want the numbers to fade out properly in fog, invert the image (so white becomes black, and red becomes cyan, etc), and use:
blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
y
