Page 1 of 1

Changing textures over (real) time...

Posted: 13.05.2010, 20:44
by Marco Klunder
While reading thread http://www.shatters.net/forum/viewtopic.php?f=7&t=15908 about "Jupiter lost something", seeing a movie last week about the observations of the Sun (e.g. fluctuating Sunspot intensity in periods of 11 years), and seeing textures of Neptune with or without the Great Dark Spot, I was wondering would it be nice that for known, famous and scientific important changes on Celestial bodies over time, the textures used in Celestia could also automatically change in a certain way. :idea:

For instance the granulated features, and animated solar flares of the Sun (by Runar and Frank) are already a very good first step.
I must also say that I enormously appriciate the current available highly detailed maps of our terrestrial planets and some famous Moons. GREAT :D
Fortunately, those objects stay pretty stable over time, so keep on going all the good work here :!:

I was just wondering if changing feartures over (real) time somehow could be possible in Celestia and if it should be worth developing something like that in Celestia. By the way, also knowing this probably cost an enourmous lot work and time :| ... But let's bring up the idea and discuss here...

Marco

Re: Changing textures over (real) time...

Posted: 13.05.2010, 21:06
by t00fri
If you got enough space on your harddisk, you may use my F-Textools and my nmtools and -- quickly-- make 64k highest quality VT sets of Earth for EVERY MONTH of the year. The Next Generation BlueMarble (BMNG) textures of Earth are precisely available for the 12 months of the year in 64k "monster size" each... The interplay of snow and vegetation throughout the year in the north and south hemispheres is very pleasing to watch at such an enormous resolution.

I've done that, of course ;-)

Fridger

PS: My texture tools are available in our CelestialMatters site, as should be well known meanwhile.

Re: Changing textures over (real) time...

Posted: 15.05.2010, 15:35
by Marco Klunder
Hello Fridger,

You indeed mention another very famous change on celestial bodies: The influence of the seasons :!:
And yes, we can generate monster textures which are very fun to look at (as I already mentioned above :roll: )

But given the fact that I have enough diskspace :) , is there a possibility using your BMNG example and tools, to let the textures change automatically over time, so the presented texture is somehow linked to the Celestia simulation time. This also means that when pressing the [L] key a few times, we indeed see the BMNG textures change because of the season effect. In fact that is what I mean here, opening this thread. And of course, it should be wonderful to see in hires, but it is not the essention here.

E.G. take a normal resolution of a Sun texture and randomly add (automatically) some Sunspots over a period of 5,5 years and then remove them again in the next 5,5 years. Just to simulate that effect over time (according the real periods like 2001, 2012, ...), should be very nice I think...
But first of all, is it possible yet or can it be made possible or is it indeed part of your tools :?: After that, Add-on designers can make these simulations for different objects and different resolutions of cource.

Marco

Re: Changing textures over (real) time...

Posted: 15.05.2010, 21:41
by t00fri
Of course, Celestia is able to correlate events with its simulation time. We use this e.g. for satellites, space missions etc, all having a finite life time.

Like so in the ssc files:

Beginning 2441817 # 14 May 1973
Ending 2444066 # 11 Jul 1979

The less trivial point is to implement the annual periodicity in case of the 12 BMNG textures.
LUA scripting seems the best option, I suppose.

But you really need a lot of disk space ;-) . About 150 GB I would guess.
Making the 64k VT's with my tools takes < 30 minutes per texture set, including base texture, specular texture and normalmap, all 64k monster size. Notably including highest quality dxt5nm and dxt1 output for the normalmap and base texture VTs, respectively. The normalmap is of course the same for every month.

Fridger

Re: Changing textures over (real) time...

Posted: 18.05.2010, 21:13
by CAP-Team
Perhaps the timeline function could be implemented for recurring events like months, so you can switch textures according to this.

This way you could also create seasonal effects on mars, if the textures of Mars' seasons would be available.

And diskspace shouldn't be any problem today anymore, since 1 TB harddisks (and bigger) are available for 60 to 70 euros.

Re: Changing textures over (real) time...

Posted: 19.05.2010, 00:18
by Fenerit
Marco Klunder wrote:.
.
I was wondering would it be nice that for known, famous and scientific important changes on Celestial bodies over time, the textures used in Celestia could also automatically change in a certain way. :idea:
Marco

Marco, I've not tested yet, since I write this now, but the code below is similar to that with which I do change the lunar phases in the ephemerides plugin. Either make a "fake" plug-in or a celx script:

Code: Select all

function get_season(obs, t)
   local t = celestia:getobserver():gettime()
   local season_time = t
   local season_time = celestia:tdbtoutc(season_time)
   local season_time_m = season_time.month
   local season_time_d = season_time.day
      if season_time_m == 3 and season_time_d == 21 then
         celestia:getobserver():setsurface("spring")
      elseif season_time_m == 6 and season_time_d == 23 then
         celestia:getobserver():setsurface("summer")
         --
         --
      else
         --
         --
      end
end

get_season(obs, t)


then run such a script with the "runscript" method

Code: Select all

celestia:runscript("season.celx")
wait(0)

Re: Changing textures over (real) time...

Posted: 22.05.2010, 00:49
by Fenerit
For what is worth, the code below do cycle through textures

Code: Select all

function get_season(sel, t)
   local t = celestia:getobserver():gettime()
   local season_time = t
   local season_time = celestia:tdbtoutc(season_time)
   local season_time_m = season_time.month
   local season_time_d = season_time.day
   
   if season_time_m <= 3 and season_time_d <= 21 then
      celestia:getobserver():setsurface("winter")
   elseif season_time_m <= 6 and season_time_d <= 23 then
      celestia:getobserver():setsurface("spring")
   elseif season_time_m <= 9 and season_time_d <= 23 then
      celestia:getobserver():setsurface("summer")
    elseif season_time_m <= 12 and season_time_d <= 23 then
        celestia:getobserver():setsurface("autumn")
   else   
      celestia:getobserver():setsurface("winter")
   end
end

get_season(sel, t)


The strings below must be added to the start.celx for automatizing and the season.celx be placed where the start.celx is

Code: Select all

celestia:runscript("season.celx")
wait(0)


While the structure of the altsurface "season.ssc":

Code: Select all

AltSurface "winter" "Sol/Earth"
{
   Texture "winter.*"
   #
   #
   #
}
AltSurface "spring" "Sol/Earth"
{
   Texture "spring.*"
   #
   #
   #
}
AltSurface "summer" "Sol/Earth"
{
   Texture "summer.*"
   #
   #
   #
}
AltSurface "autumn" "Sol/Earth"
{
   Texture "autumn.*"
   #
   #
   #
}

Re: Changing textures over (real) time...

Posted: 22.05.2010, 11:04
by Marco Klunder
Fenerit wrote:For what is worth
Yes, it is worth. Thanks.
This is basically the outcome of this thread on how to manage cyclic changing textures.
The other (less repetative) is the Beginning and Ending parapeters in the ssc files.

Marco