Light tutorial

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Light tutorial

Post by Bjarne BZR »

I made a tutorial on lights: http://www.gronnevik.se/rjukan/index.ph ... LightTypes

That link is also the new location of The Rjukan project
Admin .MAP Forums
Image
Head above heels.
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

nice bjarne, but considering the MOUNTING demand for 'blinkie lights' ya might want ot put how to do that too :wink:
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

good one 8-)
I'm missing info about ambient vs ambientlight (or did I miss that?)

and surface lights DO light the scenery afaik, the value in

Code: Select all

	q3map_surfacelight (value)
in their shader just has to be high enough to make it visible (also depending on the surface's size)!
e.g. I made a monitor screen with a simple screenwshot as jpg and this shader:

Code: Select all

textures/desktop/monitor
{
	qer_editorimage textures/desktop/monitor.tga
	surfaceparm nomarks
	surfaceparm glass
 	surfaceparm nolightmap
	q3map_lightimage textures/desktop/monitor.tga
	q3map_surfacelight 200
	cull none
	{
	map textures/desktop/monitor.tga
	depthWrite depthWrite
	alphaFunc GE128
	}
}
and this does perfectly light the room 8-)
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Now this is the reason I'm having all my tutorials on a wiki: you guys have improvments: just add them to the tutorial! Just press "Edit page" at the bottom (no login required just write a name you want to be known as in the Author box when editing) and add your exelent additions.
Admin .MAP Forums
Image
Head above heels.
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

Bjarne BZR wrote:Now this is the reason I'm having all my tutorials on a wiki: you guys have improvments: just add them to the tutorial! Just press "Edit page" at the bottom (no login required just write a name you want to be known as in the Author box when editing) and add your exelent additions.
muhaha, u asked me for it :twisted: wouldn't be the 1st time i crash ur wiki :wink:
ok. can't say much about ambient vs ambientlight, not sure about this myself :oops: .
I have done some changes about the surface lights and now I dont know how to upload this picture: Imageand how to place (nicely) the shader for it:

Code: Select all

textures/leucht/leucht
{
	qer_editorimage textures/leucht/leucht_blend.tga
	surfaceparm nomarks
	q3map_surfacelight 30000
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/leucht/leucht.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
	{
		map textures/leucht/leucht_blend.tga
		blendfunc GL_ONE GL_ONE
	}
}
Tell me how or even better do it for me :wink: thnx
Btw, in that pic, there's just that surface light (plus some ambient light) and a corona placed inside the "lamp". The shader is more complicate than neccessary, covering the possibility to have different images for use as the texture and the light emitting thing... Here, for example, the lamp looks rather white (the image leucht.tga) and gives yellowish light (image leucht_blend.tga) .The shader in my last post is easier and would be good enough for this example.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Images are uploaded By entering

Code: Select all

Img:my_picture.jpg
This creates an upload link in the page.

Currently the uploading function is password protected, so I'll have to do the actual uploading for you, but the link you can setup yourself..

And to place code: just start any line you want like raw text with a space. Havent gotten around to creating dedicated code tags yet... I plan to add a section with formatting buttons to the edit page so you guys can cocentrate on content instead of wiki coding :)
Admin .MAP Forums
Image
Head above heels.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

That image is now upoaded Wacko.
Admin .MAP Forums
Image
Head above heels.
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

Very nice, thanks :wink:
"all the governments in the world are corrupt and in the hands of the Illuminati"
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

Bjarne BZR wrote:That image is now upoaded Wacko.
hey thanks, m8 :D I just decided to start my 1st tries in doing it myself when I read ur post :wink: The shader is online too, now
And, I lost some words about the scripted lights 8-)
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Looking good M8
Admin .MAP Forums
Image
Head above heels.
Post Reply