Light emitting surfaces

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

Moderator: Moderators

Post Reply
ganjanoof
Lance Corporal
Posts: 11
Joined: Wed Dec 22, 2004 12:09 am

Light emitting surfaces

Post by ganjanoof »

Hello everyone,

This is one of my first posts in this very forum :)

I could not find an answer to this question on my fellow french mapping forums.

Here it is : I designed a nice light emitting window texture that works perfectly... except it won't diffuse light in a single direction.

Let's say I make 4 windows in the walls of a square house. 3 of them will cast light but the fourth won't. Actually, it seems to be a shadow issue, 'cause from a far distance, my windows just look nice. Narrowing them will let the player notice there is no light diffuse around them (exterior wall, ground).

Any clue about this ?

Window's shader :

Code: Select all

textures/vineyard/test_light_window
{
	qer_editorimage textures/vineyard/light_frame.tga
	qer_keyword utility
	qer_keyword window
	surfaceparm glass
	q3map_surfacelight 1000
	// light 1
	// test light
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/vineyard/light_frame.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
	{
		map textures/vineyard/light_blend.tga
		blendfunc GL_ONE GL_ONE
	}
}
:arrow: a clean copy of an original shader.
(\_/)
(O.o) This is Bunny. Copy Bunny
(> <) to help him achieve world domination.

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

Well light emitting windows are simply surfaces that q3 puts a bunch of point lights on, you could recreate the same effect in the editor.

But if the shader works once it must be some sort of structural problem, something blocking the light.

if you put these windows in five spots will the fifth work? Or if you rearrange the other four will that same one that doesn't work now not work?

Welcome to .map 8-)
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
ganjanoof
Lance Corporal
Posts: 11
Joined: Wed Dec 22, 2004 12:09 am

Post by ganjanoof »

ty :)

Well, thinking a bit about this... it seems like it does not diffuse light the side where shadows are cast...

My example of four walls was actually referring to the four cardinal points (E,S,W,N).

My (early) conclusion about this is that light emitting surfaces follow the behaviour imposed by sundirection. So the side that is considered to be shadowed by sundirection remains dark. I suppose the walls around the windows do cast shadows around it, so I can't see the light beam reflecting on the outside textures like walls and ground... This sux a bit as I need 2 different light intensities. I cannot use only the ambientlight so atm I'm quite stuck on this.

If someone is willing to test this I can provide a link on a test map.

Hope I'm not just reaching a moh engine limitation...

ty anyway :)

PS : I like bunny :mrgreen: but 2nd part of your sig... well I can't tell :shock:
(\_/)
(O.o) This is Bunny. Copy Bunny
(> <) to help him achieve world domination.

Image
ganjanoof
Lance Corporal
Posts: 11
Joined: Wed Dec 22, 2004 12:09 am

Post by ganjanoof »

I reproduced the desired effect by adding point lights as you suggested.

Thanks a lot.
(\_/)
(O.o) This is Bunny. Copy Bunny
(> <) to help him achieve world domination.

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Another cool effect is the dust beam from lights or windows like dust caught in a ray of sunlight . I seen a tut for it but not sure where right now either here or at tmt .
Image
ganjanoof
Lance Corporal
Posts: 11
Joined: Wed Dec 22, 2004 12:09 am

Post by ganjanoof »

Thx.

To remove shadows, someone suggested me to use -notrace / nosurfshadows... what I did. Actually it works, but it seems that my sunlight does not work anymore (my map seems only lighted by ambientlight).

Is it correct or is there something I don't understand ?
(\_/)
(O.o) This is Bunny. Copy Bunny
(> <) to help him achieve world domination.

Image
Post Reply