WorldBuilding/MissionEditor/Sun

From TDN

The Sun

TGE has an effective and powerful Sun datablock, which with good use will be able to help highlight the strong visuals of your level. It is advised to link in a fxSunLight datablock to further push the realism of your world. The settings are pretty much self explanatory.

It is advised that you don't create large suns, as these will break the typical realistic look of your game.

An example sun:

new Sun() {
      azimuth = "0";
      elevation = "35";
      color = "0.600000 0.600000 0.600000 1.000000";
      ambient = "0.400000 0.400000 0.400000 1.000000";
         locked = "false";
         position = "0 0 0";
         direction = "0.57735 0.57735 -0.57735";
         scale = "1 1 1";
         rotation = "1 0 0 0";
   };


The Lens Flare

Achieved through the fxSunLight, Lens flare will add realism to your sun. However, you must configure this properly in order to maintain a high level of fidelity to a realistic world. Furthermore, do no make the lens flares rotate, as much as it give some animation to your sun, this doesn't actually happen, it's a trompe l'oeil. The key areas you need to worry about are typically the bitmaps, size and colors; a large part of the details relate only to animation or color blending, which are best seen in action.

An example fxSunLight:

new fxSunLight(SunFlare) {
      position = "124.476 408.878 478.445";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      Enable = "1";
      LocalFlareBitmap = "~/data/sun/flare01.jpg";
      RemoteFlareBitmap = "~/data/sun/flare07.jpg";
      SunAzimuth = "0";
      SunElevation = "30";
      LockToRealSun = "1";
      FlareTP = "1";
      Colour = "0.984314 0.964706 0.4 1";
      Brightness = "1";
      FlareSize = "0.2";
      FadeTime = "0.1";
      BlendMode = "0";
      AnimColour = "0";
      AnimBrightness = "0";
      AnimRotation = "0";
      AnimSize = "0";
      AnimAzimuth = "0";
      AnimElevation = "0";
      LerpColour = "1";
      LerpBrightness = "1";
      LerpRotation = "1";
      LerpSize = "1";
      LerpAzimuth = "1";
      LerpElevation = "1";
      LinkFlareSize = "0";
      SingleColourKeys = "1";
      MinColour = "0 0 0 1";
      MaxColour = "1 1 1 1";
      MinBrightness = "0";
      MaxBrightness = "1";
      MinRotation = "0";
      MaxRotation = "9";
      MinSize = "0.7";
      MaxSize = "1";
      MinAzimuth = "0";
      MaxAzimuth = "359";
      MinElevation = "-30";
      MaxElevation = "210";
      RedKeys = "AZA";
      GreenKeys = "AZA";
      BlueKeys = "AZA";
      BrightnessKeys = "AZA";
      RotationKeys = "AZA";
      SizeKeys = "AZA";
      AzimuthKeys = "AZ";
      ElevationKeys = "AZ";
      ColourTime = "5";
      BrightnessTime = "25";
      RotationTime = "5";
      SizeTime = "5";
      AzimuthTime = "5";
      ElevationTime = "5";
   };