Light tutorial
Moderator: Moderators
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Light tutorial
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
That link is also the new location of The Rjukan project
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
good one
I'm missing info about ambient vs ambientlight (or did I miss that?)
and surface lights DO light the scenery afaik, the value inin 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:and this does perfectly light the room 
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)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
}
}-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
muhaha, u asked me for itBjarne 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.
ok. can't say much about ambient vs ambientlight, not sure about this myself
I have done some changes about the surface lights and now I dont know how to upload this picture:
and 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
}
}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:
Images are uploaded By entering
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
Code: Select all
Img:my_picture.jpgCurrently 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
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:

