Dynamic Lighting woes


(Kaziganthe) #1

Basically, when I try to load a map that I have put some dynamic lighting in, I get an odd message about the shader that q3map2 generates.

Shader:

textures/andromeda_lights/u_lamp4_or_flicker
{
qer_editorimage textures/andromeda_lights/u_lamp4_or.tga
q3map_lightimage textures/andromeda_lights/u_lamp4_or.blend.tga
q3map_surfacelight 5000
surfaceparm nomarks
q3map_lightstyle 1
{
map $lightmap
rgbGen wave noise 0.75 0.25 0 10
}
q3map_stylemarker
{
map textures/andromeda_lights/u_lamp4_or.tga
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
{
map textures/andromeda_lights/u_lamp4_or.blend.tga
blendfunc GL_ONE GL_ONE
rgbGen wave noise 0.75 0.25 0 10
}
}

Error Message:

Tableforfunc called with invalid funtion ‘6’ in shader sainttourney3/4E699F353325DB8F6F77123D3A86FF36

Section in Shader with Problem:

sainttourney3/4E699F353325DB8F6F77123D3A86FF36
{ // Q3Map2 defaulted
{
map $lightmap
rgbGen identity
}

// Q3Map2 custom lightstyle stage(s)
{
	map maps/sainttourney3/lm_0002.tga
	blendFunc GL_SRC_ALPHA GL_ONE
	rgbGen wave noise 0.75 0.25 0 10 // style 1
	alphaGen wave noise 0.75 0.25 0 10 // style 1
	tcGen lightmap
}

{
	map textures/andromeda_trim/u_trm64_2.tga
	blendFunc GL_DST_COLOR GL_ZERO
	rgbGen identity
}

}

I was hoping that someone might be able to enlighten me on what’s going on here…

:banghead:


(ratty redemption) #2

I didn`t know that rgbGen wave could then use noise, are you sure that is a valid waveform?

it`s not in the gtk 1.2.13 manual, but if it is valid, are there any other waveforms not listed in the manual that we can use?

the vaild ones I know of are…

Sin
Triangle
Square
Sawtooth
Inversesawtooth


(Kaziganthe) #3

textures/gothic_light/flicker_light15k
{
qer_editorimage textures/gothic_light/gothic_light3.tga
q3map_lightimage textures/gothic_light/gothic_light2_blend.tga
q3map_surfacelight 15000
surfaceparm nomarks
{
map $lightmap
rgbGen wave noise 0.75 0.25 0 10
}
{
map textures/gothic_light/gothic_light3.tga
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
{
map textures/gothic_light/gothic_light2_blend.tga
blendfunc GL_ONE GL_ONE
rgbGen wave noise 0.75 0.25 0 10
}
}

This is where I found and copied the value from. I’m sure that if ID made a shader with it in there, then it is valid. :cool:

EDIT: I also tried dynamic lighting in a test map, that had essentially the same shader, just different textures.


(ratty redemption) #4

understood and thanx :slight_smile:

good luck in getting the dynamic lighting working.


(Kaziganthe) #5

Also, in case you’re wondering, I’m using the latest Q3map2.


(ydnar) #6

alphaGen noise isn’t supported in Quake 3, oddly enough.

It works in ET tho… :slight_smile:

y


(Kaziganthe) #7

Well that’s no good :frowning: … What sort of value would give me about the same effect?


(ratty redemption) #8

you could use…

rgbGen wave triangle 0.75 0.25 0 10

in one shader stage and then in a duplicate stage, change the phase value and frequency…

rgbGen wave triangle 0.75 0.25 0.3 13

that should produce a random type flickering effect, and if you tweak the last two values you might get something similar to what you were after with noise.


(ydnar) #9

rgbGen noise will be sufficient. If you want to further modulate it on a fixed frequency, use an alphaGen with one of the wave funcs.

y


(Kaziganthe) #10

Forgive me for my ignorence, but are you saying that rgbGen wave noise will work in the worldspawn, but alphaGen wave noise will not? If so, then I could just keep the shader as is, and just get rid of the alphaGen value in worldspawn. Correct? :bash:


(ratty redemption) #11

also is it wave noise or just noise after the rgbgen or alphagen keywords?