Image overlay in Celestia

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Topic author
Alexell M
Site Admin
Posts: 302
Joined: 07.10.2010
Age: 26
With us: 9 years 7 months
Location: Moscow, Russia
Contact:

Image overlay in Celestia

Post #1by Alexell » 04.03.2017, 15:32

At the time, Vincent Giangiulio made many code patches for Celestia, one of them was made to display BMP, JPG or PNG images in Celestia using CEL/CELX scenarios.
Supported image scaling, setting transparency and positioning.

I believe that to add this for scripts in Celestia 1.7.0 is a good idea, but I want to hear the views of other Celestia users.

Added after 2 minutes:
CELX:

Code: Select all

celestia:overlay (float [duration], float [xoffset], float [yoffset], float [alpha], str [filename], int [fitscreen])


CEL:

Code: Select all

overlay (duration [float] xoffset [float] yoffset [float] alpha [float] filename [str] fitscreen [int])


Added after 3 minutes 39 seconds:
https://github.com/CelestiaProject/Celestia/issues/9
Admin of celestia.space
PC: Intel Core i7-8700 @ 3.20GHz, SSD, 16 Gb RAM, NVIDIA GeForce GTX 1080, Creative Sound Blaster ZxR. Windows 10 x64.
Phone: iPhone 7 Plus 128 Gb. iOS 11.
Image

john71
Posts: 481
Joined: 10.08.2016
With us: 3 years 9 months

Post #2by john71 » 04.03.2017, 18:24

Would you be so kind to provide a visual example? What are we talking about?

Avatar
Goofy
Posts: 247
Joined: 30.08.2011
With us: 8 years 8 months
Location: Italy

Post #3by Goofy » 04.03.2017, 19:18

Hi Alexell. Years ago I had Vincent's Celestia MOD with sounds and images, and I and some else used the new release for years with very good results.
Just two examples:
in my cel script on "Mars" I show the "Martian invasion" as in the old movie "War of the worlds", using a rapid succession of images, resulting in a little movie. Little example of he script:

overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-0.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-1.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-2.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-3.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-4.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-5.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-6.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-7.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-8.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-9.png" }
wait {duration 0.13}
overlay { duration 0.13 xoffset 0.45 yoffset -0.4 alpha 1.0 filename "waroftheworlds-med-10.png" }
wait {duration 0.13}

War of the Worlds.JPG


From this my request:
could it be possible to add small movies, AVI or what else (positioning them in a chosen position on the screen, just like the images)?

In the same cel I show Rover's panoramas from one side to the other of the image (3800x650 pixel), using this script (I show just a little piece of it, but the original has almost three thousand lines from BEGINNING to END!):

#BEGINNING
overlay { duration 2.0 xoffset 1.80 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 2.0}
overlay { duration 0.015 xoffset 1.7975 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.795 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.7925 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.79 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.7875 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.785 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.7825 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.78 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}

#END
overlay { duration 0.015 xoffset 1.78 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.7825 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.785 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.79 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.7925 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.795 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 0.015 xoffset 1.7975 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 0.015}
overlay { duration 2.0 xoffset 1.80 yoffset 0.1 alpha 1.0 filename "mars-panorama-ok.jpg" }
wait {duration 2.0}

Beginning.JPG


End.JPG


From this my second request:
to avoid this enormous and time-consuming number of script lines and the time needed for fine-tuning of "overlay" and "wait" duration, would it be possible to have a command line similar to this example?

overlay { duration 15.0 start xoffset 1.80 yoffset 0.0 alpha 1.0 end xoffset -1.80 yoffset 0.0 alpha 1.0 speed xoffset 0.0025 yoffset 0.0 filename "mars-panorama-ok.jpg"}

I think it would be very nice and appreciated by students.
Later I will try to make two little movies to show the above examples.
Sorry for the very long message, apologize.
Goofy :smile:
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB

Avatar
Topic author
Alexell M
Site Admin
Posts: 302
Joined: 07.10.2010
Age: 26
With us: 9 years 7 months
Location: Moscow, Russia
Contact:

Post #4by Alexell » 05.03.2017, 19:08

My question is simple: add it to Celestia 1.7.0 or not?
Admin of celestia.space
PC: Intel Core i7-8700 @ 3.20GHz, SSD, 16 Gb RAM, NVIDIA GeForce GTX 1080, Creative Sound Blaster ZxR. Windows 10 x64.
Phone: iPhone 7 Plus 128 Gb. iOS 11.
Image

Avatar
Goofy
Posts: 247
Joined: 30.08.2011
With us: 8 years 8 months
Location: Italy

Post #5by Goofy » 05.03.2017, 19:37

Obviously, yes yes yes, please! :wink:
BTW, mine was simple too:
can you add movies?
Goofy :smile:
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB

john71
Posts: 481
Joined: 10.08.2016
With us: 3 years 9 months

Post #6by john71 » 05.03.2017, 20:49

Yes, it is a great idea!

Avatar
Topic author
Alexell M
Site Admin
Posts: 302
Joined: 07.10.2010
Age: 26
With us: 9 years 7 months
Location: Moscow, Russia
Contact:

Post #7by Alexell » 15.03.2017, 18:52

Goofy, You mean the ability to show videos as overlay?
Admin of celestia.space
PC: Intel Core i7-8700 @ 3.20GHz, SSD, 16 Gb RAM, NVIDIA GeForce GTX 1080, Creative Sound Blaster ZxR. Windows 10 x64.
Phone: iPhone 7 Plus 128 Gb. iOS 11.
Image

Avatar
Topic author
Alexell M
Site Admin
Posts: 302
Joined: 07.10.2010
Age: 26
With us: 9 years 7 months
Location: Moscow, Russia
Contact:

Post #8by Alexell » 15.03.2017, 18:53

Image overlay will be implemented in Celestia 1.7.0
Admin of celestia.space
PC: Intel Core i7-8700 @ 3.20GHz, SSD, 16 Gb RAM, NVIDIA GeForce GTX 1080, Creative Sound Blaster ZxR. Windows 10 x64.
Phone: iPhone 7 Plus 128 Gb. iOS 11.
Image

Avatar
Goofy
Posts: 247
Joined: 30.08.2011
With us: 8 years 8 months
Location: Italy

Post #9by Goofy » 16.03.2017, 12:15

Sorry Alexell, I missed your message #7, and my late reply is yes, exactly that, i.e. showing short videos as overlay (and, if possible, to have the same possibility of positioning them at will on the screen, e.g. center- up-right below-right or so, as for still images with their x-y displacement). :wink:

And regarding your message #8, this is a great thing, thanks a lot, VERY appreciated.
Goofy :smile:
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB

Avatar
Topic author
Alexell M
Site Admin
Posts: 302
Joined: 07.10.2010
Age: 26
With us: 9 years 7 months
Location: Moscow, Russia
Contact:

Post #10by Alexell » 16.03.2017, 15:41

Goofy, Well, first of all about the video - it needs to be discussed on the forum. My personal opinion is that it is not necessary, since the journey through space in Celestia is much better than any video.
Admin of celestia.space
PC: Intel Core i7-8700 @ 3.20GHz, SSD, 16 Gb RAM, NVIDIA GeForce GTX 1080, Creative Sound Blaster ZxR. Windows 10 x64.
Phone: iPhone 7 Plus 128 Gb. iOS 11.
Image

Avatar
Goofy
Posts: 247
Joined: 30.08.2011
With us: 8 years 8 months
Location: Italy

Post #11by Goofy » 17.03.2017, 11:51

Hi Alexell. I absolutely agree journey through space in Celestia is much better than any video, but I'm speaking of other things. E.g., when I show to my students the evolution of continents in the past 400 million years from Pangea to modern times, I'm obliged to show a rapid succession of many images, that anyway give not exactly the evolution idea, while there are many small videos that make the same thing in a much better way.
Another example: to show the effect of Himalaya increasing height due to the Northern movement of Indian continent, I use 10 drawings I made myself (not so bad but not so nice, alas!), but there are many small videos that make the same thing much better.
I can give a lot of examples of this, all of them not regarding journey through space.
Probably it's just a matter of opinions, but I would like to read someone else on this matter.
Come on, guys, I know many of you use Celestia for educational purposes, so please give us your opinion! :help:
Appreciated.
Goofy :smile:
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB

Avatar
Cham M
Posts: 4325
Joined: 14.01.2004
Age: 55
With us: 16 years 4 months
Location: Montreal

Post #12by Cham » 17.03.2017, 14:44

Just my cent about pictures and video in Celestia :

I use Celestia in the classroom to teach astronomy and astrophysics. I also heavily use pictures and videos. Most (if not all) of the pictures are shown from within Celestia using my LUA plug-in addon (already published on the forum a long time ago). So I don't need to switch to another app to show pictures, which is great since I also show a 3D model in Celestia with a picture next to it. See the examples below :

pulsar.jpg


nebula.jpg


hubble.jpg


Pictures are an absolute must have in Celestia. This is one of the main reasons why I wrote the LUA plugins.

About videos, I instantly switch from Celestia to my QT application to show the video, and everything works perfectly and nicely. In this case, because of the nature of videos (animation), I really don't need any video capabilities in Celestia. Personaly I'm not interested in any video capabilities for Celestia, while I admit it may have some uses in some cases.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Topic author
Alexell M
Site Admin
Posts: 302
Joined: 07.10.2010
Age: 26
With us: 9 years 7 months
Location: Moscow, Russia
Contact:

Post #13by Alexell » 28.03.2017, 21:25

Image overlay added with 3d92e4d.
Admin of celestia.space
PC: Intel Core i7-8700 @ 3.20GHz, SSD, 16 Gb RAM, NVIDIA GeForce GTX 1080, Creative Sound Blaster ZxR. Windows 10 x64.
Phone: iPhone 7 Plus 128 Gb. iOS 11.
Image


Return to “Development”

Who is online