Changing textures over (real) time...

The place to discuss creating, porting and modifying Celestia's source code.

Moderator: selden

Changing textures over (real) time...

Postby Marco Klunder » Thu May 13, 2010 1:44 pm

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@hccnet.nl
Windows7 Ultimate, PD 3.0 GHz, 2 GB of RAM, Nvidia GeForce 6700 XL
Celestia161 / SVN + Lua Edu Tools v1.2 Beta9 and Celestia160-ED
User avatar
Marco Klunder
 
Posts: 172
Joined: Wed Feb 20, 2008 1:10 am
Location: The Netherlands

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

Postby t00fri » Thu May 13, 2010 2:06 pm

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
User avatar
t00fri
 
Posts: 8782
Joined: Fri Mar 29, 2002 5:53 am
Location: Hamburg, Germany

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

Postby Marco Klunder » Sat May 15, 2010 8:35 am

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@hccnet.nl
Windows7 Ultimate, PD 3.0 GHz, 2 GB of RAM, Nvidia GeForce 6700 XL
Celestia161 / SVN + Lua Edu Tools v1.2 Beta9 and Celestia160-ED
User avatar
Marco Klunder
 
Posts: 172
Joined: Wed Feb 20, 2008 1:10 am
Location: The Netherlands

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

Postby t00fri » Sat May 15, 2010 2:41 pm

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
User avatar
t00fri
 
Posts: 8782
Joined: Fri Mar 29, 2002 5:53 am
Location: Hamburg, Germany

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

Postby CAP-Team » Tue May 18, 2010 2:13 pm

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
User avatar
CAP-Team
 
Posts: 194
Joined: Wed Dec 27, 2006 3:10 pm
Location: Vriezenveen, the Netherlands

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

Postby Fenerit » Tue May 18, 2010 5:18 pm

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

Mirror site
User avatar
Fenerit
 
Posts: 1793
Joined: Mon Mar 26, 2007 1:43 pm
Location: Tuscany, Thyrrenian sea

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

Postby Fenerit » Fri May 21, 2010 5:49 pm

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

Mirror site
User avatar
Fenerit
 
Posts: 1793
Joined: Mon Mar 26, 2007 1:43 pm
Location: Tuscany, Thyrrenian sea

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

Postby Marco Klunder » Sat May 22, 2010 4:04 am

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@hccnet.nl
Windows7 Ultimate, PD 3.0 GHz, 2 GB of RAM, Nvidia GeForce 6700 XL
Celestia161 / SVN + Lua Edu Tools v1.2 Beta9 and Celestia160-ED
User avatar
Marco Klunder
 
Posts: 172
Joined: Wed Feb 20, 2008 1:10 am
Location: The Netherlands


Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests