Page 1 of 2

Lighting objects

Posted: Thu Mar 25, 2004 4:01 pm
by agentmad007
lights work but it seems a bit strange

look the pics

thats the normal way

http://www.membres.lycos.fr/darksniper0 ... normal.jpg

and when lights are on (fx/dummy.tik)

http://www.membres.lycos.fr/darksniper0 ... roblem.jpg

it light on my wall!!!!

the script model in a bit before the gate

so i want to light the chevron( the 7 pieces around the gate )

do i got to set them script objects an give my scripts models a target that will refer to my chevrons ???

or how do i do to light them and not the wall plz ?

thx

Posted: Thu Mar 25, 2004 4:49 pm
by Bjarne BZR
Do you have an eglish speaking friend that can rewrite that post for you? I'm sorry, but I just don't understand what you are saying :oops: :cry: :shock:

Posted: Thu Mar 25, 2004 5:37 pm
by agentmad007
LOL Bjarne i made this post a bit fast sorry even me when i read it again i dont understand really what i said there !!!

ok i ll try to make it more clean!

its was for my stargate i wanted that 7 lights show one by one just before the gate open when i trigger !

i read a post where tltrude said to made a script model with those key value:

key=targetname
value=light1

key=model
value=fx/dummy.tik

key=overbright_range
value=2.0

(==> so i made 7 script models)

and add those line to light on or light off

$light1 light 1 1 1 300 // white light
$light1 light 0 0 0 64 // light off

ok so those line work and i add this on my script

Code: Select all



level waittill prespawn 

   exec global/DMprecache.scr 
   level.script = "maps/dm/projet_stargate.scr" 

   $gate1 hide 
   $gate1_tele nottriggerable 
$light1 light 0 0 0 64
$light2 light 0 0 0 64
$light3 light 0 0 0 64
$light4 light 0 0 0 64
$light5 light 0 0 0 64
$light6 light 0 0 0 64
$light7 light 0 0 0 64

level waittill spawn 

end 
//////////////////////////////////////////// 
///////////STARGATE//////////// 
//////////////////////////////////////////// 


stargate_on: 
$gate1 playsound door
$light1 light 1 0 0 500
wait 1
$light2 light 1 0 0 500
wait 1
$light3 light 1 0 0 500
wait 1
$light4 light 1 0 0 500
wait 1
$light5 light 1 0 0 500
wait 1
$light6 light 1 0 0 500
wait 1
$light7 light 0 1 0 500
wait 1
$gate1 playsound alarm
$gate1 show // the stargate effect shows up 
$gate1_tele triggerable // the teleporter is active 
wait 14
$gate1 hide // the sg effect is hidden 
$gate1_tele nottriggerable // the teleporter is turned off 

$light1 light 0 0 0 64
$light2 light 0 0 0 64
$light3 light 0 0 0 64
$light4 light 0 0 0 64
$light5 light 0 0 0 64
$light6 light 0 0 0 64
$light7 light 0 0 0 64

end


so the link below show my gate without nothing
there is no light and no open gate coze i dont triggered yet

and i show what i call a chevron sorry in france we call it a chevron!

i got 7 chevron so i want 7 lights to light them

http://www.membres.lycos.fr/darksniper0 ... normal.jpg



here is the pic of moh radiant and how i placed the script model(fx/dummy.tik)

http://www.membres.lycos.fr/darksniper0 ... /model.jpg


and the results in game

http://www.membres.lycos.fr/darksniper0 ... roblem.jpg


ok so you see that the script model (my light so ) light the wall what i want is that the script models light my chevrons

wish you understand now!

Posted: Thu Mar 25, 2004 8:01 pm
by Bjarne BZR
Well still not sure what is the prob, but I'm guessing a bit...

1) Dynamic lights will not be visible in any other waw than affecting the light level on the surrounding textures... If you want the lights to become visible, you need to add a corona model.
2) There could be something strange with your "chevron" models as they have a very strange texture in radiant... but that may just be an editor picture for some special texture you are using.

Any help?

Posted: Thu Mar 25, 2004 8:24 pm
by agentmad007
help? sure i need hehe

corona what is it ?
how do i got to use it ?

and with this corona my "chevron" will be lighted instead of light on the surrounding textures?

my targate is to my make the "chevron" lighted

and the strange textures you see in radiant is a custom!

it look like blueglass


Ty

Posted: Thu Mar 25, 2004 8:58 pm
by wacko
a corona would be just the bright visible shining around e.g. a light bulb. get my ring map at the bin, I used just coronas there

if u feel your lights to shine too much, try to change the lines
$light1 light 1 1 1 300 // light on
to
$light1 light 1 1 1 30 // light on
and
$light1 light 0 0 0 64 // light off
to
$light1 light 0 0 0 0 // light off

Posted: Thu Mar 25, 2004 9:40 pm
by Bjarne BZR
Or you can do it the right way:

Code: Select all

$light1 lightOff

Posted: Thu Mar 25, 2004 9:43 pm
by agentmad007
i did it wacko read my script!!!!!!!!!

all the light got those line

$light1 light 1 0 0 500


and the problem is NOT that it dont work

but the light go on my wall see the pic problem.jpg PLZ


ok my question is just how to light on and light off a a brush
maybe you ll understand better


sorry again for my english and thx for help i know its not so easy to help me!

Posted: Thu Mar 25, 2004 10:02 pm
by Bjarne BZR
Well agent: this line:

Code: Select all

$light1 light 1 0 0 500
means that you create a light with a radius of 500 units. That will light the wall. decrease it to something that is small enough not to reach the wall. If the wall is 200 units away from the light: set something like this:

Code: Select all

$light1 light 1 0 0 150

Posted: Thu Mar 25, 2004 10:22 pm
by agentmad007
ok i see i ll try thx bjarne and wacko

Posted: Thu Mar 25, 2004 10:54 pm
by wacko
Another problem with scripted lights is that their radius and/or even their existence is not known to the compile process, so they won't be blocked by any brush.
I.e., they shine through walls. Keep this in mind when placing them or choosing their radius.

light

Posted: Thu Mar 25, 2004 10:57 pm
by tltrude
I think what you are looking for is "light emitting surface". I thought you wanted the dynamic lights for the ring transporter. But, for the stargate, you can change the chevrons with hide and show to light emitting texture. Here is a shader that makes a yellow texture emit light.

Code: Select all

textures/custom/yellowlite_4k
{
	qer_editorimage textures/custom/yellowlite.tga
	qer_keyword window
	qer_keyword glass
		surfaceparm glass
		surfacelight 4000
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/common/reflection1.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
		tcGen environment
	}
	{
		map textures/custom/yellowlite.tga
		blendfunc GL_ONE GL_ONE
	}
}
surfaceparm glass
and
surfacelight 4000

can be changed to metal and as high as 10000--highest I have seen.

So, you would need to make two textures for the chevrons. One that is dark and one that is lighted. The lighted one would use a shader like the one above and the image name would replace "yellowlite.tga". You can also make it an animated texture, if you want to get real fancy.

This is the TV screen in my door2 tutorial map.

Code: Select all

textures/custom/my_movie
{
	qer_editorimage textures/mohmenu/briefing/briefing3a.tga
	qer_keyword special
	nomipmaps 
	nopicmip 
	cull none 
	surfaceparm glass
	surfacelight 2000 
	{ 
		animMap .15 textures/mohmenu/briefing/briefing3a.tga textures/mohmenu/briefing/bootcamp.tga textures/mohmenu/briefing/airborne.tga textures/mohmenu/briefing/bombers.tga textures/mohmenu/briefing/portphoto.tga textures/mohmenu/briefing/invasionfleet.tga textures/mohmenu/briefing/shoreguns.tga textures/mohmenu/briefing/convoy.tga textures/mohmenu/briefing/battleship.tga textures/mohmenu/briefing/higginsboat.tga textures/mohmenu/briefing/depot.tga textures/mohmenu/briefing/omahalanding.tga textures/mohmenu/briefing/defeat.tga textures/mohmenu/briefing/mannon.tga
		rgbgen global 
		blendFunc GL_DST_COLOR GL_ZERO 
	}
	{
		animmap .15 textures/mohmenu/briefing/briefing3a.tga textures/mohmenu/briefing/bootcamp.tga textures/mohmenu/briefing/airborne.tga textures/mohmenu/briefing/bombers.tga textures/mohmenu/briefing/portphoto.tga textures/mohmenu/briefing/invasionfleet.tga textures/mohmenu/briefing/shoreguns.tga textures/mohmenu/briefing/convoy.tga textures/mohmenu/briefing/battleship.tga textures/mohmenu/briefing/higginsboat.tga textures/mohmenu/briefing/depot.tga textures/mohmenu/briefing/omahalanding.tga textures/mohmenu/briefing/defeat.tga textures/mohmenu/briefing/mannon.tga
		rgbgen identity
		blendfunc GL_ONE GL_ONE
	}
}

Posted: Fri Mar 26, 2004 11:05 am
by agentmad007
thx tltrude

the texture to use with the shader yellow_lite got to be yellow ? do i got to make a texture in a precise model ?

is it possible to make red or blue "light emiting surface "( i prefer ) ?

and other thing

textures/custom/yellowlite_4k <=====why did you add _4k is it important ? (just to understand )


ty

yellowlite_4k

Posted: Fri Mar 26, 2004 11:26 am
by tltrude
"yellowlite_4k" is just a name I gave this texture. The "4k" is to remind me that this texture uses "surfacelight 4000". The color of the light will be a blending of the colors in the image. So if you make one that has a lot of blue, the light will be blue.

Black and gray do not emit much light,, so if your cheveron has a bright gold arrow on a gray background, the light will be golden, but not as bright as if the image were all gold.

Posted: Fri Mar 26, 2004 12:26 pm
by bdbodger
Won't a light emitting texture's light be part of the light stage of compile . Which means any surfaces lit by the surface will show as being lit even if you hide the texture ? If your light emitting texture is blue even if the texture is hidden you may see a blue tint on surfaces close by ?