| 1 |
|
| 2 |
######################################################## |
| 3 |
# routines to set up, transform and manage local weather |
| 4 |
# Thorsten Renk, August 2011 |
| 5 |
######################################################## |
| 6 |
|
| 7 |
# function purpose |
| 8 |
# |
| 9 |
# select_cloud_model to define the cloud parameters, given the cloud type and subtype |
| 10 |
|
| 11 |
|
| 12 |
########################################################### |
| 13 |
# define various cloud models |
| 14 |
########################################################### |
| 15 |
|
| 16 |
var select_cloud_model = func(type, subtype) { |
| 17 |
|
| 18 |
var rn = rand(); |
| 19 |
var path="Models/Weather/blank.ac"; |
| 20 |
|
| 21 |
|
| 22 |
if (type == "Cumulus (cloudlet)"){ |
| 23 |
|
| 24 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 25 |
|
| 26 |
if (subtype == "small") |
| 27 |
{ |
| 28 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_sheet2.rgb"; |
| 29 |
cloudAssembly.n_sprites = 10; |
| 30 |
cloudAssembly.min_width = 500.0; |
| 31 |
cloudAssembly.max_width = 700.0; |
| 32 |
cloudAssembly.min_height = 500.0; |
| 33 |
cloudAssembly.max_height = 700.0; |
| 34 |
cloudAssembly.min_cloud_width = 1300; |
| 35 |
cloudAssembly.min_cloud_height = 750; |
| 36 |
cloudAssembly.bottom_shade = 0.4; |
| 37 |
} |
| 38 |
else |
| 39 |
{ |
| 40 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_sheet1.rgb"; |
| 41 |
cloudAssembly.n_sprites = 5; |
| 42 |
cloudAssembly.min_width = 600.0; |
| 43 |
cloudAssembly.max_width = 900.0; |
| 44 |
cloudAssembly.min_height = 600.0; |
| 45 |
cloudAssembly.max_height = 900.0; |
| 46 |
cloudAssembly.min_cloud_width = 1300; |
| 47 |
cloudAssembly.min_cloud_height = 950; |
| 48 |
cloudAssembly.bottom_shade = 0.4; |
| 49 |
} |
| 50 |
|
| 51 |
|
| 52 |
# characterize the basic texture sheet |
| 53 |
cloudAssembly.num_tex_x = 3; |
| 54 |
cloudAssembly.num_tex_y = 3; |
| 55 |
|
| 56 |
#characterize the cloud |
| 57 |
cloudAssembly.z_scale = 1.0; |
| 58 |
|
| 59 |
#signal that new routines are used |
| 60 |
path = "new"; |
| 61 |
} |
| 62 |
|
| 63 |
else if (type == "Cu (volume)"){ |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 68 |
|
| 69 |
if (subtype == "small") |
| 70 |
{ |
| 71 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_sheet2.rgb"; |
| 72 |
cloudAssembly.n_sprites = 5; |
| 73 |
cloudAssembly.min_width = 400.0; |
| 74 |
cloudAssembly.max_width = 700.0; |
| 75 |
cloudAssembly.min_height = 400.0; |
| 76 |
cloudAssembly.max_height = 700.0; |
| 77 |
cloudAssembly.min_cloud_width = 1000; |
| 78 |
cloudAssembly.min_cloud_height = 1000; |
| 79 |
cloudAssembly.bottom_shade = 0.4; |
| 80 |
} |
| 81 |
else |
| 82 |
{ |
| 83 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_sheet1.rgb"; |
| 84 |
cloudAssembly.n_sprites = 5; |
| 85 |
cloudAssembly.min_width = 800.0; |
| 86 |
cloudAssembly.max_width = 1100.0; |
| 87 |
cloudAssembly.min_height = 800.0; |
| 88 |
cloudAssembly.max_height = 1100.0; |
| 89 |
cloudAssembly.min_cloud_width = 1500; |
| 90 |
cloudAssembly.min_cloud_height = 1150; |
| 91 |
cloudAssembly.bottom_shade = 0.4; |
| 92 |
} |
| 93 |
|
| 94 |
|
| 95 |
# characterize the basic texture sheet |
| 96 |
cloudAssembly.num_tex_x = 3; |
| 97 |
cloudAssembly.num_tex_y = 3; |
| 98 |
|
| 99 |
#characterize the cloud |
| 100 |
cloudAssembly.z_scale = 1.0; |
| 101 |
|
| 102 |
#signal that new routines are used |
| 103 |
path = "new"; |
| 104 |
} |
| 105 |
|
| 106 |
|
| 107 |
else if (type == "Congestus"){ |
| 108 |
|
| 109 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 110 |
|
| 111 |
if (subtype == "small") |
| 112 |
{ |
| 113 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_sheet1.rgb"; |
| 114 |
cloudAssembly.num_tex_x = 3; |
| 115 |
cloudAssembly.num_tex_y = 3; |
| 116 |
cloudAssembly.n_sprites = 5; |
| 117 |
cloudAssembly.min_width = 600.0; |
| 118 |
cloudAssembly.max_width = 900.0; |
| 119 |
cloudAssembly.min_height = 600.0; |
| 120 |
cloudAssembly.max_height = 900.0; |
| 121 |
cloudAssembly.min_cloud_width = 1300; |
| 122 |
cloudAssembly.min_cloud_height = 1000; |
| 123 |
cloudAssembly.bottom_shade = 0.4; |
| 124 |
} |
| 125 |
else |
| 126 |
{ |
| 127 |
|
| 128 |
if (rand() > 0.5) |
| 129 |
{ |
| 130 |
cloudAssembly.texture_sheet = "/Models/Weather/congestus_sheet1.rgb"; |
| 131 |
cloudAssembly.num_tex_x = 1; |
| 132 |
cloudAssembly.num_tex_y = 3; |
| 133 |
cloudAssembly.min_width = 1300.0; |
| 134 |
cloudAssembly.max_width = 2000.0; |
| 135 |
cloudAssembly.min_height = 600.0; |
| 136 |
cloudAssembly.max_height = 900.0; |
| 137 |
} |
| 138 |
else |
| 139 |
{ |
| 140 |
cloudAssembly.texture_sheet = "/Models/Weather/congestus_sheet2.rgb"; |
| 141 |
cloudAssembly.num_tex_x = 1; |
| 142 |
cloudAssembly.num_tex_y = 2; |
| 143 |
cloudAssembly.min_width = 1200.0; |
| 144 |
cloudAssembly.max_width = 1800.0; |
| 145 |
cloudAssembly.min_height = 700.0; |
| 146 |
cloudAssembly.max_height = 1000.0; |
| 147 |
} |
| 148 |
|
| 149 |
|
| 150 |
cloudAssembly.n_sprites = 3; |
| 151 |
cloudAssembly.min_cloud_width = 2200.0; |
| 152 |
cloudAssembly.min_cloud_height = 1200.0; |
| 153 |
cloudAssembly.bottom_shade = 0.4; |
| 154 |
|
| 155 |
} |
| 156 |
cloudAssembly.z_scale = 1.0; |
| 157 |
|
| 158 |
#signal that new routines are used |
| 159 |
path = "new"; |
| 160 |
|
| 161 |
} |
| 162 |
else if (type == "Stratocumulus"){ |
| 163 |
|
| 164 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 165 |
|
| 166 |
if (subtype == "small") |
| 167 |
{ |
| 168 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_sheet1.rgb"; |
| 169 |
cloudAssembly.num_tex_x = 3; |
| 170 |
cloudAssembly.num_tex_y = 3; |
| 171 |
cloudAssembly.n_sprites = 7; |
| 172 |
cloudAssembly.min_width = 600.0; |
| 173 |
cloudAssembly.max_width = 900.0; |
| 174 |
cloudAssembly.min_height = 600.0; |
| 175 |
cloudAssembly.max_height = 900.0; |
| 176 |
cloudAssembly.min_cloud_width = 1300; |
| 177 |
cloudAssembly.min_cloud_height = 1300; |
| 178 |
cloudAssembly.bottom_shade = 0.4; |
| 179 |
} |
| 180 |
else |
| 181 |
{ |
| 182 |
if (rand() > 0.66) |
| 183 |
{ |
| 184 |
cloudAssembly.texture_sheet = "/Models/Weather/congestus_sheet1.rgb"; |
| 185 |
cloudAssembly.num_tex_x = 1; |
| 186 |
cloudAssembly.num_tex_y = 3; |
| 187 |
cloudAssembly.min_width = 1900.0; |
| 188 |
cloudAssembly.max_width = 2100.0; |
| 189 |
cloudAssembly.min_height = 1000.0; |
| 190 |
cloudAssembly.max_height = 1100.0; |
| 191 |
cloudAssembly.n_sprites = 3; |
| 192 |
cloudAssembly.bottom_shade = 0.5; |
| 193 |
cloudAssembly.min_cloud_width = 3500.0; |
| 194 |
cloudAssembly.min_cloud_height = 1600.0; |
| 195 |
} |
| 196 |
else if (rand() > 0.33) |
| 197 |
{ |
| 198 |
cloudAssembly.texture_sheet = "/Models/Weather/congestus_sheet2.rgb"; |
| 199 |
cloudAssembly.num_tex_x = 1; |
| 200 |
cloudAssembly.num_tex_y = 2; |
| 201 |
cloudAssembly.min_width = 1900.0; |
| 202 |
cloudAssembly.max_width = 2000.0; |
| 203 |
cloudAssembly.min_height = 1000.0; |
| 204 |
cloudAssembly.max_height = 1100.0; |
| 205 |
cloudAssembly.n_sprites = 3; |
| 206 |
cloudAssembly.bottom_shade = 0.4; |
| 207 |
cloudAssembly.min_cloud_width = 3500.0; |
| 208 |
cloudAssembly.min_cloud_height = 1600.0; |
| 209 |
} |
| 210 |
else |
| 211 |
{ |
| 212 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_sheet1.rgb"; |
| 213 |
cloudAssembly.num_tex_x = 3; |
| 214 |
cloudAssembly.num_tex_y = 3; |
| 215 |
cloudAssembly.min_width = 800.0; |
| 216 |
cloudAssembly.max_width = 1000.0; |
| 217 |
cloudAssembly.min_height = 800.0; |
| 218 |
cloudAssembly.max_height = 1000.0; |
| 219 |
cloudAssembly.n_sprites = 5; |
| 220 |
cloudAssembly.bottom_shade = 0.4; |
| 221 |
cloudAssembly.min_cloud_width = 3000.0; |
| 222 |
cloudAssembly.min_cloud_height = 1100.0; |
| 223 |
} |
| 224 |
} |
| 225 |
|
| 226 |
|
| 227 |
cloudAssembly.z_scale = 1.0; |
| 228 |
|
| 229 |
#signal that new routines are used |
| 230 |
path = "new"; |
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
} |
| 235 |
else if (type == "Cumulus (whisp)"){ |
| 236 |
|
| 237 |
|
| 238 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 239 |
|
| 240 |
var mult = 1.0; |
| 241 |
|
| 242 |
# characterize the basic texture sheet |
| 243 |
cloudAssembly.texture_sheet = "/Models/Weather/altocumulus_sheet1.rgb"; |
| 244 |
cloudAssembly.num_tex_x = 3; |
| 245 |
cloudAssembly.num_tex_y = 3; |
| 246 |
|
| 247 |
#characterize the cloud |
| 248 |
cloudAssembly.bottom_shade = 0.8; |
| 249 |
cloudAssembly.n_sprites = 4; |
| 250 |
cloudAssembly.min_width = 400.0 * mult; |
| 251 |
cloudAssembly.max_width = 600.0 * mult; |
| 252 |
cloudAssembly.min_height = 400.0 * mult; |
| 253 |
cloudAssembly.max_height = 600.0 * mult; |
| 254 |
cloudAssembly.min_cloud_width = 800; |
| 255 |
cloudAssembly.min_cloud_height = 800; |
| 256 |
cloudAssembly.z_scale = 1.0; |
| 257 |
|
| 258 |
#signal that new routines are used |
| 259 |
path = "new"; |
| 260 |
|
| 261 |
|
| 262 |
} |
| 263 |
else if (type == "Cumulus bottom"){ |
| 264 |
|
| 265 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 266 |
|
| 267 |
var mult = 1.0; |
| 268 |
|
| 269 |
# characterize the basic texture sheet |
| 270 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_bottom_sheet1.rgb"; |
| 271 |
cloudAssembly.num_tex_x = 1; |
| 272 |
cloudAssembly.num_tex_y = 1; |
| 273 |
|
| 274 |
#characterize the cloud |
| 275 |
cloudAssembly.bottom_shade = 0.4; |
| 276 |
cloudAssembly.n_sprites = 4; |
| 277 |
cloudAssembly.min_width = 600.0 * mult; |
| 278 |
cloudAssembly.max_width = 800.0 * mult; |
| 279 |
cloudAssembly.min_height = 600.0 * mult; |
| 280 |
cloudAssembly.max_height = 800.0 * mult; |
| 281 |
cloudAssembly.min_cloud_width = 1200 * mult * mult; |
| 282 |
cloudAssembly.min_cloud_height = 800 * mult * mult; |
| 283 |
cloudAssembly.z_scale = 0.6; |
| 284 |
|
| 285 |
#signal that new routines are used |
| 286 |
path = "new"; |
| 287 |
|
| 288 |
} |
| 289 |
else if (type == "Congestus bottom"){ |
| 290 |
|
| 291 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 292 |
|
| 293 |
var mult = 1.0; |
| 294 |
|
| 295 |
# characterize the basic texture sheet |
| 296 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_bottom_sheet1.rgb"; |
| 297 |
cloudAssembly.num_tex_x = 1; |
| 298 |
cloudAssembly.num_tex_y = 1; |
| 299 |
|
| 300 |
#characterize the cloud |
| 301 |
cloudAssembly.bottom_shade = 0.4; |
| 302 |
cloudAssembly.n_sprites = 4; |
| 303 |
cloudAssembly.min_width = 1100.0 * mult; |
| 304 |
cloudAssembly.max_width = 1400.0 * mult; |
| 305 |
cloudAssembly.min_height = 1100.0 * mult; |
| 306 |
cloudAssembly.max_height = 1400.0 * mult; |
| 307 |
cloudAssembly.min_cloud_width = 1600 * mult * mult; |
| 308 |
cloudAssembly.min_cloud_height = 1200 * mult * mult; |
| 309 |
cloudAssembly.z_scale = 0.4; |
| 310 |
|
| 311 |
#signal that new routines are used |
| 312 |
path = "new"; |
| 313 |
|
| 314 |
} |
| 315 |
else if (type == "Stratocumulus bottom"){ |
| 316 |
|
| 317 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 318 |
|
| 319 |
# characterize the basic texture sheet |
| 320 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_bottom_sheet1.rgb"; |
| 321 |
cloudAssembly.num_tex_x = 1; |
| 322 |
cloudAssembly.num_tex_y = 1; |
| 323 |
|
| 324 |
#characterize the cloud |
| 325 |
cloudAssembly.bottom_shade = 0.4; |
| 326 |
cloudAssembly.n_sprites = 3; |
| 327 |
cloudAssembly.min_width = 1200.0; |
| 328 |
cloudAssembly.max_width = 1600.0; |
| 329 |
cloudAssembly.min_height = 1200.0 ; |
| 330 |
cloudAssembly.max_height = 1600.0; |
| 331 |
cloudAssembly.min_cloud_width = 2000 ; |
| 332 |
cloudAssembly.min_cloud_height = 1700; |
| 333 |
cloudAssembly.z_scale = 0.4; |
| 334 |
|
| 335 |
#signal that new routines are used |
| 336 |
path = "new"; |
| 337 |
|
| 338 |
} |
| 339 |
else if (type == "Cumulonimbus (cloudlet)"){ |
| 340 |
|
| 341 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 342 |
|
| 343 |
# characterize the basic texture sheet |
| 344 |
|
| 345 |
|
| 346 |
cloudAssembly.num_tex_x = 2; |
| 347 |
cloudAssembly.num_tex_y = 2; |
| 348 |
|
| 349 |
if (rand() < 0.5) |
| 350 |
{cloudAssembly.texture_sheet = "/Models/Weather/cumulonimbus_sheet2.rgb";} |
| 351 |
else |
| 352 |
{cloudAssembly.texture_sheet = "/Models/Weather/cumulonimbus_sheet1.rgb";} |
| 353 |
|
| 354 |
var mult = 1.0; |
| 355 |
if (subtype == "small") {mult = 0.7;} |
| 356 |
|
| 357 |
#characterize the cloud |
| 358 |
cloudAssembly.bottom_shade = 0.6; |
| 359 |
cloudAssembly.n_sprites = 5; |
| 360 |
cloudAssembly.min_width = 1700.0 * mult; |
| 361 |
cloudAssembly.max_width = 2200.0 * mult; |
| 362 |
cloudAssembly.min_height = 1700.0 * mult; |
| 363 |
cloudAssembly.max_height = 2200.0 * mult; |
| 364 |
cloudAssembly.min_cloud_width = 3500.0 * mult; |
| 365 |
cloudAssembly.min_cloud_height = 3500.0 * mult; |
| 366 |
cloudAssembly.z_scale = 1.0; |
| 367 |
|
| 368 |
#signal that new routines are used |
| 369 |
path = "new"; |
| 370 |
} |
| 371 |
|
| 372 |
else if (type == "Altocumulus"){ |
| 373 |
|
| 374 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 375 |
|
| 376 |
var mult = 1.0; |
| 377 |
if (subtype == "small") {mult = 0.7;} |
| 378 |
else {mult = 1.0;} |
| 379 |
|
| 380 |
# characterize the basic texture sheet |
| 381 |
cloudAssembly.texture_sheet = "/Models/Weather/altocumulus_sheet1.rgb"; |
| 382 |
cloudAssembly.num_tex_x = 3; |
| 383 |
cloudAssembly.num_tex_y = 3; |
| 384 |
|
| 385 |
#characterize the cloud |
| 386 |
cloudAssembly.bottom_shade = 0.7; |
| 387 |
cloudAssembly.n_sprites = 6; |
| 388 |
cloudAssembly.min_width = 40.0 * mult; |
| 389 |
cloudAssembly.max_width = 600.0 * mult; |
| 390 |
cloudAssembly.min_height = 400.0 * mult; |
| 391 |
cloudAssembly.max_height = 600.0 * mult; |
| 392 |
cloudAssembly.min_cloud_width = 1000 * mult * mult; |
| 393 |
cloudAssembly.min_cloud_height = 1000 * mult * mult; |
| 394 |
cloudAssembly.z_scale = 0.8; |
| 395 |
|
| 396 |
#signal that new routines are used |
| 397 |
path = "new"; |
| 398 |
} |
| 399 |
|
| 400 |
else if (type == "Stratus (structured)"){ |
| 401 |
|
| 402 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 403 |
|
| 404 |
var mult = 1.0; |
| 405 |
if (subtype == "small") {mult = 0.7;} |
| 406 |
else {mult = 1.0;} |
| 407 |
|
| 408 |
# characterize the basic texture sheet |
| 409 |
cloudAssembly.texture_sheet = "/Models/Weather/altocumulus_sheet1.rgb"; |
| 410 |
cloudAssembly.num_tex_x = 3; |
| 411 |
cloudAssembly.num_tex_y = 3; |
| 412 |
|
| 413 |
#characterize the cloud |
| 414 |
cloudAssembly.bottom_shade = 0.4; |
| 415 |
# cloudAssembly.n_sprites = 25; |
| 416 |
cloudAssembly.n_sprites = 12; |
| 417 |
cloudAssembly.min_width = 1700.0 * mult; |
| 418 |
cloudAssembly.max_width = 2500.0 * mult; |
| 419 |
cloudAssembly.min_height = 1700.0 * mult; |
| 420 |
cloudAssembly.max_height = 2500.0 * mult; |
| 421 |
cloudAssembly.min_cloud_width = 3200.0 * mult * mult; |
| 422 |
cloudAssembly.min_cloud_height = 500.0 * mult * mult + cloudAssembly.max_height; |
| 423 |
cloudAssembly.z_scale = 0.3; |
| 424 |
|
| 425 |
#signal that new routines are used |
| 426 |
path = "new"; |
| 427 |
} |
| 428 |
|
| 429 |
else if (type == "Stratus structured CS"){ |
| 430 |
|
| 431 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 432 |
|
| 433 |
var mult = 1.0; |
| 434 |
|
| 435 |
mult = mult * local_weather.cloud_size_scale; |
| 436 |
|
| 437 |
# characterize the basic texture sheet |
| 438 |
cloudAssembly.texture_sheet = "/Models/Weather/altocumulus_sheet1.rgb"; |
| 439 |
cloudAssembly.num_tex_x = 3; |
| 440 |
cloudAssembly.num_tex_y = 3; |
| 441 |
|
| 442 |
#characterize the cloud |
| 443 |
cloudAssembly.bottom_shade = 0.4; |
| 444 |
cloudAssembly.n_sprites = 6; |
| 445 |
cloudAssembly.min_width = 1000.0 * mult; |
| 446 |
cloudAssembly.max_width = 1000.0 * mult; |
| 447 |
cloudAssembly.min_height = 1000.0 * mult; |
| 448 |
cloudAssembly.max_height = 1000.0 * mult; |
| 449 |
cloudAssembly.min_cloud_width = 1305 * mult; |
| 450 |
cloudAssembly.min_cloud_height = 1305.0 * mult; |
| 451 |
cloudAssembly.z_scale = 0.3; |
| 452 |
|
| 453 |
#signal that new routines are used |
| 454 |
path = "new"; |
| 455 |
} |
| 456 |
|
| 457 |
else if (type == "Altocumulus perlucidus"){ |
| 458 |
|
| 459 |
# new code |
| 460 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 461 |
|
| 462 |
var mult = 1.0; |
| 463 |
if (subtype == "small") {mult = 0.7;} |
| 464 |
else if (subtype == "huge") {mult = 1.5;} |
| 465 |
|
| 466 |
# characterize the basic texture sheet |
| 467 |
cloudAssembly.texture_sheet = "/Models/Weather/altocumulus_sheet1.rgb"; |
| 468 |
cloudAssembly.num_tex_x = 3; |
| 469 |
cloudAssembly.num_tex_y = 3; |
| 470 |
|
| 471 |
#characterize the cloud |
| 472 |
cloudAssembly.bottom_shade = 0.7; |
| 473 |
cloudAssembly.n_sprites = 25; |
| 474 |
cloudAssembly.min_width = 1700.0 * mult; |
| 475 |
cloudAssembly.max_width = 2500.0 * mult; |
| 476 |
cloudAssembly.min_height = 1700.0 * mult; |
| 477 |
cloudAssembly.max_height = 2500.0 * mult; |
| 478 |
cloudAssembly.min_cloud_width = 3200.0 * mult * mult; |
| 479 |
cloudAssembly.min_cloud_height = 500.0 * mult * mult + cloudAssembly.max_height; |
| 480 |
cloudAssembly.z_scale = 0.2; |
| 481 |
|
| 482 |
#signal that new routines are used |
| 483 |
path = "new"; |
| 484 |
} |
| 485 |
else if ((type == "Cumulonimbus") or (type == "Cumulonimbus (rain)")) { |
| 486 |
if (subtype == "small") { |
| 487 |
if (rn > 0.5) {path = "Models/Weather/cumulonimbus_small1.xml";} |
| 488 |
else {path = "Models/Weather/cumulonimbus_small2.xml";} |
| 489 |
} |
| 490 |
else if (subtype == "large") { |
| 491 |
if (rn > 0.5) {path = "Models/Weather/cumulonimbus_small1.xml";} |
| 492 |
else {path = "Models/Weather/cumulonimbus_small2.xml";} |
| 493 |
} |
| 494 |
} |
| 495 |
else if (type == "Cirrus") { |
| 496 |
if (subtype == "large") { |
| 497 |
if (rn > 0.916) {path = "Models/Weather/cirrus1.xml";} |
| 498 |
else if (rn > 0.833) {path = "Models/Weather/cirrus2.xml";} |
| 499 |
else if (rn > 0.75) {path = "Models/Weather/cirrus3.xml";} |
| 500 |
else if (rn > 0.666) {path = "Models/Weather/cirrus4.xml";} |
| 501 |
else if (rn > 0.583) {path = "Models/Weather/cirrus5.xml";} |
| 502 |
else if (rn > 0.500) {path = "Models/Weather/cirrus6.xml";} |
| 503 |
else if (rn > 0.416) {path = "Models/Weather/cirrus7.xml";} |
| 504 |
else if (rn > 0.333) {path = "Models/Weather/cirrus8.xml";} |
| 505 |
else if (rn > 0.250) {path = "Models/Weather/cirrus9.xml";} |
| 506 |
else if (rn > 0.166) {path = "Models/Weather/cirrus10.xml";} |
| 507 |
else if (rn > 0.083) {path = "Models/Weather/cirrus11.xml";} |
| 508 |
else {path = "Models/Weather/cirrus12.xml";} |
| 509 |
} |
| 510 |
else if (subtype == "small") { |
| 511 |
if (rn > 0.75) {path = "Models/Weather/cirrus_amorphous1.xml";} |
| 512 |
else if (rn > 0.5) {path = "Models/Weather/cirrus_amorphous2.xml";} |
| 513 |
else if (rn > 0.25) {path = "Models/Weather/cirrus_amorphous3.xml";} |
| 514 |
else {path = "Models/Weather/cirrus_amorphous4.xml";} |
| 515 |
} |
| 516 |
} |
| 517 |
else if (type == "Cirrocumulus") { |
| 518 |
if (subtype == "small") { |
| 519 |
if (rn > 0.5) {path = "Models/Weather/cirrocumulus1.xml";} |
| 520 |
else {path = "Models/Weather/cirrocumulus2.xml";} |
| 521 |
} |
| 522 |
else if (subtype == "large") { |
| 523 |
if (rn > 0.875) {path = "Models/Weather/cirrocumulus1.xml";} |
| 524 |
else if (rn > 0.750){path = "Models/Weather/cirrocumulus4.xml";} |
| 525 |
else if (rn > 0.625){path = "Models/Weather/cirrocumulus5.xml";} |
| 526 |
else if (rn > 0.500){path = "Models/Weather/cirrocumulus6.xml";} |
| 527 |
else if (rn > 0.385){path = "Models/Weather/cirrocumulus7.xml";} |
| 528 |
else if (rn > 0.250){path = "Models/Weather/cirrocumulus8.xml";} |
| 529 |
else if (rn > 0.125){path = "Models/Weather/cirrocumulus9.xml";} |
| 530 |
else {path = "Models/Weather/cirrocumulus10.xml";} |
| 531 |
} |
| 532 |
} |
| 533 |
else if (type=="Noctilucent") { |
| 534 |
if (rn>0.75) {path = "Models/Weather/noctilucent7.xml";} |
| 535 |
else if (rn > 0.5) {path = "Models/Weather/noctilucent8.xml";} |
| 536 |
else if (rn > 0.25) {path = "Models/Weather/noctilucent9.xml";} |
| 537 |
else {path = "Models/Weather/noctilucent10.xml";} |
| 538 |
} |
| 539 |
else if (type=="Impostor sheet") { |
| 540 |
if (subtype=="Nimbus") { |
| 541 |
if (rn>0.0) {path = "Models/Weather/impostor_nimbus.xml";} |
| 542 |
} |
| 543 |
else if (subtype=="broken") { |
| 544 |
if (rn>0.5) {path = "Models/Weather/impostor_broken1.xml";} |
| 545 |
else if (rn>0.0) {path = "Models/Weather/impostor_broken2.xml";} |
| 546 |
} |
| 547 |
else if (subtype=="scattered") { |
| 548 |
if (rn>0.6) {path = "Models/Weather/impostor_scattered1.xml";} |
| 549 |
else if (rn>0.4) {path = "Models/Weather/impostor_scattered2.xml";} |
| 550 |
else if (rn > 0.2) {path = "Models/Weather/impostor_few1.xml";} |
| 551 |
else {path = "Models/Weather/impostor_few2.xml";} |
| 552 |
} |
| 553 |
else if (subtype=="few") { |
| 554 |
if (rn>0.7) {path = "Models/Weather/impostor_few1.xml";} |
| 555 |
else if (rn>0.4) {path = "Models/Weather/impostor_few2.xml";} |
| 556 |
else if (rn>0.3) {path = "Models/Weather/impostor_scattered2.xml";} |
| 557 |
else {path = "void";} |
| 558 |
} |
| 559 |
} |
| 560 |
else if (type == "Cirrocumulus (cloudlet)") { |
| 561 |
|
| 562 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 563 |
|
| 564 |
var mult = 1.0; |
| 565 |
if (subtype == "small") {mult = 0.6;} |
| 566 |
else if (subtype == "huge") {mult = 1.5;} |
| 567 |
|
| 568 |
# characterize the basic texture sheet |
| 569 |
cloudAssembly.texture_sheet = "/Models/Weather/cirrocumulus_sheet1.rgb"; |
| 570 |
cloudAssembly.num_tex_x = 3; |
| 571 |
cloudAssembly.num_tex_y = 3; |
| 572 |
|
| 573 |
#characterize the cloud |
| 574 |
cloudAssembly.bottom_shade = 1.0; |
| 575 |
cloudAssembly.n_sprites = 8; |
| 576 |
cloudAssembly.min_width = 700.0 * mult; |
| 577 |
cloudAssembly.max_width = 1200.0 * mult; |
| 578 |
cloudAssembly.min_height = 700.0 * mult; |
| 579 |
cloudAssembly.max_height = 1200.0 * mult; |
| 580 |
cloudAssembly.min_cloud_width = 1500.0; |
| 581 |
cloudAssembly.min_cloud_height = 1300.0 * mult; |
| 582 |
cloudAssembly.z_scale = 0.3; |
| 583 |
|
| 584 |
path = "new"; |
| 585 |
} |
| 586 |
else if (type == "Cirrocumulus (new)") { |
| 587 |
|
| 588 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 589 |
|
| 590 |
var mult = 1.0; |
| 591 |
if (subtype == "small") {mult = 0.7;} |
| 592 |
else {mult = 1.3;} |
| 593 |
|
| 594 |
# characterize the basic texture sheet |
| 595 |
cloudAssembly.texture_sheet = "/Models/Weather/cirrocumulus_sheet1.rgb"; |
| 596 |
cloudAssembly.num_tex_x = 3; |
| 597 |
cloudAssembly.num_tex_y = 3; |
| 598 |
|
| 599 |
#characterize the cloud |
| 600 |
cloudAssembly.bottom_shade = 1.0; |
| 601 |
cloudAssembly.n_sprites = 2; |
| 602 |
cloudAssembly.min_width = 200.0 * mult; |
| 603 |
cloudAssembly.max_width = 300.0 * mult; |
| 604 |
cloudAssembly.min_height = 200.0 * mult; |
| 605 |
cloudAssembly.max_height = 300.0 * mult; |
| 606 |
cloudAssembly.min_cloud_width = 400.0 * mult; |
| 607 |
cloudAssembly.min_cloud_height = 400.0 * mult; |
| 608 |
cloudAssembly.z_scale = 0.5; |
| 609 |
|
| 610 |
#signal that new routines are used |
| 611 |
path = "new"; |
| 612 |
} |
| 613 |
|
| 614 |
else if (type == "Fogpatch") { |
| 615 |
|
| 616 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 617 |
|
| 618 |
var mult = 1.0; |
| 619 |
if (subtype == "small") {mult = 0.7;} |
| 620 |
else {mult = 1.0;} |
| 621 |
|
| 622 |
mult = mult * local_weather.cloud_size_scale; |
| 623 |
|
| 624 |
# characterize the basic texture sheet |
| 625 |
cloudAssembly.texture_sheet = "/Models/Weather/fogpatch_sheet1.rgb"; |
| 626 |
cloudAssembly.num_tex_x = 1; |
| 627 |
cloudAssembly.num_tex_y = 1; |
| 628 |
|
| 629 |
#characterize the cloud |
| 630 |
cloudAssembly.bottom_shade = 1.0; |
| 631 |
cloudAssembly.n_sprites = 1; |
| 632 |
cloudAssembly.min_width = 300.0 * mult; |
| 633 |
cloudAssembly.max_width = 300.0 * mult; |
| 634 |
cloudAssembly.min_height = 300.0 * mult; |
| 635 |
cloudAssembly.max_height = 300.0 * mult; |
| 636 |
cloudAssembly.min_cloud_width = 305.0 * mult; |
| 637 |
cloudAssembly.min_cloud_height = 305.0 * mult; |
| 638 |
cloudAssembly.z_scale = 0.5; |
| 639 |
|
| 640 |
#signal that new routines are used |
| 641 |
path = "new"; |
| 642 |
} |
| 643 |
|
| 644 |
else if (type == "Nimbus") { |
| 645 |
|
| 646 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 647 |
|
| 648 |
var mult = 1.0; |
| 649 |
if (subtype == "small") {mult = 0.7;} |
| 650 |
else {mult = 1.0;} |
| 651 |
|
| 652 |
# characterize the basic texture sheet |
| 653 |
cloudAssembly.texture_sheet = "/Models/Weather/nimbus_sheet1.rgb"; |
| 654 |
cloudAssembly.num_tex_x = 2; |
| 655 |
cloudAssembly.num_tex_y = 3; |
| 656 |
|
| 657 |
#characterize the cloud |
| 658 |
cloudAssembly.bottom_shade = 0.6; |
| 659 |
#cloudAssembly.n_sprites = 10; |
| 660 |
cloudAssembly.n_sprites = 5; |
| 661 |
cloudAssembly.min_width = 2700.0 * mult; |
| 662 |
cloudAssembly.max_width = 3000.0 * mult; |
| 663 |
cloudAssembly.min_height = 2700.0 * mult; |
| 664 |
cloudAssembly.max_height = 3000.0 * mult; |
| 665 |
cloudAssembly.min_cloud_width = 3500.0 * mult; |
| 666 |
cloudAssembly.min_cloud_height = 3200.0 * mult; |
| 667 |
cloudAssembly.z_scale = 0.4; |
| 668 |
cloudAssembly.tracer_flag = 1; |
| 669 |
|
| 670 |
#signal that new routines are used |
| 671 |
path = "new"; |
| 672 |
} |
| 673 |
else if (type == "Stratus") { |
| 674 |
|
| 675 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 676 |
|
| 677 |
var mult = 1.0; |
| 678 |
if (subtype == "small") |
| 679 |
{ |
| 680 |
mult = 0.8; |
| 681 |
cloudAssembly.texture_sheet = "/Models/Weather/cirrocumulus_sheet1.rgb"; |
| 682 |
cloudAssembly.num_tex_x = 3; |
| 683 |
cloudAssembly.num_tex_y = 3; |
| 684 |
cloudAssembly.n_sprites = 10; |
| 685 |
cloudAssembly.z_scale = 0.6; |
| 686 |
} |
| 687 |
else |
| 688 |
{ |
| 689 |
mult = 1.0; |
| 690 |
cloudAssembly.texture_sheet = "/Models/Weather/stratus_sheet1.rgb"; |
| 691 |
cloudAssembly.num_tex_x = 3; |
| 692 |
cloudAssembly.num_tex_y = 2; |
| 693 |
#cloudAssembly.n_sprites = 10; |
| 694 |
cloudAssembly.n_sprites = 6; |
| 695 |
cloudAssembly.z_scale = 0.4; |
| 696 |
} |
| 697 |
|
| 698 |
#characterize the cloud |
| 699 |
cloudAssembly.bottom_shade = 0.4; |
| 700 |
cloudAssembly.min_width = 2000.0 * mult; |
| 701 |
cloudAssembly.max_width = 2500.0 * mult; |
| 702 |
cloudAssembly.min_height = 2000.0 * mult; |
| 703 |
cloudAssembly.max_height = 2500.0 * mult; |
| 704 |
cloudAssembly.min_cloud_width = 5000.0; |
| 705 |
cloudAssembly.min_cloud_height = 2600 * mult; #1.1 * cloudAssembly.max_height; |
| 706 |
|
| 707 |
|
| 708 |
#signal that new routines are used |
| 709 |
path = "new"; |
| 710 |
|
| 711 |
} |
| 712 |
else if (type == "Stratus (thin)") { |
| 713 |
|
| 714 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 715 |
|
| 716 |
var mult = 1.0; |
| 717 |
if (subtype == "small") |
| 718 |
{ |
| 719 |
mult = 0.5; |
| 720 |
cloudAssembly.texture_sheet = "/Models/Weather/cirrocumulus_sheet1.rgb"; |
| 721 |
cloudAssembly.num_tex_x = 3; |
| 722 |
cloudAssembly.num_tex_y = 3; |
| 723 |
# cloudAssembly.n_sprites = 20; |
| 724 |
cloudAssembly.n_sprites = 10; |
| 725 |
cloudAssembly.z_scale = 0.4; |
| 726 |
} |
| 727 |
else |
| 728 |
{ |
| 729 |
mult = 1.0; |
| 730 |
cloudAssembly.texture_sheet = "/Models/Weather/stratus_sheet1.rgb"; |
| 731 |
cloudAssembly.num_tex_x = 3; |
| 732 |
cloudAssembly.num_tex_y = 2; |
| 733 |
# cloudAssembly.n_sprites = 10; |
| 734 |
cloudAssembly.n_sprites = 6; |
| 735 |
cloudAssembly.z_scale = 0.3; |
| 736 |
} |
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
#characterize the cloud |
| 741 |
cloudAssembly.bottom_shade = 0.8; |
| 742 |
cloudAssembly.min_width = 1900.0 * mult; |
| 743 |
cloudAssembly.max_width = 2400.0 * mult; |
| 744 |
cloudAssembly.min_height = 1900.0 * mult; |
| 745 |
cloudAssembly.max_height = 2400.0 * mult; |
| 746 |
cloudAssembly.min_cloud_width = 4200.0; |
| 747 |
cloudAssembly.min_cloud_height = 2500.0 * mult; |
| 748 |
|
| 749 |
|
| 750 |
#signal that new routines are used |
| 751 |
path = "new"; |
| 752 |
|
| 753 |
|
| 754 |
} |
| 755 |
else if (type == "Cirrostratus") { |
| 756 |
|
| 757 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 758 |
|
| 759 |
var mult = 1.0; |
| 760 |
if (subtype == "small") {mult = 0.7;} |
| 761 |
else {mult = 1.0;} |
| 762 |
|
| 763 |
# characterize the basic texture sheet |
| 764 |
cloudAssembly.texture_sheet = "/Models/Weather/cirrostratus_sheet1.rgb"; |
| 765 |
cloudAssembly.num_tex_x = 2; |
| 766 |
cloudAssembly.num_tex_y = 2; |
| 767 |
|
| 768 |
#characterize the cloud |
| 769 |
cloudAssembly.bottom_shade = 1.0; |
| 770 |
cloudAssembly.n_sprites = 4; |
| 771 |
cloudAssembly.min_width = 3500.0 * mult; |
| 772 |
cloudAssembly.max_width = 4000.0 * mult; |
| 773 |
cloudAssembly.min_height = 3500.0 * mult; |
| 774 |
cloudAssembly.max_height = 4000.0 * mult; |
| 775 |
cloudAssembly.min_cloud_width = 8000.0; |
| 776 |
cloudAssembly.min_cloud_height = 50.0; |
| 777 |
cloudAssembly.z_scale = 0.3; |
| 778 |
|
| 779 |
#signal that new routines are used |
| 780 |
path = "new"; |
| 781 |
|
| 782 |
} |
| 783 |
else if (type == "Cirrostratus (small)") { |
| 784 |
|
| 785 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 786 |
|
| 787 |
var mult = 1.0; |
| 788 |
if (subtype == "small") {mult = 0.45;} |
| 789 |
else {mult = 0.7;} |
| 790 |
|
| 791 |
# characterize the basic texture sheet |
| 792 |
cloudAssembly.texture_sheet = "/Models/Weather/cirrostratus_sheet1.rgb"; |
| 793 |
cloudAssembly.num_tex_x = 2; |
| 794 |
cloudAssembly.num_tex_y = 2; |
| 795 |
|
| 796 |
#characterize the cloud |
| 797 |
cloudAssembly.bottom_shade = 1.0; |
| 798 |
cloudAssembly.n_sprites = 2; |
| 799 |
cloudAssembly.min_width = 3500.0 * mult; |
| 800 |
cloudAssembly.max_width = 4000.0 * mult; |
| 801 |
cloudAssembly.min_height = 3500.0 * mult; |
| 802 |
cloudAssembly.max_height = 4000.0 * mult; |
| 803 |
cloudAssembly.min_cloud_width = 4500.0 * mult; |
| 804 |
cloudAssembly.min_cloud_height = 4500.0 * mult; |
| 805 |
cloudAssembly.z_scale = 0.5; |
| 806 |
|
| 807 |
#signal that new routines are used |
| 808 |
path = "new"; |
| 809 |
|
| 810 |
} |
| 811 |
|
| 812 |
else if (type == "Fog (thin)") { |
| 813 |
if (subtype == "small") { |
| 814 |
if (rn > 0.8) {path = "Models/Weather/stratus_thin1.xml";} |
| 815 |
else if (rn > 0.6) {path = "Models/Weather/stratus_thin2.xml";} |
| 816 |
else if (rn > 0.4) {path = "Models/Weather/stratus_thin3.xml";} |
| 817 |
else if (rn > 0.2) {path = "Models/Weather/stratus_thin4.xml";} |
| 818 |
else {path = "Models/Weather/stratus_thin5.xml";} |
| 819 |
} |
| 820 |
else if (subtype == "large") { |
| 821 |
if (rn > 0.8) {path = "Models/Weather/stratus_thin1.xml";} |
| 822 |
else if (rn > 0.6) {path = "Models/Weather/stratus_thin2.xml";} |
| 823 |
else if (rn > 0.4) {path = "Models/Weather/stratus_thin3.xml";} |
| 824 |
else if (rn > 0.2) {path = "Models/Weather/stratus_thin4.xml";} |
| 825 |
else {path = "Models/Weather/stratus_thin5.xml";} |
| 826 |
} |
| 827 |
} |
| 828 |
else if (type == "Fog (thick)") { |
| 829 |
|
| 830 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 831 |
|
| 832 |
var mult = 1.0; |
| 833 |
if (subtype == "small") |
| 834 |
{ |
| 835 |
mult = 0.8; |
| 836 |
cloudAssembly.texture_sheet = "/Models/Weather/stratus_sheet1.rgb"; |
| 837 |
cloudAssembly.num_tex_x = 3; |
| 838 |
cloudAssembly.num_tex_y = 2; |
| 839 |
cloudAssembly.n_sprites = 5; |
| 840 |
cloudAssembly.z_scale = 1.0; |
| 841 |
} |
| 842 |
else |
| 843 |
{ |
| 844 |
mult = 1.0; |
| 845 |
cloudAssembly.texture_sheet = "/Models/Weather/stratus_sheet1.rgb"; |
| 846 |
cloudAssembly.num_tex_x = 3; |
| 847 |
cloudAssembly.num_tex_y = 2; |
| 848 |
cloudAssembly.n_sprites = 5; |
| 849 |
cloudAssembly.z_scale = 1.0; |
| 850 |
} |
| 851 |
|
| 852 |
#characterize the cloud |
| 853 |
cloudAssembly.bottom_shade = 0.4; |
| 854 |
cloudAssembly.min_width = 2000.0 * mult; |
| 855 |
cloudAssembly.max_width = 2500.0 * mult; |
| 856 |
cloudAssembly.min_height = 2000.0 * mult; |
| 857 |
cloudAssembly.max_height = 2500.0 * mult; |
| 858 |
cloudAssembly.min_cloud_width = 5000.0; |
| 859 |
cloudAssembly.min_cloud_height = 1.1 * cloudAssembly.max_height; |
| 860 |
|
| 861 |
|
| 862 |
#signal that new routines are used |
| 863 |
path = "new"; |
| 864 |
} |
| 865 |
else if (type == "Test") {path="Models/Weather/single_cloud.xml";} |
| 866 |
else if (type == "Box_test") { |
| 867 |
if (subtype == "standard") { |
| 868 |
if (rn > 0.8) {path = "Models/Weather/cloudbox1.xml";} |
| 869 |
else if (rn > 0.6) {path = "Models/Weather/cloudbox2.xml";} |
| 870 |
else if (rn > 0.4) {path = "Models/Weather/cloudbox3.xml";} |
| 871 |
else if (rn > 0.2) {path = "Models/Weather/cloudbox4.xml";} |
| 872 |
else {path = "Models/Weather/cloudbox5.xml";} |
| 873 |
} |
| 874 |
else if (subtype == "core") { |
| 875 |
if (rn > 0.8) {path = "Models/Weather/cloudbox_core1.xml";} |
| 876 |
else if (rn > 0.6) {path = "Models/Weather/cloudbox_core2.xml";} |
| 877 |
else if (rn > 0.4) {path = "Models/Weather/cloudbox_core3.xml";} |
| 878 |
else if (rn > 0.2) {path = "Models/Weather/cloudbox_core4.xml";} |
| 879 |
else {path = "Models/Weather/cloudbox_core5.xml";} |
| 880 |
} |
| 881 |
else if (subtype == "bottom") { |
| 882 |
if (rn > 0.66) {path = "Models/Weather/cloudbox_bottom1.xml";} |
| 883 |
else if (rn > 0.33) {path = "Models/Weather/cloudbox_bottom2.xml";} |
| 884 |
else if (rn > 0.0) {path = "Models/Weather/cloudbox_bottom3.xml";} |
| 885 |
} |
| 886 |
} |
| 887 |
else if (type == "Cb_box") { |
| 888 |
|
| 889 |
cloudAssembly = local_weather.cloud.new(type, subtype); |
| 890 |
|
| 891 |
if (subtype == "standard") |
| 892 |
{ |
| 893 |
if (rand() > 0.5) # use a Congestus texture |
| 894 |
{ |
| 895 |
|
| 896 |
if (rand() > 0.5) |
| 897 |
{ |
| 898 |
cloudAssembly.texture_sheet = "/Models/Weather/congestus_sheet1.rgb"; |
| 899 |
cloudAssembly.num_tex_x = 1; |
| 900 |
cloudAssembly.num_tex_y = 3; |
| 901 |
cloudAssembly.min_width = 1300.0; |
| 902 |
cloudAssembly.max_width = 2000.0; |
| 903 |
cloudAssembly.min_height = 600.0; |
| 904 |
cloudAssembly.max_height = 900.0; |
| 905 |
} |
| 906 |
else |
| 907 |
{ |
| 908 |
cloudAssembly.texture_sheet = "/Models/Weather/congestus_sheet2.rgb"; |
| 909 |
cloudAssembly.num_tex_x = 1; |
| 910 |
cloudAssembly.num_tex_y = 2; |
| 911 |
cloudAssembly.min_width = 1200.0; |
| 912 |
cloudAssembly.max_width = 1800.0; |
| 913 |
cloudAssembly.min_height = 700.0; |
| 914 |
cloudAssembly.max_height = 1000.0; |
| 915 |
} |
| 916 |
|
| 917 |
cloudAssembly.n_sprites = 3; |
| 918 |
cloudAssembly.min_cloud_width = 2200.0; |
| 919 |
cloudAssembly.min_cloud_height = 1200.0; |
| 920 |
cloudAssembly.bottom_shade = 0.6; |
| 921 |
cloudAssembly.z_scale = 1.0; |
| 922 |
} |
| 923 |
else |
| 924 |
{ |
| 925 |
# characterize the basic texture sheet |
| 926 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulonimbus_sheet2.rgb"; |
| 927 |
cloudAssembly.num_tex_x = 2; |
| 928 |
cloudAssembly.num_tex_y = 2; |
| 929 |
|
| 930 |
#characterize the cloud |
| 931 |
cloudAssembly.bottom_shade = 0.6; |
| 932 |
cloudAssembly.n_sprites = 6; |
| 933 |
cloudAssembly.min_width = 800.0; |
| 934 |
cloudAssembly.max_width = 1100.0; |
| 935 |
cloudAssembly.min_height = 800.0; |
| 936 |
cloudAssembly.max_height = 1100.0; |
| 937 |
cloudAssembly.min_cloud_width = 3000.0; |
| 938 |
cloudAssembly.min_cloud_height = 1500.0; |
| 939 |
cloudAssembly.z_scale = 1.0; |
| 940 |
|
| 941 |
|
| 942 |
} |
| 943 |
} |
| 944 |
else if (subtype == "core") |
| 945 |
{ |
| 946 |
# characterize the basic texture sheet |
| 947 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulonimbus_sheet1.rgb"; |
| 948 |
cloudAssembly.num_tex_x = 2; |
| 949 |
cloudAssembly.num_tex_y = 2; |
| 950 |
|
| 951 |
#characterize the cloud |
| 952 |
cloudAssembly.bottom_shade = 0.6; |
| 953 |
cloudAssembly.n_sprites = 20; |
| 954 |
cloudAssembly.min_width = 1000.0; |
| 955 |
cloudAssembly.max_width = 1500.0; |
| 956 |
cloudAssembly.min_height = 1000.0; |
| 957 |
cloudAssembly.max_height = 1500.0 ; |
| 958 |
cloudAssembly.min_cloud_width = 3500.0; |
| 959 |
cloudAssembly.min_cloud_height = 2000.0; |
| 960 |
cloudAssembly.z_scale = 1.0; |
| 961 |
} |
| 962 |
else if (subtype == "bottom") |
| 963 |
{ |
| 964 |
cloudAssembly.texture_sheet = "/Models/Weather/cumulus_bottom_sheet1.rgb"; |
| 965 |
cloudAssembly.num_tex_x = 1; |
| 966 |
cloudAssembly.num_tex_y = 1; |
| 967 |
|
| 968 |
#characterize the cloud |
| 969 |
cloudAssembly.bottom_shade = 0.4; |
| 970 |
cloudAssembly.n_sprites = 4; |
| 971 |
cloudAssembly.min_width = 1100.0; |
| 972 |
cloudAssembly.max_width = 1400.0; |
| 973 |
cloudAssembly.min_height = 1100.0; |
| 974 |
cloudAssembly.max_height = 1400.0; |
| 975 |
cloudAssembly.min_cloud_width = 1600; |
| 976 |
cloudAssembly.min_cloud_height = 1200; |
| 977 |
cloudAssembly.z_scale = 0.4; |
| 978 |
|
| 979 |
} |
| 980 |
|
| 981 |
#signal that new routines are used |
| 982 |
path = "new"; |
| 983 |
|
| 984 |
|
| 985 |
} |
| 986 |
|
| 987 |
|
| 988 |
else {print("Cloud type ", type, " subtype ",subtype, " not available!");} |
| 989 |
|
| 990 |
return path; |
| 991 |
} |
| 992 |
|
| 993 |
# hash for assembling hard-coded clouds |
| 994 |
|
| 995 |
var cloudAssembly = {}; |
| 996 |
|