Fog Layers
by Howard Dortch · in Torque Game Engine · 06/15/2004 (9:13 pm) · 26 replies
I can create fog layers in my editor and save it. When I run the program again the fog is gone. Is there a $Pref setting someplace causing this?
#2
06/17/2004 (4:15 am)
Yes it changes, actually I edit the file directly to make sure. I did notice some OpenGL fog references in some prefs so that wouldn't have any thing to do with it?
#3
06/17/2004 (8:34 am)
Hmm. Very mysterious. Maybe you're changing them to some value that makes them invisible?
#4
fogDistance = "300";
fogColor = "0.600000 0.600000 0.600000 1.000000";
fogStorm1 = "1";
fogStorm2 = "1";
fogStorm3 = "1";
fogVolume1 = "300 0 50";
fogVolume2 = "100 50 100";
fogVolume3 = "100 100 120";
I can set the fog in game, works fine. I exit and look at the file and these are the settings. Go back in the game and the settings are the same but no fog. It acts like some init thing is not set properly like enable_fog = 1 someplace because when you set it from the editor it doesn't run thru the init routine.
06/17/2004 (10:31 am)
Here are the settingsfogDistance = "300";
fogColor = "0.600000 0.600000 0.600000 1.000000";
fogStorm1 = "1";
fogStorm2 = "1";
fogStorm3 = "1";
fogVolume1 = "300 0 50";
fogVolume2 = "100 50 100";
fogVolume3 = "100 100 120";
I can set the fog in game, works fine. I exit and look at the file and these are the settings. Go back in the game and the settings are the same but no fog. It acts like some init thing is not set properly like enable_fog = 1 someplace because when you set it from the editor it doesn't run thru the init routine.
#5
Quick question. are you getting any complaints in your logs associated w/ loading the mission? Also, the standard questions:
Do you have:
1. Latest drivers?
2. Rendering params (under display properties->settings->advanced) set to highest quality?
3. Bit depth set to 32 (can be found under video options when you start game, and be sure to press APPLY, not just OK).
Note, I don't think 1..3 are the issue here, but just in case, I'm asking.
I can't try your example params right now, but they look good. If you don't post that you have it working by tonight, I'll take a look when I get home.
Till then, best of luck.
[HOW]EdM
06/17/2004 (11:06 am)
Howard,Quick question. are you getting any complaints in your logs associated w/ loading the mission? Also, the standard questions:
Do you have:
1. Latest drivers?
2. Rendering params (under display properties->settings->advanced) set to highest quality?
3. Bit depth set to 32 (can be found under video options when you start game, and be sure to press APPLY, not just OK).
Note, I don't think 1..3 are the issue here, but just in case, I'm asking.
I can't try your example params right now, but they look good. If you don't post that you have it working by tonight, I'll take a look when I get home.
Till then, best of luck.
[HOW]EdM
#6
Thing that puzzles me is I can set the fog in the editor and it works fine, when I run the program after I exit I get no fog.
As I said before, it leads me to believe that there is a $Pref setting that disables the ability when the exe is launched. In the editor that value is changed internally when I enable the layered fogs and gets reset next time the program is run. I would suspect that is the case but don't know the code well enough to hunt it down. I did a find in files on fog and didn't come up with anything I could recognize as the problem. Thanks for your help.....
06/17/2004 (11:26 am)
Nvidia GF3 driver 56.64, TrueColor 32 bitThing that puzzles me is I can set the fog in the editor and it works fine, when I run the program after I exit I get no fog.
As I said before, it leads me to believe that there is a $Pref setting that disables the ability when the exe is launched. In the editor that value is changed internally when I enable the layered fogs and gets reset next time the program is run. I would suspect that is the case but don't know the code well enough to hunt it down. I did a find in files on fog and didn't come up with anything I could recognize as the problem. Thanks for your help.....
#7
Are you changing the fog in the mission editor, then saving the mission?
06/17/2004 (12:03 pm)
Just to make sure...Are you changing the fog in the mission editor, then saving the mission?
#8
06/17/2004 (12:17 pm)
I almost asked that same question, John. The ol' "KISS" mantra. :)
#9
06/17/2004 (12:31 pm)
LOL double shot. yeah I saved it a couple times even made other changes to be sure. When I load the game up and go into the editor the data is all there. Fog 1,2,3 all checked and values for layers. Made sure it was saved in the script with an editor too.
#10
All Stormfog layers + stormclouds are off from start.
But try this, load up the level.
type in console sky.stormfog(1,1);
can you see the fog now ?
I still trying todo a weather block where i tie all together.
So basicly in the end it should be a weather system.
Still on paper but it begining to take shape.
Need moore time :)
06/17/2004 (12:34 pm)
Stormfog is a tricky one :)All Stormfog layers + stormclouds are off from start.
But try this, load up the level.
type in console sky.stormfog(1,1);
can you see the fog now ?
I still trying todo a weather block where i tie all together.
So basicly in the end it should be a weather system.
Still on paper but it begining to take shape.
Need moore time :)
#11
06/17/2004 (12:54 pm)
I never did understand the Stormfog thing.
#12
06/17/2004 (1:16 pm)
Stormfog is cool... you can make it slowly get foggier and foggier, then make it disappear slowly. Or you can do it really quick. Do a forum search for it... someone (Billy, maybe?) posted about it a couple months ago.
#13
OFFSET: 0.812500
CURRENT: 0 PERCENTAGE: 0.076172 TIME: 83530
OFFSET: 0.843750
CURRENT: 0 PERCENTAGE: 0.155273 TIME: 83557
Many more times.......
and BLAM! there is my fog!
So it's not doing that on startup for some reason?
06/17/2004 (1:19 pm)
Billy ScE I did as you said and it did this:OFFSET: 0.812500
CURRENT: 0 PERCENTAGE: 0.076172 TIME: 83530
OFFSET: 0.843750
CURRENT: 0 PERCENTAGE: 0.155273 TIME: 83557
Many more times.......
and BLAM! there is my fog!
So it's not doing that on startup for some reason?
#14
So i starting to be a real friend with torque weather (sunny all the time):)
06/17/2004 (1:22 pm)
Ye maybe it was me i use this heavly in my game :)So i starting to be a real friend with torque weather (sunny all the time):)
#15
If you want i slowly come in try this next time
sky.stormfog(1,100);
and to reverse so it disapear
sky.stormfog(0.1,100);
06/17/2004 (1:25 pm)
No its not doing that because the stormfog is off from start.If you want i slowly come in try this next time
sky.stormfog(1,100);
and to reverse so it disapear
sky.stormfog(0.1,100);
#16
the first one I assume is the bool 0=off 1=on the other is the fadein time?
06/17/2004 (1:58 pm)
What are the 2 parameters Billy?the first one I assume is the bool 0=off 1=on the other is the fadein time?
#17
06/17/2004 (2:03 pm)
Stormfog(percent,duration)
#18
I have been lookin into a weather system as well like slow startup on the rain, then intensify, fog a bit, lightning then move away.
One question there is can I change the direciton of the clouds? Like to think I can have a weather manager so to speak and do that.
06/17/2004 (2:20 pm)
Works for me thanks mucho Billy....I have been lookin into a weather system as well like slow startup on the rain, then intensify, fog a bit, lightning then move away.
One question there is can I change the direciton of the clouds? Like to think I can have a weather manager so to speak and do that.
#19
@John
Absolutely awesome! I did not know about the stormfog business. I'll have to add it to the guide. Meanwhile,
@Howard,
I talk about using the cloud motion on page 26 here Tech School - Mission Objects (5.6MB). This is from this resource. Please note, this an alpha still, so if you find it inaccurate or unsable, please do drop me a line. There is an e-mail, specifically for that in the readme.txt file that comes with any of the zip files.
Hope that helps.
[HOW]EdM
PS - I know about the typos at the bottom of page 26
-EFM
PS - Here is the snipped that talks about it:
Cloud Motion
Cloud motion is described by two parameters. First, all clouds move in the same
direction. This direction is specified by the (misnamed) parameter windVelocity.
windVelocity is an x-y-z vector. The X and Y components control the direction of the
wind and therefore the clouds. Putting a non-zero value in Z breaks the cloud renderer,
don?t do it. Finally, you can control the velocity of the flow with the cloudSpeed
parameters. Yes, velocities can be negative, so clouds can counter flow.
06/17/2004 (3:18 pm)
@Billy ScE@John
Absolutely awesome! I did not know about the stormfog business. I'll have to add it to the guide. Meanwhile,
@Howard,
I talk about using the cloud motion on page 26 here Tech School - Mission Objects (5.6MB). This is from this resource. Please note, this an alpha still, so if you find it inaccurate or unsable, please do drop me a line. There is an e-mail, specifically for that in the readme.txt file that comes with any of the zip files.
Hope that helps.
[HOW]EdM
PS - I know about the typos at the bottom of page 26
-EFM
PS - Here is the snipped that talks about it:
Cloud Motion
Cloud motion is described by two parameters. First, all clouds move in the same
direction. This direction is specified by the (misnamed) parameter windVelocity.
windVelocity is an x-y-z vector. The X and Y components control the direction of the
wind and therefore the clouds. Putting a non-zero value in Z breaks the cloud renderer,
don?t do it. Finally, you can control the velocity of the flow with the cloudSpeed
parameters. Yes, velocities can be negative, so clouds can counter flow.
#20
you can get clouds come and go ,get the rain rain moore or less
have warningflashes for lightning, and you can get the ground to blur the texture so it looks like it rained much, this engine is lovely, havent seen this in any other engine.
06/17/2004 (3:48 pm)
@Howard its not only this in torque.you can get clouds come and go ,get the rain rain moore or less
have warningflashes for lightning, and you can get the ground to blur the texture so it looks like it rained much, this engine is lovely, havent seen this in any other engine.
Associate Kyle Carter