PDA

View Full Version : How to have a Directional Light affect only a specific area?



CowmasterStudios
04-09-2010, 05:53 AM
I have a large piece of a level I want to be affected by a single Directional Light... As if it were the sun.

Here's a video of the level as of a couple weeks ago. The Forest area is the part I want affected by the Directional Light (as it is just a bunch of point lights atm), and the Indoor sections are the parts i DONT want affected.

http://www.youtube.com/watch?v=ngRGQhlBGWs

In simple terms... I want a directional light to only affect what I tell it to. I suspect a Light Volume may play some part?

Thanks :D

carlsMart
04-09-2010, 06:16 AM
Hi there!
Are they the same level? If they are different, you can right click on the level manager and select "self contained lightning". This will make that only the lights on that level affect theat level.
Hope that helps
saludos!

nrd2001
04-09-2010, 06:18 AM
Hi yes you can use a light volume have it so that the volume touches the meshes you want lit by your light then in the light properties tick the "use volumes?" setting and there is a field that says inclusion volumes click the plus button next to it then put your light volume in that by locking the properties window, the padlock at the top, then select the volume and click the green arrow to put it into the array.

You can use multiple volumes and you can also use exclusion volumes if there are parts you dont want to be lit by a light. Remember that if any part of the mesh is in the volume then that whole mesh will then be lit.

ThePriest909
04-09-2010, 06:50 AM
Just from the artistic side of view...
I watched your video. Nice loking game but there's something I noticed.
The way you built the building looks realy too realistic in comparison with the exterior area.
Just a suggestion. You should try to balance the looks of those two different levels.
Looks promising, keep it up.

CowmasterStudios
04-09-2010, 02:41 PM
@NRD2001

Thanks, that works well for lighting up meshes. However, the parts of the game that arent meshes are still being lit up. Things like the walls and the floors. Those were built using the builder brushes. Any way to make the LightVolume include them in as well?

@ThePriest909

Thanks for your comment. The art style is part of a bigger picture I'm going for with this mod. Essentially this level is to take place inside the dreams of the character I'm linking below.

http://www.cowmasterstudios.com/Creeper.html

As we all know, dreams can take you to many different places at a seemingly random order.

Thanks for the comments so far... hopefully someone can help me figure out how to include things created by builder brushes in the light volume area of effect

nrd2001
04-09-2010, 02:49 PM
I was under the impression that if the volume touched the brush at all then it would be counted as within the inclusion volume or do you mean only the section of the brush that is within the volume?

ThePriest909
04-09-2010, 02:50 PM
@NRD2001As we all know, dreams can take you to many different places at a seemingly random order.


That's a good idea actually. In that case balance won't be needed that much.

I'm working on a similar concept by the way for a fiction-horror project. Althought level design aims on enviromental realism in our case, it doesn't have to be logical.

CowmasterStudios
04-09-2010, 02:52 PM
Heres an image that hopefully better explains my last post haha.

As you can see, the mesh outside the volume is not receiving any red lights... which is a GOOD thing! :)

However, the floor outside of the mesh is still receiving the red light... which is a BAD thing! :(

I'm wondering how to make it so only the floor INSIDE the light volume is affected by the red light and not the floor OUTSIDE.

http://i191.photobucket.com/albums/z226/NKpics/Derics%20Art%20Stuff/question.jpg

Cheers!

Piranhi
04-09-2010, 03:35 PM
You can also use lighting channels. When you open your lighting properties you have a selection of lighting channels you can modify, both for objects and lights. At the top is the normal ones you see, static, dynamic, bsp etc etc, but at the bottom there is some custom ones you can use, I think there are 6 in all. I use these to split up my lighting if a light volume won't do what I want.

CowmasterStudios
04-09-2010, 06:49 PM
Ok, i took a look at the lighting channels but have yet to figure out how to get them to accomplish what I'm trying to...

Would I just be better off using a couple giant Point Lights? and turn the shadows off on one of them?

Piranhi
04-09-2010, 07:10 PM
Select the light, and un-tick all lighting channels except unnamed 1, then do the same for the items you want lit by that light. Then that light will only emit light on that channel and those objects will only receive light on that channel. It's very easy to add objects to that light as you only have to tick the box. Objects which need lighting by more then 1 light can use more then 1 unnamed channel.

parkar
04-11-2010, 01:08 PM
Heres an image that hopefully better explains my last post haha.

As you can see, the mesh outside the volume is not receiving any red lights... which is a GOOD thing! :)

However, the floor outside of the mesh is still receiving the red light... which is a BAD thing! :(

I'm wondering how to make it so only the floor INSIDE the light volume is affected by the red light and not the floor OUTSIDE.

Cheers!

Either the whole floor will be effected or none of it. Anything that touches the volume will get effected. You will need to split up your BSP based level geometry where you want a border between lit and not lit.

rebb
04-11-2010, 01:25 PM
Is there some secret mojo to using Exclusion Volumes with dominant lights?

They seem to be real finicky on my end, excluding even geometry which isn't touched by the volumes at all.