Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 58 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: Raining Weather
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoDUO Mapping
Posted: Friday, Mar. 10, 2006 08:43 am
It shouldn't make much difference. But you can see for yourself easily by trying. But the Cullfog in your .gsc file. Run the map.. check the framerate. And do the same with the ExpFog.
Share |
WuphonsReach
General Member
Since: Aug 16, 2004
Posts: 276
Last: May 7, 2006
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Friday, Mar. 10, 2006 04:38 pm
Hmmm, I'm gonna stick with the culling fog. Once I made my fog the proper color, it looks perfectly natural using the CullFog method.

(I'm using the Hurtgen sky texture, but wasn't using the Hurtgen fog colors. So distant brushes were being colored in an odd manner before being culled.)

I still haven't figured out what the last argument does (some call it Transition Time, others call it Transparency). Values over ~1000 cause problems, but values of 0-1000 all seem to have the same effect.
Share |
WuphonsReach
General Member
Since: Aug 16, 2004
Posts: 276
Last: May 7, 2006
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Friday, Mar. 10, 2006 08:08 pm
I'm also wondering if it's possible to dynamically change the fog values during gameplay?

I've worked out how to randomize the fog values at the start of the map (which works well). I'm just curious whether I could slowly change the fog density during the game.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Saturday, Mar. 11, 2006 04:29 am
It possibly will work, I have done exactly that before in MOH SH and it worked well.

Just set up a looping routine that increments the values stored in variables for each fog value
Set upper limits for each value, have a check line that looks at the values, if the values are >= the upper limits, then start decreasing the vaules - or stop by breaking out of the loop.

Grassy
Share |
WuphonsReach
General Member
Since: Aug 16, 2004
Posts: 276
Last: May 7, 2006
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Saturday, Mar. 11, 2006 06:27 am
I shall have to experiment with that. For historical value, here's the code that I'm using to randomly pick the ambient sound and the fog values at the start:

Code:
// Set the CullFog randomly, most of the time we pick a moderate value
fogclass = randomint(10);
switch(fogclass)
{
	case 0: 	// Super dense, 4000-6000 far plane, 10% chance
		println("Today will be bitterly cold with poor visibility.");
		syb_fognear = randomint(500);
		syb_fogbase = 4000;
		syb_fogfar = syb_fogbase + randomint(2000);
		ambientPlay("syb_ambient_heavysnow");
		break;

	case 1: 	// Super clear, 8000-10000 far plane, 10% chance
		println("The forecast calls for no precipitation and clear visibility.");
		syb_fognear = randomint(2500) + 2500;
		syb_fogbase = 8000;
		syb_fogfar = syb_fogbase + randomint(2000);
		ambientPlay("syb_ambient_clear");
		break;

	default: 	// Moderate (default), 6000-8000 far plane, 80% chance
		println("The forecast calls for moderate conditions and visibility.");
		syb_fognear = randomint(1500) + 1000;
		syb_fogbase = 6000;
		syb_fogfar = syb_fogbase + randomint(2000);
		ambientPlay("syb_ambient_moderate");
		break;
}
iprintln("Fog: " + syb_fognear + " to " + syb_fogfar);
setCullFog (syb_fognear, syb_fogfar, .32, .36, .40, 5);


Notes:

- The println() statements aren't really working well (they don't send messages to the player). There's a different way to do this, but I haven't gotten to it yet.

- Naturally, I have my own custom sound alias CSV for the ambient sounds of "syb_ambient_heavysnow", "syb_ambient_clear", and "syb_ambient_moderate".

- It's interesting that sometimes the map has good visibility, while other rounds are poor visibility. It changes the long-range game where tanks and infantry become more difficult to spot at a distance.

(The map that I'm testing on is about 18000 x 28000, but the longest view is only 10000.)
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Saturday, Mar. 11, 2006 01:12 pm
Hey well done mate,
I like things like this, with a little bit of scripting to generate some randomness maps suddenly become a lot more interesting.

You have got me interested in the incremental fog idea as well, so I have started experimenting also. I will post my results and code soon.
Grassy
Share |
WuphonsReach
General Member
Since: Aug 16, 2004
Posts: 276
Last: May 7, 2006
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Saturday, Mar. 11, 2006 03:18 pm
Thanks.

That's (randomness) the main reason I figured out how to randomize the fog values. It changes the map slightly every round because you can no longer go to point X and know that you'll be able to see point Y. Some rounds, you're going to have to use alternate spot Z to see point Y.

Crystal clear day (around 9000u for fog distance):



Not so clear (this is the 80% pick), around 6500u far distance on the culling fog setting



Really foggy (about 10% of the rounds), about 4500u far distance value:




...

My ideas for randomly changing the fog value during a round:

1) Pick 2 far plane fog values (start / goal) within a band that are at least 1000u different (10 notches). So 4500 and 5500. Also setup boundary values (4000 and 6000).

2) Once a minute, change the fog value slightly by 50-100u (random).

a. A 33% chance of moving away from the goal. But not past the lower/upper boundary.

b. A 67% chance of moving towards our current goal value.

3. If we reach our goal value, pick a new goal value.

...

So, on average, it would take about 20 minutes to go from start to goal. Not sure if that's too long or if the increments are too large. I think that once a minute shouldn't be overly noticable if we're only moving the far plane around 2% at a time.
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 05:38 am
[banghead]

Well I tried, the news is not good at this stage.
My code looks like it should work but unfortunately again UO seems to not as Flexible as MOH/sh was.

I am getting an error on the setcullfog command,
unknown builtin method error.

For what it's worth here is the code, I expanded on your random selection code as it seemed a good place to start :)
Regards Grassy

Code:
//------------------------
//incremental in game fog
//------------------------

//setCullFog(start dist, cull dist, RGB Red colour, RGB Green colour, RGB Blue colour, time);
//setCullFog(0, 8000, 0.8, 0.8, 0.8, 0);
   
//setExpFog(the thickness of the fog, RGB Red colour, RGB Green colour, RGB Blue colour, time - which is always 0);
//setExpFog(.00070, .40, .40, .40, 0);

main ()
{

level thread SetupFog();

}



SetupFog() {

// This code was written by WuphonsReach & posted in ModsOnline forums
// Set the CullFog randomly, most of the time we pick a moderate value


fogclass = randomint(10);
switch(fogclass) {

	case 0: 	// Super dense, 4000-6000 far plane, 10% chance
		println("Today will be bitterly cold with poor visibility.");
		syb_fognear = randomint(500);
		syb_fogbase = 4000;
		syb_fogfar = syb_fogbase + randomint(2000);
//		ambientPlay("syb_ambient_heavysnow");
		break;

	case 1: 	// Super clear, 8000-10000 far plane, 10% chance
		println("The forecast calls for no precipitation and clear visibility.");
		syb_fognear = randomint(2500) + 2500;
		syb_fogbase = 8000;
		syb_fogfar = syb_fogbase + randomint(2000);
//		ambientPlay("syb_ambient_clear");
		break;

	default: 	// Moderate (default), 6000-8000 far plane, 80% chance
		println("The forecast calls for moderate conditions and visibility.");
		syb_fognear = randomint(1500) + 1000;
		syb_fogbase = 6000;
		syb_fogfar = syb_fogbase + randomint(2000);
//		ambientPlay("syb_ambient_moderate");
		break;
   }
   
   iprintln("Fog: " + syb_fognear + " to " + syb_fogfar);
   setCullFog (syb_fognear, syb_fogfar, .32, .36, .40, 5);

   
   //-----------------------***********************
   //New section added by <|WHC|>Grassy
   //Creates stepping fogplane & some random colors
   //-----------------------***********************
   
   colmin = 0.2;                                             //minimum fogcolor is 0.2
   fogcolor = ( colmin + randomfloat(0.8));         //maximum fogcolor could be 1
   iprintln ("FogColor = " + fogcolor);

   fogplane_step = 50;
   step_speed = 5;
   
   fogplane = syb_fogfar;
   fogplanemin = syb_fognear;
   fogplanemax = 10000;
   
   if (fogplane < 7000)
      acending = true;
   
  for (;;)
  {
   if(acending)
      fogplane += fogplane_step;
   else
      fogplane -= fogplane_step
   
   setCullFog(fogplanemin, fogplane, fogcolor, fogcolor, fogcolor, 0);
   wait step_speed;
   
   if((fogplane >= fogplanemax) || (fogplane <= fogplanemin))
      acending = false;
  }

}
  

/*
 ****Notes****
Ideas for randomly changing the fog value during a round - posted by WuphonsReach in ModsOnline forums

1) Pick 2 far plane fog values (start / goal) within a band that are at least 1000u different (10 notches). So 4500 and 5500. Also setup boundary values (4000 and 6000).
2) Once a minute, change the fog value slightly by 50-100u (random).
a. A 33% chance of moving away from the goal. But not past the lower/upper boundary.
b. A 67% chance of moving towards our current goal value.
3. If we reach our goal value, pick a new goal value.

So, on average, it would take about 20 minutes to go from start to goal. Not sure if that's too long or if the increments are too large.
I think that once a minute shouldn't be overly noticable if we're only moving the far plane around 2% at a time. 
*/


Ps: where did all those br additions come from???

edited on Mar. 12, 2006 12:41 am by WHC_Grassy
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 05:55 am
Dammit, I ran out of edit time.
I noticed an error in the script, so here is an updated version.

Quote:
//------------------------
//incremental in game fog
//------------------------

//setCullFog(start dist, cull dist, RGB Red colour, RGB Green colour, RGB Blue colour, time);
//setCullFog(0, 8000, 0.8, 0.8, 0.8, 0);

//setExpFog(the thickness of the fog, RGB Red colour, RGB Green colour, RGB Blue colour, time - which is always 0);
//setExpFog(.00070, .40, .40, .40, 0);

main ()
{

level thread SetupFog();

}



SetupFog() {

// This code was written by WuphonsReach & posted in ModsOnline forums
// Set the CullFog randomly, most of the time we pick a moderate value


fogclass = randomint(10);
switch(fogclass) {

case 0: // Super dense, 4000-6000 far plane, 10% chance
println("Today will be bitterly cold with poor visibility.");
syb_fognear = randomint(500);
syb_fogbase = 4000;
syb_fogfar = syb_fogbase + randomint(2000);
// ambientPlay("syb_ambient_heavysnow");
break;

case 1: // Super clear, 8000-10000 far plane, 10% chance
println("The forecast calls for no precipitation and clear visibility.");
syb_fognear = randomint(2500) + 2500;
syb_fogbase = 8000;
syb_fogfar = syb_fogbase + randomint(2000);
// ambientPlay("syb_ambient_clear");
break;

default: // Moderate (default), 6000-8000 far plane, 80% chance
println("The forecast calls for moderate conditions and visibility.");
syb_fognear = randomint(1500) + 1000;
syb_fogbase = 6000;
syb_fogfar = syb_fogbase + randomint(2000);
// ambientPlay("syb_ambient_moderate");
break;
}

iprintln("Fog: " + syb_fognear + " to " + syb_fogfar);
//setCullFog (syb_fognear, syb_fogfar, .32, .36, .40, 5);


//-----------------------***********************
//New section added by <|WHC|>Grassy
//Creates stepping fogplane
//-----------------------***********************

colmin = 0.2; //minimum fogcolor is 0.2
fogcolor = ( colmin + randomfloat(0.8)); //maximum fogcolor could be 1
iprintln ("FogColor = " + fogcolor);

fogplane_step = 50;
step_speed = 5;

fogplane = syb_fogfar;
fogplanemin = syb_fognear;
fogplanemax = 10000;

if (fogplane < 7000)
acending = true;

for (;;)
{
if(acending)
fogplane += fogplane_step;
else
fogplane -= fogplane_step

setCullFog(fogplanemin, fogplane, fogcolor, fogcolor, fogcolor, 0);
wait step_speed;

if(fogplane >= fogplanemax)
acending = false;

if(fogplane <= fogplanemin)
acending = true;
}

}



edited on Mar. 12, 2006 12:56 am by WHC_Grassy
Share |
WuphonsReach
General Member
Since: Aug 16, 2004
Posts: 276
Last: May 7, 2006
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 06:36 am
Hmm, tsk... wonder if the fog settings are "fixed" in stone once the first player connects to the map. I may try tackling it in a few weeks if I have time (your code will help immensely, showing me how to do a background thread with a timer).

If it doesn't work, no big loss... changing the fog values and ambient sound at the start of each round is dynamic enough for me. It at least adds one more dimension to the gameplay.
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»