EEP (Environmental Enhancement Project) – Introduction

EEP Upgrade (Opensim 0.92) – Fire And Ice Grid. The Environmental Enhancement Project is the latest update to Opensimulator and Firestorm. EEP offers much more control over the sky, water and day cycle controls. See the list below for some of the great new features. This is a replacement for the traditional windlight settings opensim and Second Life users have been familiar with for years.

  • Apply Settings to a parcel as well as a whole region
  • Have different settings at different heights
  • Custom clouds textures
  • Sun texture, size and direction
  • Scale the moon, use custom textures and set its direction.
  • Create inworld assets (inventory items) to share or sell environmental settings you create.

EEP Upgrade (Opensim 0.92) – Fire And Ice Grid – Now Available!

With delight, we announce all regions on the Fire And Ice Grid now use Opensim 0.92 with EEP (except some testing sims). This means our customers can use EEP as strait after the next Firestorm release. Anyone who has a copy of the Beta Firestorm Viewer or a self-compiled version can try it immediately.

Using the new settings

Most Opensimulator users will be familiar with the location of the daylight settings. Many already create and use their own personalised wind-light settings. EEP controls are found in the same place, but they are also found under the parcel and estate tools.

EEP Upgrade (Opensim 0.92) - New Environmental Settings

All the old favourite Firestorm wind-light settings are still available to apply to your viewer in the quick preferences. However, they are no longer in environmental settings. These settings can be imported to create inworld assets (inventory items). Fire And Ice Opensim grid customers can get a free copy of all these assets on request.

Environmental Asset list example

These assets can be applied directly to the parcel or to the region (assuming you have rights to apply environmental settings). Simply right click and choose the appropriate option.

Apply setting from inventory

If you wish to apply these settings to just yourself this method is great. However, to apply them to a parcel or whole region, it is better done through “Parcel Details” (also known as “about land”) or “Region Details” (also known as the estate tools).

Region And Parcel details menu location
Navigate to the world menu, then either Region or Parcel details.
EEP Upgrade (Opensim 0.92) - Region and Parcel details windows
Region and Parcel details windows.

In either window, click on the “customise” button. Inside this window, customise the current day cycle applied to the parcel/region. In the region details, set the height for each sky setting. This setting is the same for all parcels region-wide. The viewer offers a min-height of 100m for the first sky setting. Using a script and a new OSSL function this can be set lower. Using a script to do this is covered later.

EEP Upgrade (Opensim 0.92) – Creating / Editing a day cycle

Start by creating a new day cycle item, either in your inventory directly or through your environments found under the world menu.

Day Cycle Editor

Several different ways of working are possible now.

  • Load a full day cycle to the current level
  • Import a day cycle setting from the old XML viewer files
  • Create a new day cycle from scratch.

Importing From XML

All the legacy XML files only contain ground-level settings. To apply these to higher levels first import them as a ground setting. Then use “clone track from” to duplicate it higher.

Importing from XML Viewer oddity.

After importing the save button will become inactive (greyed out). It is necessary to click on the small drop-down on the right-hand side of the save button. Select the save as option and then click the main button which now reads save as.

Use Load Track From

This setting lets you load the track from another day cycle asset (inventory item). If the day cycle you use does not have a level created for the one you’re importing it into, nothing will happen. Use the same method as above to work around the issue. First, load the track to the level it is in the day cycle asset then use clone track to copy it.

Create A Day Cycle From Scratch

  1. Click on a point from 0% to 100% on the time slider.
  2. Click Add Sky
  3. Repeat for as many positions as you like, then again for each sky level.

Once you have all the positions set, its time to add in some sky settings. Click on one of the places you selected, then on “load sky”. Then, dialogue showing all the sky assets available in your inventory will come up. Finally, select one of them and click ok.

EEP Upgrade (Opensim 0.92) – Creating / Editing a sky setting

Use the same method as above for creating a day cycle to create a new sky asset.

creating a sky asset - atmosphere and lighting tab
atmosphere and lighting

Each of the tabs (“atmosphere and lighting”, “clouds” and “sun and moon”) has settings to customers the in-world experience.

Like all the new environment settings, it is possible to import them from pre-existing XML files. When doing so be aware that only the options supported under legacy windlight are set. Further customisation will be possible. Many of these settings will be familiar, but many are new or amended. Some of the key new abilities are listed below.

Atmosphere Tab

Many items have new names to be more intuitive, however, some are new while others have been removed.

Clouds Tab

The ability to upload a custom clouds texture is new. Previously this was only possible by adding the texture to the viewer and using an XML file directly.

Sun And Moon Tab

Both the sun and moon tabs are new. They include options to upload custom sun and moon textures. Additionally, set the direction of the sun and moon. The brightness and scale of both can be adjusted as well as the glow effect. For example, a house facing north can now get the morning sun streaming in through the front of the property. Because every parcel can have different environments, all homes can see a sunset to the front, back or side. It is all down to your preference.

Pushing the boundaries by using scripting as well as the viewer.

Further up, I mentioned being able to use scripts to set the height of a sky lower than the 100-meter min in the viewer. One situation in which this can be very useful is making caves. It is now possible to make the inside of a cave dark, while outside the entrance it is brighter and so is the top of the cave. This is achieved with a few simple steps.

  1. Set the lowest sky level to the height of the cave roof using a script (found below).
  2. Cut a parcel covering the same area as the cave.
  3. At ground level create a single sky setting and adjust it to your preference for darkness.
  4. On the first sky level set sky settings with multiple points, just like regular day cycle settings.

When someone walks inside the cave their viewer will darken, as they walk out it will return to the other parcels settings. On top of the cave will be the same as the rest of the region.

USER EDITABLE VARIABLES

/*
BSD 3-Clause License
Copyright (c) 2019, Sara Payne (Manwa Pastorelli in virtual worlds)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/


//START USER EDITABLE VARIABLES
integer transition = 0; //time it takes for the viewer to transition between one enviroment and another
string daycycle = "Default"; //name or uuid of the day cycle you wish to apply
float dayLength = 0; //how many hours are in each day, using 0 means this value is not changed, otherwise 4-168
float dayOffset = -8; //offset from real time clock UTC//-8 is the viewer default. Range from -11.5 to 11.5
float altitude1 = 30; //height at which the first sky level starts
float altitude2 = 1000;//height at which the second sky level starts
float altitude3 = 4000;// height at which the third sky level starts.
//END USER EDITABLE VARIABLES


integer altitudesOk;
integer transitionOk;
integer dayLengthOk;
integer dayOffsetOk;
integer valuesOk;

default
{
    state_entry()
    {
        altitudesOk = ((altitude3 <= 4000) && (altitude2 < altitude3) && (altitude1 < altitude2) && (altitude1 > llWater( ZERO_VECTOR )) );
        dayLengthOk = (dayLength == 0) || ( dayLength >=4 && dayLength <= 168 );
        dayOffsetOk = (dayOffset >= -11.5 && dayOffset <= 11.5);
        transitionOk = transition >= 0;
        valuesOk = altitudesOk && dayLengthOk && dayOffsetOk && transitionOk;
    }
    
    touch_start(integer dont_care)
    {
        if (valuesOk)
        {   //come here if the altitude values are ok
            integer RegionEnviromentSet = osReplaceRegionEnvironment
            (
                transition, 
                daycycle, 
                dayLength, 
                dayOffset, 
                altitude1, 
                altitude2, 
                altitude3
            );

            if (RegionEnviromentSet) llOwnerSay("Regon Enviroment Set Successfully");
            else llOwnerSay("Region Enviroment Set failed, please check the values");
        }
        
        else if (!altitudesOk)
        {
            llOwnerSay("Error:\n 
                    Altitude1 must be higher than the water level\n
                    Altitude2 must be higher than Altitude1\n
                    Altitude3 must be higher than Altitude2\n
                    And Altitude 3 must be no higher than 4000");    
        }

        else if (!transitionOk)
        {
            llOwnerSay("Error transition must be 0 or higher");
        }

        else if (!dayLengthOk)
        {
            llOwnerSay("Error the length of the day must be either 0 to keep the setting the same or between 4 and 168");
        }
        
        else if (!dayOffsetOk)
        {
            llOwnerSay(("Error the day offset value must be between -11.5 and 11.5"));
        }
    }
}

EEP Upgrade (Opensim 0.92) – Other Notes

The last Opensim version upgrade at the Fire And Ice Grid was covered in this blog post from February. There are still 0.911 (as well as all other versions since 0.821) regions available among our testing sims. Put “testing” into the map search for a list of areas.

Video Tutorial

Written by admindiamond

The proprietor of the Fire And Ice Grid Coder in LSL/OSSK and C#, Mesh Creator, general geek. I have been a user of virtual worlds since 2004, I am also a student of computer science.

This article has 1 comments

Leave a Comment

Your email address will not be published. Required fields are marked *