Light Regions: Controlling The Light On The Avatar

From OpenUru
Jump to: navigation, search

If you've been building Ages, or exploring Fan Ages made by other people, one thing you may have noticed:

Objects do not block the light falling on both the Avatar and Animated Objects.

Many times I've linked into a Fan Age and walked around outside with my Avatar lit up by that Age's sun, only to walk inside a building or cave and see my Avatar still brightly lit by the sun, while everything else around me is darker.

The way to fix this is by putting in Soft Volumes that we call Light Regions.

Using Light Regions, we can do all sorts of neat things:

We can control how much light, or completely block that light from outside falling on the Avatar.
We can make the transition of light going from outside to inside, or the other way around, so that it looks gradual.
We can keep lights that are inside somewhere from lighting up the Avatar while they are outside.



Getting Started......

I'm going to use my outside Test Age for an example of how to set up a light region.

I threw in a dome that the player will enter. I also put in a red light inside it that is a Plasma Run Time light (keep in mind that only Plasma Run Time lights are controlled by Soft Volumes. Max lights are not.). This light will light up my Avatar:

Litreg1.jpg

But, I don't want the outside sun light to keep lighting up the avatar once he's inside this dome. So I'm going to need a region.

So I create a sphere to use as the light region on the dome:

Litreg2.jpg

Once it is made and in position, I then call up the Component Manager and click on New > Region > Soft Region:

Litreg4.jpg

And assign that to the region I made.

Go to the Utils Tab and select the Soft Region component. In the roll out for it, look at the picture below:

Litreg11.jpg

Notice that I put a check mark where it says "Partial Power", and I've set the power for Inside to 0.0, and the power for Outside to 100.00. This tells the soft volume that whatever kind of region I'm making this (Light or Sound), that I want something to be turned OFF when the player is inside the region, and turned all the way back ON when he is outside the region.

Next, click on the Component Manager and click New > Region > Light Region and assign it to your region:

Litreg5.jpg

Go to your Utils Tab and select the Light Region component and look at it's roll out. You need to click on the button in the Regions box. Then pick your Soft Region that you assigned to this region:

Litreg6.jpg

As I said above, I put in a red light that is a Plasma Run Time light inside the dome, and adjusted it's values to what I wanted:

Litreg7.jpg

While I have that light selected, I open up my Component Manager and assign my Light Region component to this light:

Litreg8.jpg

This is telling Plasma that this light is controlled by the Light Region.

I then select my Plasma Run Time light in the sky that I use to light up my Avatar:

Litreg9.jpg

And again, I assign it the Light Region component:

Litreg10.jpg

You should do this for ALL lights that you want controlled by the light region.

Now, this will make the Avatar be lit up by only the lights you have in the Light Region, and keep the outside sun light off of him.

Check out my video of it:

Light Region Video



Return To: 3DS Max Plugin Tutorials

Copyright (C) 2011 Andy Legate.
heckert_gnu_62x60.png
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".