FxSunLight in TGEA - Is it functional?
by Dave Calabrese · in Torque Game Engine Advanced · 03/02/2008 (5:07 pm) · 6 replies
Out of curiosity, I nabbed the fxSunLight datablock listed on this page tdn.garagegames.com/wiki/WorldBuilding/MissionEditor/Sun, and popped it into the latest build of TGEA (v1.0.3). I am attempting to get the flare to work, and best I can tell it should be displaying, however the flare does not render at all. Has anyone been able to get the flare to render with fxSunLight just yet in TGEA 1.0.3? Perhaps there is a bug or setting that I am missing...
Thanks in advance,
-Dave C.
21-6 Productions
Thanks in advance,
-Dave C.
21-6 Productions
About the author
Recent Threads
#2
Thanks,
-Dave C.
21-6 Productions
03/02/2008 (8:31 pm)
I've added this in, and still saw no flares so I peaked around in prefs.cs and can't seem to find what it is that may show the flares... any hint on what the pref variable may be?Thanks,
-Dave C.
21-6 Productions
#3
The above code is working in TGEA 1.03. The only other thing I can think of is to make sure you have corona.png inside the directory of common/lighting/ (as per the datablock above).
03/02/2008 (8:44 pm)
Sorry... skyglow is a prefs.cs setting. The flare should be stock.The above code is working in TGEA 1.03. The only other thing I can think of is to make sure you have corona.png inside the directory of common/lighting/ (as per the datablock above).
#4
Hrrm... well, I'm afraid the graphic wasn't it. I triple checked that corona.png was there, and it is. Tried moving it around and entering other directories, but it still refuses to display a flare.
03/02/2008 (8:55 pm)
Ahh, gotcha. I'll have to play around with Skyglow, as that sounds pretty cool!Hrrm... well, I'm afraid the graphic wasn't it. I triple checked that corona.png was there, and it is. Tried moving it around and entering other directories, but it still refuses to display a flare.
#5
Go to the World Editor Creator, then Mission Objects->Environment->fxSunLight
It appeared immediately.
On a side note, it doesn't seem to work if there is more than one Sun (two fxSunLights OK).
03/02/2008 (9:10 pm)
I just tested the 1.03 SDK's example and was able to add an fxSunlight flare via the mission editor.Go to the World Editor Creator, then Mission Objects->Environment->fxSunLight
It appeared immediately.
On a side note, it doesn't seem to work if there is more than one Sun (two fxSunLights OK).
#6
Thanks for your assistence!
-Dave C.
03/13/2008 (5:50 am)
Ah.. okay, I found the problem. For some reason, the flare wasn't rendering for me when the fxSunlight was initially added. I had to save the mission, quit the game, and restart it. Then - and only then - did the flare render.Thanks for your assistence!
-Dave C.
Torque 3D Owner Eric Forhan
new Sun() { canSaveDynamicFields = "1"; azimuth = "100"; elevation = "20"; color = "0.9 0.9 0.8 1"; ambient = "0.65 0.65 0.6 1"; CastsShadows = "1"; useBloom = "1"; useToneMapping = "1"; useDynamicRangeLighting = "1"; DRLHighDynamicRange = "1"; DRLTarget = "0.5"; DRLMax = "1.4"; DRLMin = "0.5"; DRLMultiplier = "1.1"; bloomCutOff = "0.8"; bloomAmount = "0.25"; bloomSeedAmount = "1"; scale = "1 1 1"; locked = "true"; position = "0 0 0"; rotation = "1 0 0 0"; }; new fxSunLight(sunflare1) { canSaveDynamicFields = "1"; position = "-317.472 -497.053 188.13"; rotation = "1 0 0 0"; scale = "1 1 1"; Enable = "1"; LocalFlareBitmap = "common/lighting/corona"; RemoteFlareBitmap = "common/lighting/corona"; SunAzimuth = "224"; SunElevation = "10"; LockToRealSun = "1"; FlareTP = "1"; Colour = "0.3 0.1 0.1 1"; Brightness = "1"; FlareSize = "1"; LocalScale = "1"; FadeTime = "0.1"; BlendMode = "0"; AnimColour = "0"; AnimBrightness = "1"; AnimRotation = "1"; AnimSize = "1"; 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.4"; MaxBrightness = "1"; MinRotation = "0"; MaxRotation = "359"; minSize = "0.5"; MaxSize = "1"; MinAzimuth = "0"; MaxAzimuth = "359"; MinElevation = "-30"; MaxElevation = "210"; RedKeys = "AZA"; GreenKeys = "AZA"; BlueKeys = "AZA"; BrightnessKeys = "JAZJTAJ"; RotationKeys = "ZA"; SizeKeys = "ATAZA"; AzimuthKeys = "AZ"; ElevationKeys = "AZ"; ColourTime = "5"; BrightnessTime = "10"; RotationTime = "1000"; SizeTime = "30"; AzimuthTime = "5"; ElevationTime = "5"; }; new fxSunLight(sunflare2) { canSaveDynamicFields = "1"; position = "-343.077 -497.051 187.692"; rotation = "1 0 0 0"; scale = "1 1 1"; Enable = "1"; LocalFlareBitmap = "common/lighting/corona"; RemoteFlareBitmap = "common/lighting/corona"; SunAzimuth = "224"; SunElevation = "10"; LockToRealSun = "1"; FlareTP = "1"; Colour = "2 2 0 1"; Brightness = "1"; FlareSize = "0.5"; LocalScale = "1"; FadeTime = "0.1"; BlendMode = "0"; AnimColour = "0"; AnimBrightness = "1"; AnimRotation = "1"; 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.25"; MaxBrightness = "0.5"; MinRotation = "0"; MaxRotation = "359"; minSize = "0.5"; MaxSize = "1"; MinAzimuth = "0"; MaxAzimuth = "359"; MinElevation = "-30"; MaxElevation = "210"; RedKeys = "AZA"; GreenKeys = "AZA"; BlueKeys = "AZA"; BrightnessKeys = "AZJTA"; RotationKeys = "AZ"; SizeKeys = "ATAZA"; AzimuthKeys = "AZ"; ElevationKeys = "AZ"; ColourTime = "5"; BrightnessTime = "6"; RotationTime = "1000"; SizeTime = "5"; AzimuthTime = "5"; ElevationTime = "5"; };Also, I've only messed around with this a little, but I found using SkyGlow has the potential to make or a very nice Sun (it also affects the clouds and skybox). Add this to your sky datablock and tweak as needed:
skyGlow = "1"; skyGlowColor = "0 0 0 0";[/code]You may need to turn it on via prefs.cs.