AgeSoftVolumes
From Alcugs
Note: Anything extracted from any Plasma Resource Files is property of Cyan Worlds, Inc. You may not use these assets without recieving written permission from Cyan Worlds, Inc.
Please read this Notice from Cyan about Age Creation before continuing.
|
Contents |
Soft Volumes
This tutorial explains what soft volumes are and how to use them with lighting. Eventually, other sections will be added for using them with geometry (for visibility) and for sounds (for audibility).
Explanation
This is not your ordinary "volume" - so throw that mental picture out and replace it with this ASCII one:
* |
|--->
| o
light soft volume object
plane with normal
The soft volume plane has a normal, which indicates the "inside" of the soft volume. When something (e.g. light, sound, geometry) uses a soft volume, that means that it is only effective within the soft volume.
In the diagram above, the light can use this soft volume so that it will only light objects on the "inside" (i.e. in the direction of the normal, starting from the plane).
A soft volume can also be expressed as a traditional box volume, with six planes on each side of the box. Each plane points to the inside of the box.
You can define a soft volume with any number of planes. Also, you can combine soft volumes in various ways - see the Complex section below.
Creating A Soft Volume
With your age loaded into Blender, use the left mouse to click where you want to place your soft volume.
To add the soft volume, choose Scripts->Add->"PyPRP Soft Volumes".
This will bring up a submenu with two choices:
After you make your choice, the soft volume will appear in layer 6. The soft volume object is not currently selected; you'll need to manually select it yourself.
Feel free to move, rotate and scale the planes in order to surround the area that you want to be affected by the lighting. NOTE: After scaling or rotating, you must apply the rotations/scaling to the vertices using Ctrl-A; otherwise, the exporter will not recognize the rotation/scale and will not export the soft volume planes correctly.
The name of the soft volume is auto-generated. Rename it to something more meaningful; the name will be used in the next step.
Using A Soft Volume For Lighting (Simple)
Select the light that will use the soft volume and display its properties. Click on "Add Property", then add the following property:
string softvolume=softvolname
where softvolname is the name of your soft volume object. This will make the light active only within this soft volume.
As an example, load the PRP Functionality Check age into Blender. Select the light named SunDirLight and look at its properties:
This makes use of the soft volume that lies just inside the opening of the gate, as shown in the image below.
You can see that the soft volume's normal points outwards, meaning that the SunDirLight will illuminate only items that lie outside the opening.
Note that the scale of a single plane is not important. Soft volume planes extend infinitely; so, I didn't feel the need to scale the plane to occupy the entire opening.
Using A Soft Volume For Lighting (Complex)
The soft volumes can be combined in different ways to produce complex soft volumes. There are three types of complex soft volumes, each associated with a different set operation. You can use these expressions in the softvolume property of the light.
Union
The union of soft volumes means that any object appearing inside any of these volumes will be affected. The union has an initial captial U, with a list of one or more soft volume names, separated by commas, enclosed in parentheses:
U(softvolume1,softvolume2,...)
Inverse
The inverse of a soft volume means that any object appearing outside of these volumes will be affected. The inverse has an initial exclamation point followed by a list of one or more soft volume names, separated by commas, enclosed in parentheses:
!(softvolume1,softvolume2,...)
Intersection
The intersection of soft volumes means that an object must appear inside all of the soft volumes to be affected, i.e. it lies in the overlapping space of all soft volumes. The intersection has an initial captial I, with a list of one or more soft volume names, separated by commas, enclosed in parentheses:
I(softvolume1,softvolume2,...)
Example
As an example, load the PRP Functionality Check age into Blender. Select the light named OmniLight01 and look at its properties:
I(SoftVolUpperCave,!(SoftVolPit))
This combines two complex soft volumes in order to define where the blue light from the water will shine. The light will affect the intersection of the SoftVolUpperCave plane with the inverse of the SoftVolPit box. These two volumes are selected in the image below:
The SoftVolUpperCave plane is located at the opening of the upper cave, just past the top of the ladder. The SoftVolPit box is surrounding the red pit (which has a red light).
Using A Soft Volume For Visibility
This feature is not implemented yet...
Using A Soft Volume For Audibility
Sounds are not yet implemented...
|






