Q4 - Parallel Lights and Visportals

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Q4 - Parallel Lights and Visportals

Post by Johnny Law »

Toldjoo I was full of questions... this one is a little more arcane.

It looks like if I use the "parallel" option on a light, it only lights up the vis node where the light entity is located (or maybe at most one node over).

Here's some comparison pics between a light that has "parallel" enabled and one that does not... in each case the light entity is in the same spot, and the light center is in approximately the same spot. (This is supposed to be sunlight BTW.) I have showportals turned on in the shots with the parallel light, but in the first and last shots that doesn't help much since the portal boundaries are larger than the screenshot. Trust me that the shadow line is right along a visportal in each case.

OK, here's a shot with the non-parallel light:

[lvlshot]http://www.neogeographica.com/temp/light_not_parallel_1.jpg[/lvlshot]

and here's with the parallel light (the top, beyond the portal, is now unlit):

[lvlshot]http://www.neogeographica.com/temp/light_parallel_1.jpg[/lvlshot]

Similarly, a couple more comparisons:

[lvlshot]http://www.neogeographica.com/temp/light_not_parallel_2.jpg[/lvlshot] [lvlshot]http://www.neogeographica.com/temp/light_parallel_2.jpg[/lvlshot]

[lvlshot]http://www.neogeographica.com/temp/light_not_parallel_3.jpg[/lvlshot] [lvlshot]http://www.neogeographica.com/temp/light_parallel_3.jpg[/lvlshot]

So... hmmm! I guess this isn't a big deal if this is the way it has to be; I can work without parallel lights. Just wondering if this is in fact the expected behavior for parallel lights and/or if there's anything else to say about it...
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

A bump for another old mystery of mine.

It's turning out to be ickier than I thought to do without parallel lights, in the outdoor areas. (I guess I could try raising the skybox a few thousand units and just lifting the light center that far... :puke:)
Goofos
Posts: 44
Joined: Thu Jan 26, 2006 5:54 pm

Post by Goofos »

You can try to make a parallel light for shadows and a omni light with shadows disabled to brighten the area a bit up/adding some specular or (like i have seen in some doom3 maps) place the center outside of the map.

Another good way is look into Raven's maps how they made outdoor areas :>
Lukin
Posts: 349
Joined: Sat Jan 29, 2000 8:00 am

Post by Lukin »

Johnny Law wrote:A bump for another old mystery of mine.

It's turning out to be ickier than I thought to do without parallel lights, in the outdoor areas. (I guess I could try raising the skybox a few thousand units and just lifting the light center that far... :puke:)
Light centers could be placed outside the map, you don't have to raise the skybox.
[size=75][url=http://www.lukinonline.com]lukinonline.com[/url][/size]
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

Lukin wrote:Light centers could be placed outside the map, you don't have to raise the skybox.
Cool. I'll be giving that a try tonight then...
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

Success... of a sort.

You can indeed pull a light center out of the map and it will still light stuff. However, you get the same sort of shadowcasting errors as if you were using a parallel light.

It _seems_ to cast shadows correctly though if I enlarge my skybox enough to contain the light center. Still experimenting. I guess a 10,000-unit-high skybox won't hurt anything...
rgoer
Posts: 798
Joined: Sun Aug 17, 2003 7:00 am

Post by rgoer »

placing the center of a light source outside the world causes unpredictable results
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

And using a parallel light is equivalent to putting the center outside the world. :)
Post Reply