Changing textures over (real) time...

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

Marco Klunder
Topic author
Avatar
Marco Klunder
Topic author
Age: 54
Posts: 180
With us: 9 years 5 months
Location: The Netherlands

#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@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

t00fri
Avatar
t00fri
Age: 15
Posts: 8800
With us: 15 years 3 months
Location: Hamburg, Germany

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

#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

Marco Klunder
Topic author
Avatar
Marco Klunder
Topic author
Age: 54
Posts: 180
With us: 9 years 5 months
Location: The Netherlands

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

#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@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

t00fri
Avatar
t00fri
Age: 15
Posts: 8800
With us: 15 years 3 months
Location: Hamburg, Germany

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

#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
CAP-Team
Age: 42
Posts: 195
With us: 10 years 6 months
Location: Vriezenveen, the Netherlands
ICQ

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

#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

Fenerit M
Avatar
Fenerit M
Posts: 1864
With us: 10 years 3 months
Location: Thyrrenian sea

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

#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

Fenerit M
Avatar
Fenerit M
Posts: 1864
With us: 10 years 3 months
Location: Thyrrenian sea

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

#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

Marco Klunder
Topic author
Avatar
Marco Klunder
Topic author
Age: 54
Posts: 180
With us: 9 years 5 months
Location: The Netherlands

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

#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@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


Return to “Development”

Who is online (over the past 5 minutes)

Users browsing this forum: 3 guests