Game Development Community

Cloud layers ?

by Vincent BILLET · in Torque Game Engine Advanced · 04/25/2006 (3:57 am) · 16 replies

It seems cloud layer are'nt working in TSE. Do I miss something or, it's not yet implemented?

#1
04/26/2006 (5:02 am)
Clouds seem to be working fine. I've just got one layer, but it moves along nicely.
#2
04/26/2006 (5:08 am)
Thanks a lot for the answer. I'm going to seek a little more.

Do you use Joseph Helm starter.fps? Can I have your sky features ?
Thanks again.
#3
04/28/2006 (4:15 am)
Vincent, did you figure this out? I have the same problem. I can't find anything on the forums or TDN.

Here is my sky object from my mission file. If anyone spots anything obvious, please let me know. I have clouds turned on in my prefs.

new Sky(Sky) {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
materialList = "~/data/skies/sky_day.dml";
cloudHeightPer[0] = "0";
cloudHeightPer[1] = "0.3";
cloudHeightPer[2] = "0.199973";
cloudSpeed1 = "0.5";
cloudSpeed2 = "0.5";
cloudSpeed3 = "0.5";
visibleDistance = "2000";
fogDistance = "800";
fogColor = "0.6 0.6 0.7 1";
fogStorm1 = "0";
fogStorm2 = "0";
fogStorm3 = "0";
fogVolume1 = "0 0 0";
fogVolume2 = "0 0 0";
fogVolume3 = "0 0 0";
windVelocity = "2 2 0";
SkySolidColor = "0.113 0.148 0.215 0";
useSkyTextures = "1";
renderBottomTexture = "0";
noRenderBans = "0";
renderBanOffsetHeight = "10";
skyGlow = "0";
skyGlowColor = "0 0 0 0";
locked = "true";
windEffectPrecipitation = "1";
};

Thanks,

Dave.
#4
04/28/2006 (5:55 am)
When I type
$onlyCloudLayer=0;
in console it works !
#5
04/29/2006 (7:49 am)
Hi Vincent, doesn't seem to work for me when I set that variable. Would you mind posting your sky settings here? I can copy them and see if it works for me.

Thanks a lot,

Dave.
#6
04/29/2006 (8:09 am)
Here are my sky settings :

new Sky(Sky) {
      position = "0 0 0";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      materialList = "~/data/skies/sky_day.dml";
      cloudHeightPer[0] = "0.349971";
      cloudHeightPer[1] = "0.3";
      cloudHeightPer[2] = "0.199973";
      cloudSpeed1 = "0.0005";
      cloudSpeed2 = "0.001";
      cloudSpeed3 = "0";
      visibleDistance = "4000";
      fogDistance = "3000";
      fogColor = "0.600000 0.600000 0.700000 1.000000";
      fogStorm1 = "0";
      fogStorm2 = "0";
      fogStorm3 = "0";
      fogVolume1 = "0 0 0";
      fogVolume2 = "0 0 0";
      fogVolume3 = "0 0 0";
      windVelocity = "1 1 0";
      windEffectPrecipitation = "1";
      SkySolidColor = "0.113000 0.148000 0.215000 0.000000";
      useSkyTextures = "1";
      renderBottomTexture = "0";
      noRenderBans = "0";
      renderBanOffsetHeight = "10";
      skyGlow = "0";
      skyGlowColor = "0.000000 0.000000 0.000000 0.000000";
         locked = "true";
   };
#7
04/29/2006 (12:24 pm)
Hi Vincent,

Thanks very much for that. Still doesn't work unfortunately. Is there anything else I need to set apart from prefs and the sky section of the mission file?

I know this isn't your problem, but if you have any ideas I'd be grateful Otherwise I'll keep messing and hope I come up with the answer.

Cheers,

Dave.
#8
04/29/2006 (2:56 pm)
:O What Happens?

Do you see sky?
Do you see something moving?
Do You use Joseph Helm Starter.fps?
Are you running MS3?

In fact, I use CVS MS3 and download Starter.fps from Joseph Helm and I just setted this variable as mentionned above. And it works. So I'm confused. I don't see what could happens.

A solution (it's what I've done to find this variable) is to put some breakpoints in sky.cpp at line 741 and 1595 to see what happens in debug mode. (Line 1595 is very decisive).

Of course you must have your sky.dml correctly setted. BTW I don't see any other way.

Please tell me more about your success/fail to achieve sky working.
thanks
#9
04/30/2006 (6:02 am)
Hi Vincent,

Ed Maurina's new book arrived yesterday. I looked up the clouds stuff in it today and have found the solution. Be prepared, I will make a confession so that others that are new to this will learn from this thread :-(

I didn't realise that you have to specify the cloud textures in the DML file! Yes, embarassing but true. Once I did that I could see the clouds (surprise eh?) Then I set the variable $onlyCloudLayer=0; as you said, and they started moving.

Thanks very much for your help, sorry to take you away from HTC+. Even if I had figured out the DML thing, I would not have known about the $onlyCloudLayer var unless you had mentioned it.

Cheers,

(Embarassed yet again) Dave.
#10
07/07/2006 (6:15 pm)
This is a quick and dirty fix so the clouds are always active:

in sky.cpp

at line 1578
comment out:
if(cloudLayer != Con::getIntVariable("onlyCloudLayer", 2))
return;
#11
11/05/2006 (7:56 am)
I got one layer working,doesnt want to do any more though :(
#12
11/05/2006 (8:13 am)
Multiple layers working just fine here.
#13
11/05/2006 (11:53 am)
Yup julians dirty fix fixed it i got multiples
#14
11/09/2006 (10:35 am)
Hey Dave. I had the same problem, and it was because the .dml file wasnt setup correctly. Here's what your .dml file should look like (~data/skies/sky_day.dml) :

day_0001   // side
day_0002   // side
day_0003   // side
day_0004   // side
day_0005   // not sure on these
day_0006   // top, bottom
day_0007   // and something else
cloud1        // moving layer 1 texture
cloud1        // moving layer 2 texture
cloud1        // moving layer 3 texture

If you dont have the last 3 lines the moving clouds wont show up. At least they didnt for me. I also implemented the fix that Julien mentioned. My ~data/skies folder has the following files:

day_0001.jpg
day_0002.jpg
day_0003.jpg
day_0004.jpg
day_0005.jpg
day_0006.jpg
day_0007.jpg
cloud1.png
sky_day.dml
#15
11/09/2006 (10:40 am)
Hey David,

I believe that day_0005 is the top, day_0006 is the bottom, and day_0007 is used for environment mapping.

Todd
#16
12/07/2006 (3:05 pm)
Exelent !

It look nice.

I made test rendering

http://img01.picoodle.com/img/img01/6/12/7/f_novaclasi_6af2m_c3f912ed.jpg