Changing textures over (real) time...

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Topic author
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 62
With us: 16 years 9 months
Location: The Netherlands

Changing textures over (real) time...

Post #1by Marco Klunder » 13.05.2010, 20:44

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
Marco Klunder
email: marco.klunder@xs4all.nl
Windows10 PD 3.0 GHz, 2 GB of RAM, Nvidia GeForce 6700 XL
Celestia161 / SVN + Lua Edu Tools v1.2 Beta9, Celestia160-ED and Celestia1621

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

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

Post #2by t00fri » 13.05.2010, 21:06

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.
Image

Avatar
Topic author
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 62
With us: 16 years 9 months
Location: The Netherlands

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

Post #3by Marco Klunder » 15.05.2010, 15:35

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
Marco Klunder
email: marco.klunder@xs4all.nl
Windows10 PD 3.0 GHz, 2 GB of RAM, Nvidia GeForce 6700 XL
Celestia161 / SVN + Lua Edu Tools v1.2 Beta9, Celestia160-ED and Celestia1621

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

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

Post #4by t00fri » 15.05.2010, 21:41

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
Image

CAP-Team
Posts: 194
Joined: 27.12.2006
Age: 49
With us: 17 years 10 months
Location: Vriezenveen, the Netherlands
Contact:

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

Post #5by CAP-Team » 18.05.2010, 21:13

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.
Windows 7 Ultimate x64, Intel Core i7 2600K 3.4 Ghz, 4 GB RAM, 120 GB SSD + 1 TB hdd, nVidia GTX460 1 GB, Celestia 1.6.0.xxxx
Download my latest SVN Build

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

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

Post #6by Fenerit » 19.05.2010, 00:18

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)
Never at rest.
Massimo

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 7 months
Location: Thyrrenian sea

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

Post #7by Fenerit » 22.05.2010, 00:49

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.*"
   #
   #
   #
}
Never at rest.
Massimo

Avatar
Topic author
Marco Klunder
Posts: 181
Joined: 20.02.2008
Age: 62
With us: 16 years 9 months
Location: The Netherlands

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

Post #8by Marco Klunder » 22.05.2010, 11:04

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
Marco Klunder
email: marco.klunder@xs4all.nl
Windows10 PD 3.0 GHz, 2 GB of RAM, Nvidia GeForce 6700 XL
Celestia161 / SVN + Lua Edu Tools v1.2 Beta9, Celestia160-ED and Celestia1621


Return to “Development”