Fading between textures and skies

Blitz3D Forums/Blitz3D Beginners Area/Fading between textures and skies

Mike V(Posted 2004) [#1]
Howdy all...

Couple quick questions here..

I'm in the pre-production stages of a project here, looking at BB3D for the platform...

In any case, I'm looking to accomplish two things, both falling under a similar category:

1. Either a skybox or skydome that can be updated to transition between sunrise, midday, sunset, evening, etc. etc.

2. On top of that, I would like to have up to 2 or 3 layers for cloud cover that I can fade on or off and/or switch between cloud textures to simulate different weather effects.

How do-able is this with B3D with decent performance and, are there any examples out there of any form of this being accomplished?

Thanks much!
Mike


Jellon(Posted 2004) [#2]
I second that, sounds like a useful power.


Rimmsy(Posted 2004) [#3]
This is very do-able in blitz. Head on over to the gallery and have a look. Here's an example of a very nice sky with clouds:

(filax's landscape demo)

For a quick example, have a look in your samples directory:
Blitz3D\samples\Hi-Toro\Death Island

for good lookin', if dark and stormy scrolling clouds. Just use examples as a base. Have another look around the gallery and even at www.blitzcoder.com (when it's back up) for some other examples. I've seen plenty but can't remember where they are exactly.

Good luck and remember to share some screenies!


Mike V(Posted 2004) [#4]
Hmmm.. Okay, I don't think I explained that right..lol..

What I mean are two (technically 3 or 4) different elements..

You have a skydome which would contain a series of gradients simulating, for evening, morning, dusk, dawn, midday, etc.. and as a time of day system would clock out, you would gradually fade between these different gradients at given times.. evening time ones could have stars and the such...

The significance of the gradients are that you would set the distance fog to the same color as the fog at the horizon, which would create a very convincing effect.

Then... apart from those, you would have up to 3 different planes set up, any 1, 2 or 3 could, at any time, have an animated, scrolling texture for the clouds that could pan between light cover, heavy cover, etc. etc.. The lowest layer could be a dark, dense cover to simulate stormy skies and so forth..

The sun and moon would both be their own elements arcing overhead on a preset path and pace...

Basically, I'm going for a dynamic sky that is made up of individual elements that can be mixed and matched into different combinations.. set up ahead-of-time as presets, etc.

If you'd like to see some great examples of this in action, try and check out screenshots of Final Fantasy XI.. SE has done a *fantastic* job of creating very realistic skies and atmosphere in general in that game. It's basically the basis for my looking to do something similar via B3D, if possible.

Basically.. this would be an entire sub-system, but one that could be very useful and allow for some great results.


skn3(Posted 2004) [#5]
Well you can use 2 texture layers on your sky cube/sphere, and place the 2 you wish to fade in the 2 slots.. and adjust the alpha level.

That would give you your fade effect. Then simply create some planes, and texture them. It is doable, and easy with blitz.


Rimmsy(Posted 2004) [#6]
It's been done before. Quite well as well. I just can't remember where. Which isn't veryhelpful.


gpete(Posted 2004) [#7]
how about changing the alpha level of each layer texture....or just changing the scale or y-height of the skybox/sphere or sky plane? it should be easy to try differant combinations. I use a skysphere with a seamless cloud texture made in Paintshop 6 frequently. I have the skysphere set to rotate slowly. Filax`s demo is very nice indeed...the birds in it are interesting.


Mike V(Posted 2004) [#8]
Ya.. I think that just having 4 different sky gradients for the skydome to fade between (evening, dawn, day and dusk) would suffice. Perhaps a solid gray one would be good for when you want a thick, murky fog going on. Having at least 2 planes to use for cloud layers, high and low, with a few variations to fade between would offer alot of options.

Then having different sun sprites and different moon phase sprites to arc overhead would be great.

The slowly rotating sky sphere is a great idea, too. Heh... if you wanted to go really in depth with an RPG, you could actually set up constellations or star clusters and such that would come into view at certain times and coincide with certain events, etc..

Anyway.. glad to see it's doable.. I'd love to see the examples of where it's been used already.

Thanks!


big10p(Posted 2004) [#9]
how about changing the alpha level of each layer texture....

Um, how do you go about achieving this - there's no TextureAlpha command.


gpete(Posted 2004) [#10]
Big10...

once the textures assigned to the entity ( skybox, skysphere, plane ) the command to use is EntityAlpha and the range of zero(invisible) to 1(full on).


big10p(Posted 2004) [#11]
But that'll affect all the textures the same - I thought he was talking about changing the alpha of individual layers.


gpete(Posted 2004) [#12]
Each entity....it could be skylayer1, skylayer2, skylayer3 is a seperate object->

EntityAlpha skylayer1,.3

EntityAlpha skylayer2,.9

an entity with a low alpha becomes "see through" and the layers can be stacked at slightly differant Y heights.

Do you see?


big10p(Posted 2004) [#13]
Yes, of course I see how it's done when everything's separate entities. :)

Like I said, I thought you were talking about texture layers of a single entity. ;)


Mike V(Posted 2004) [#14]
Well, I *was*, in my inexperience and along the lines of a general concept, thinking along the lines of different textures being blended on a single entity.. Clearly that's not possible, so the way Gpete explained it sounds good enough for me if it achieves the same effect :-).

So you could do a real gradual fade.. or an incremental fade where the two layers would sorta "cross-fade" with each other? That could be pretty darn cool. I'd love to see that in action... hmmm...

Thanks!