Game Development Community

ScatterSky + WaterPlane + HDR setting

by Alfio Saitta · in Torque 3D Beginner · 07/29/2010 (5:01 pm) · 9 replies

He tried in vain for some time to correctly set these ScatterSky and WaterPlane with the HDR effect. Until ScatterSky ruler and HDR, say that goes pretty well. But if I add a WaterPlane, seeing that it is completely black.

Can someone explain how to solve this problem?

Part of my mission file:
new LevelInfo(theLevelInfo) {
      nearClip = "0.1";
      visibleDistance = "1000";
      decalBias = "0.0015";
      fogColor = "0.6 0.6 0.7 1";
      fogDensity = "0";
      fogDensityOffset = "700";
      fogAtmosphereHeight = "0";
      canvasClearColor = "0 0 0 255";
      advancedLightmapSupport = "0";
      soundAmbience = "AudioAmbienceDefault";
      soundDistanceModel = "Linear";
      canSave = "1";
      canSaveDynamicFields = "1";
      Enabled = "1";
      desc0 = "An empty room ready to be populated with objects.";
      LevelName = "Empty Island";
   };
   new ScatterSky(mySky) {
      skyBrightness = "75";
      mieScattering = "0.002";
      rayleighScattering = "0.003";
      sunScale = "0.862745 0.870588 0.8 1";
      ambientScale = "0.172549 0.172549 0.172549 1";
      exposure = "1";
      azimuth = "0";
      elevation = "45";
      moonAzimuth = "0";
      moonElevation = "45";
      castShadows = "1";
      brightness = "1";
      flareType = "ScatterskyFlareExample";
      flareScale = "1";
      nightColor = "0.0196078 0.0117647 0.109804 1";
      nightFogColor = "0.0196078 0.0117647 0.109804 1";
      moonEnabled = "1";
      moonTexture = "data/skies/night/moon_wglow";
      moonScale = "0.3";
      moonLightColor = "0.192157 0.192157 0.192157 1";
      useNightCubemap = "0";
      attenuationRatio = "0 1 1";
      shadowType = "PSSM";
      texSize = "2048";
      overDarkFactor = "2000 1000 500 100";
      shadowDistance = "1000";
      shadowSoftness = "0.15";
      numSplits = "4";
      logWeight = "0.96";
      fadeStartDistance = "0";
      lastSplitTerrainOnly = "0";
      representedInLightmap = "0";
      shadowDarkenColor = "0 0 0 -1";
      includeLightmappedGeometryInShadow = "0";
      position = "-35.9567 91.9514 17.8764";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      canSave = "1";
      canSaveDynamicFields = "1";
      Enabled = "1";
      sunBrightness = "25";
   };
   new WaterPlane(mySea) {
      gridSize = "101";
      gridElementSize = "1";
      density = "1";
      viscosity = "1";
      liquidType = "Water";
      baseColor = "0 219 255 12";
      fresnelBias = "0.3";
      fresnelPower = "6";
      specularPower = "10";
      specularColor = "0.00392157 0.00392157 0.00392157 1";
      waveDir[0] = "1 1";
      waveDir[1] = "1 1";
      waveDir[2] = "1 1";
      waveSpeed[0] = "1";
      waveSpeed[1] = "1";
      waveSpeed[2] = "1";
      waveMagnitude[0] = "1";
      waveMagnitude[1] = "1";
      waveMagnitude[2] = "1";
      overallWaveMagnitude = "0.01";
      rippleTex = "data/textures/water/ripple";
      rippleDir[0] = "1 1";
      rippleDir[1] = "1 1";
      rippleDir[2] = "1 1";
      rippleSpeed[0] = "0.05";
      rippleSpeed[1] = "0.05";
      rippleSpeed[2] = "0.05";
      rippleTexScale[0] = "10 10";
      rippleTexScale[1] = "5 5";
      rippleTexScale[2] = "1 1";
      rippleMagnitude[0] = "1";
      rippleMagnitude[1] = "1";
      rippleMagnitude[2] = "1";
      overallRippleMagnitude = "1.2";
      cubemap = "DefaultSkyCubemap";
      fullReflect = "1";
      reflectPriority = "1";
      reflectMaxRateMs = "15";
      reflectDetailAdjust = "1";
      reflectNormalUp = "1";
      useOcclusionQuery = "1";
      reflectTexSize = "1024";
      waterFogDensity = "0.5";
      waterFogDensityOffset = "0.5";
      wetDepth = "1.5";
      wetDarkening = "0.5";
      foamTex = "data/textures/water/foam";
      foamScale = "0.1";
      foamMaxDepth = "1";
      foamColorModulate = "0.5 0.5 0.5";
      distortStartDist = "0.1";
      distortEndDist = "20";
      distortFullDepth = "3.5";
      clarity = "0.5";
      underwaterColor = "255 255 255 255";
      position = "33.025 66.1132 17.0378";
      canSave = "1";
      canSaveDynamicFields = "1";
      Enabled = "1";
   };
   new CloudLayer(myClouds) {
      texture = "data/skies/clouds/clouds_normal_displacement";
      texScale[0] = "1";
      texScale[1] = "1";
      texScale[2] = "1";
      texDirection[0] = "1 0";
      texDirection[1] = "0 1";
      texDirection[2] = "0.5 0";
      texSpeed[0] = "0.005";
      texSpeed[1] = "0.005";
      texSpeed[2] = "0.005";
      baseColor = "0.9 0.9 0.9 1";
      coverage = "0.5";
      windSpeed = "1";
      height = "4";
      position = "778.318 -854.001 31.9234";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      canSave = "1";
      canSaveDynamicFields = "1";
      Enabled = "1";
   };

#1
07/29/2010 (11:56 pm)
Alfio, give us a picture of the issue.
#2
07/30/2010 (12:25 am)
img340.imageshack.us/img340/3517/screenshot00100002.th.png SSAO / LightRay / NO HDR
img801.imageshack.us/img801/26/screenshot00100004.th.png SSAO / LightRay / HDR With Tone Mapping
img641.imageshack.us/img641/1109/screenshot00100005.th.png SSAO / LightRay / HDR Without Tone Mapping

new LevelInfo(theLevelInfo) {
      nearClip = "0.1";
      visibleDistance = "1000";
      decalBias = "0.0015";
      fogColor = "0.6 0.6 0.7 1";
      fogDensity = "0";
      fogDensityOffset = "700";
      fogAtmosphereHeight = "0";
      canvasClearColor = "0 0 0 255";
      ....
   };
   new ScatterSky(mySky) {
      skyBrightness = "75";
      mieScattering = "0.002";
      rayleighScattering = "0.003";
      sunScale = "0.862745 0.870588 0.8 1";
      ambientScale = "0.172549 0.172549 0.172549 1";
      exposure = "1";
      azimuth = "0";
      elevation = "45";
      moonAzimuth = "0";
      moonElevation = "45";
      brightness = "1";
      ....
      nightColor = "0.0196078 0.0117647 0.109804 1";
      attenuationRatio = "0 1 1";
      shadowType = "PSSM";
      texSize = "2048";
      overDarkFactor = "2000 1000 500 100";
      shadowDistance = "1000";
      shadowSoftness = "0.15";
      numSplits = "4";
      logWeight = "0.96";
      fadeStartDistance = "0";
      lastSplitTerrainOnly = "0";
      representedInLightmap = "0";
      shadowDarkenColor = "0 0 0 -1";
      includeLightmappedGeometryInShadow = "0";
      ....
      sunBrightness = "25";
   };
   new WaterPlane(mySea) {
      ....
      baseColor = "0 219 255 12";
      fresnelBias = "0.3";
      fresnelPower = "6";
      specularPower = "10";
      specularColor = "0.00392157 0.00392157 0.00392157 1";
      ....
      cubemap = "DefaultSkyCubemap";
      fullReflect = "1";
      reflectPriority = "1";
      reflectMaxRateMs = "15";
      reflectDetailAdjust = "1";
      reflectNormalUp = "1";
      useOcclusionQuery = "1";
      reflectTexSize = "1024";
      waterFogDensity = "0.5";
      waterFogDensityOffset = "0.5";
      wetDepth = "1.5";
      wetDarkening = "0.5";
      foamTex = "data/textures/water/foam";
      foamScale = "0.1";
      foamMaxDepth = "1";
      foamColorModulate = "0.5 0.5 0.5";
      distortStartDist = "0.1";
      distortEndDist = "20";
      distortFullDepth = "3.5";
      clarity = "0.5";
      underwaterColor = "255 255 255 255";
      ....
   };
   new CloudLayer(myClouds) {
      texture = "data/skies/clouds/clouds_normal_displacement";
      ....
      baseColor = "0.9 0.9 0.9 1";
      coverage = "0.5";
      windSpeed = "1";
      height = "4";
      ....
   };
#3
07/31/2010 (6:21 pm)
There is a bug in HDR with water in the T3D 1.0 release. Its fixed in T3D 1.1 which should be released really soon now.
#4
07/31/2010 (7:29 pm)
Thank Tom
#5
08/01/2010 (8:11 am)
Hey Alfio, are you using 1.0.1 Binary? I'd like to get my hands on that SSAO/HDR/Tonemapping tool box.
#6
08/01/2010 (10:35 pm)
The PostFX GUI is only scripting, is not needed the source.
#7
08/01/2010 (11:17 pm)
Sorry Alfio, maybe I should have phrased myself better: I don't know how to access the PostFX GUI, I've done a couple searches on it and I think I'm as blind as a bat. If you could point me in the right direction I'd be much appreciative. :)
#8
08/01/2010 (11:56 pm)
@Mack: I think this is the one Alfio's using: http://www.torquepowered.com/community/resource/view/18479
#9
08/02/2010 (4:43 pm)
Thanks Konrad :)