Add a fixed image in Celestia screen

All about writing scripts for Celestia in Lua and the .cel system
Topic author
dams2008
Posts: 16
Joined: 26.08.2008
With us: 15 years 10 months

Add a fixed image in Celestia screen

Post #1by dams2008 » 29.08.2008, 13:40

Hello,

I would like to add a fixed image (logo or picture) in the main screen of celestia.
I do not know how to do it.
Would it be possible to have some help on this subject?

Then I would like to know how to remove the default text info in celestia screen from CELX script? and inversely how to add some text info from CELX script (position, font, size,...)?

Thanks.

Dams.

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 16 years 8 months

Re: Add a fixed image in Celestia screen

Post #2by BobHegwood » 29.08.2008, 15:03

Are you talking about the splash.png file in Celestia's main directory? You can easily create your own if you wish.
Am uncertain what you mean by the rest of your remarks. What text are you trying to modify?

Thanks, Bob
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Topic author
dams2008
Posts: 16
Joined: 26.08.2008
With us: 15 years 10 months

Re: Add a fixed image in Celestia screen

Post #3by dams2008 » 29.08.2008, 15:12

I would like to add a fixed image on the 3D simulation (a logo or a picture). You are watching the earth rotating and in the left corner of celestia window, there is a fixed small image.
Then, I would like to remove all text info on celestia screen and just add some particular information from celx script (selecting the position, color, size, duration of print,..).

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 16 years 8 months

Re: Add a fixed image in Celestia screen

Post #4by BobHegwood » 29.08.2008, 17:57

dams2008 wrote:I would like to add a fixed image on the 3D simulation (a logo or a picture). You are watching the earth rotating and in the left corner of celestia window, there is a fixed small image.
Then, I would like to remove all text info on celestia screen and just add some particular information from celx script (selecting the position, color, size, duration of print,..).

You can do all of this using either a CEL script or a CELX script. You may have to define your image as a planet or a spacecraft, but you can certainly do this using either scripting language.
Of course, you would have to work out the location and positioning of the object in space, and then you'd have to go to the appropriate spot in space for viewing what you want. This can
all be done, however. Have you looked at some of the scripting guides on the ML? I know that these are outdated a bit, but they still offer sound basic advice in this area.
You might also inquire with Vincent. He is our current CELX expert. :wink:

Thanks, Brain-Dead
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Topic author
dams2008
Posts: 16
Joined: 26.08.2008
With us: 15 years 10 months

Re: Add a fixed image in Celestia screen

Post #5by dams2008 » 01.09.2008, 15:10

I have found nothing on ML...
I just need to know how to execute from scripts some functions:
- to display an image loaded as a texture
- to remove all text info

I am going to contact Vincent to get his experience on CELX scripts and Lua Edu tools.
if anyone is able to help me... do not hesitate.

Dams.

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 16 years 8 months

Re: Add a fixed image in Celestia screen

Post #6by BobHegwood » 01.09.2008, 16:56

dams2008 wrote:I have found nothing on ML...

Then you didn't look very hard... See HERE.
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 5 months
Location: Nancy, France

Re: Add a fixed image in Celestia screen

Post #7by Vincent » 01.09.2008, 19:19

Hi Dams,

dams2008 wrote:I just need to know how to execute from scripts some functions:
- to display an image loaded as a texture
This can't be done from a simple celx script. You need to use the Lua Tools.
You should find an example of how to do that here:
viewtopic.php?f=11&t=12133

dams2008 wrote:- to remove all text info
You can use the celestia:setoverlayelement() method if you run Celestia 1.5 or later:
http://en.wikibooks.org/wiki/Celestia/C ... ayelements
The following line removes all overlay elements:

Code: Select all

celestia:setoverlayelements{Time = false, Velocity = false, Selection = false, Frame = false}

And this one displays back all overlay elements:

Code: Select all

celestia:setoverlayelements{Time = true, Velocity = true, Selection = true, Frame = true}
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 16 years 8 months

Re: Add a fixed image in Celestia screen

Post #8by BobHegwood » 01.09.2008, 21:01

Well, perhaps I am simply misunderstanding what needs to be done here again... :roll:
I can display ANY image using even a simple CEL script. As long as you have defined the image in an SSC file, you
can set it up to place it anywhere you like in space. You can display ANY image this way.
Look at the galaxy billboard add-ons. What am I missing here (again)?
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 1 month
Location: Rome, ITALY

Re: Add a fixed image in Celestia screen

Post #9by ANDREA » 01.09.2008, 23:12

BobHegwood wrote:Well, perhaps I am simply misunderstanding what needs to be done here again... :roll: I can display ANY image using even a simple CEL script. As long as you have defined the image in an SSC file, you can set it up to place it anywhere you like in space. You can display ANY image this way. Look at the galaxy billboard add-ons. What am I missing here (again)?
Bob, have you ever used Vincent's celestia_1.4.1_patch3.exe?
It allows, very easily and using cel scripts, without any need of ssc files, the use of images positioned where you wish on the screen (pay attention, on the screen, NOT in space, so no ssc file needed!), and sounds and music at your will. 8)
In the image you can see a single shot of a Ferrari F1 car (but it will be shown many times, each time slightly moved from left to right, so that the car is shown going from one side of Neptune’s orbit to the other one, with engine roaring, while and the wording reads: “A never stopping Ferrari would need 3425 years to drive Neptune’s orbit diameter at 300 Km/h”. ]
This works like a short movie, and young students love it, believe me.
If you go here you can still find the patch:
http://vincent.gian.club.fr/celestia/celestia_win32_1.4.1_patch3.zip
and the relevant discussion is here:
http://shatters.net/forum/viewtopic.php?f=4&t=9123&st=0&sk=t&sd=a&hilit=celestia_1.4.1_patch3.exe&start=75
Here
http://shatters.net/forum/viewtopic.php?f=11&t=12133
is my tonight's request to Vincent (no, better, it's not a request, it's a pray!), asking for the same capabilities under cel scripts using Celestia 1.6.
Hope this may be useful, and if you think so (BTW, I use it for almost ALL my lessons scripts, successfully), please give me your help in asking for this improvement.
Thanks a lot, Bob.
Bye

Andrea :D
"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-WIN 11 PRO

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 16 years 8 months

Re: Add a fixed image in Celestia screen

Post #10by BobHegwood » 02.09.2008, 00:54

ANDREA wrote:Bob, have you ever used Vincent's celestia_1.4.1_patch3.exe?
is my tonight's request to Vincent (no, better, it's not a request, it's a pray!), asking for the same capabilities under cel scripts using Celestia 1.6.
Hope this may be useful, and if you think so (BTW, I use it for almost ALL my lessons scripts, successfully), please give me your help in asking for this improvement.

Well, as usual, Andrea, I simply had no idea that this was in existence. Must have happened during my last hospital stay.
Since I have been using 1.5.1 almost exclusively for the last (year?) I was simply not aware of this capability.
Big surprise there, I'll bet. :wink:
And yes, I agree... Would be very nice to have in 1.6 when it becomes available.

Thanks for the information. Much appreciated. My approach will work, however. It's just harder to do. :roll:
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 1 month
Location: Rome, ITALY

Re: Add a fixed image in Celestia screen

Post #11by ANDREA » 02.09.2008, 12:08

BobHegwood wrote:
ANDREA wrote:Bob, have you ever used Vincent's celestia_1.4.1_patch3.exe?
is my tonight's request to Vincent (no, better, it's not a request, it's a pray!), asking for the same capabilities under cel scripts using Celestia 1.6.
Hope this may be useful, and if you think so (BTW, I use it for almost ALL my lessons scripts, successfully), please give me your help in asking for this improvement.
...And yes, I agree... Would be very nice to have in 1.6 when it becomes available.
Thanks for the information. Much appreciated. My approach will work, however. It's just harder to do. :roll:
You are VERY welcome, Bob. :D
And regarding your approach obviously it's working, but the most important differences are that using Vincent's patch you can have sound, too, and that to see the image you want, where you want on the screen, you don't need to move in the space to the billboard position, but you can show the same planet or moon and at the same time the image itself.
The only needed cel script lines for my example about the Ferrari, are:

Code: Select all

play { channel 0 volume 0.5 loop 1 filename "Ferrari_engine.wav" nopause 1}
overlay { duration 1.25 xoffset -0.612 yoffset 0.0 alpha 0.95 filename "ferrari.png" }
wait {duration 0.35}
play { channel 0 volume 0 loop 0 filename "" }

That's all: in the play line “loop 1” means the sound will be repeated until the line command
play { channel 0 volume 0 loop 0 filename "" }
will go on, while for the overlay line the xoffset and yoffset will position the image horizontally and vertically (with reference to the monitor center), while alpha will give the image transparency (from 1.0 fully opaque to 0.0 fully transparent).
BTW, you can use many sounds/musics at the same time, each on a different channel.
It’s a well checked and working way to add images, music, voices, sounds, and even movies, as I do in many scripts, using a series of images shown at very short time intervals.
Nice, plain, simple, and VERY easy to be remembered, isn't it?
If you wish, think for comparison at the celx sequence of the command lines needed to make the same thing. :wink:
I have a pressing query: is there any important reason for which we cannot have all this in the official release of Celestia, given that Vincent has already done the patch for LUA tools for Celestia 1.5, and will do it for Celestia 1.6?
Chris?
If the reply will follow Fridger's assumption (correct, obviously) that in space there are no sounds or Beethoven music, well, believe me, despite this
it's a very useful and necessary component of the Celestia educational possibilities.
Can you imagine Christophe's LEM on the Moon, without listening to Armstrong saying "A small step for (a) man..."?
Or looking at the Sputnik 1 without listening at its "Bip bip bip" I listened to personally and with an incredible emotion (I was 14 years old), half a century ago?
Or looking at the Orion shuttle docking 2001's Space Station, without Strauss’s Danube as background? :wink:
Please Chris, allow us to teach Astronomy in the best possible way, and possibly include Vincent's patch in the official release! :P
Thanks a lot. :D :D :D
My little cent.
Bye

Andrea :D
"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-WIN 11 PRO

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 16 years 8 months

Re: Add a fixed image in Celestia screen

Post #12by BobHegwood » 02.09.2008, 12:58

ANDREA wrote:Can you imagine Christophe's LEM on the Moon, without listening to Armstrong saying "A small step for (a) man..."?
Or looking at the Sputnik 1 without listening at its "Bip bip bip" I listened to personally and with an incredible emotion (I was 14 years old), half a century ago?
Or looking at the Orion shuttle docking 2001's Space Station, without Strauss’s Danube as background? :wink:
Please Chris, allow us to teach Astronomy in the best possible way, and possibly include Vincent's patch in the official release!

Well, you have MY vote for this option... :D
Again, thanks for the information here. Guess I am more "Brain-Dead" than I thought. :wink:
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 1 month
Location: Rome, ITALY

Re: Add a fixed image in Celestia screen

Post #13by ANDREA » 02.09.2008, 13:27

BobHegwood wrote:Well, you have MY vote for this option... :D
Again, thanks for the information here. Guess I am more "Brain-Dead" than I thought. :wink:
Thanks a lot for your support, Bob, very appreciated! :D
BTW, I forgot another important capability of the command line

Code: Select all

play { channel 0 volume 0.5 loop 1 filename "Ferrari_engine.wav" nopause 1}
the command "nopause 1" that I use for the background music that's going on for the whole show length, means that, even if I pause the show using the spacebar to speak to the public or to reply some question, the background music will go on, never stopping until the last script line

Code: Select all

play { channel 0 volume 0 loop 0 filename "" }

will be reached.
Very nice, because IMHO it avoids feeling gaps to the public,. :wink:
Bye, Bob.

Andrea :D
"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-WIN 11 PRO

Topic author
dams2008
Posts: 16
Joined: 26.08.2008
With us: 15 years 10 months

Re: Add a fixed image in Celestia screen

Post #14by dams2008 » 02.09.2008, 14:09

If I understand well, the patch "celestia_win32_1.4.1_patch3" allows to display a fixed image thanks to the cel function overlay. That's exactly what I need !!
But this *.cel script doesn't work with celestia 1.5.1 (svn 1.6.0), right?
Is it possible to simply define or add an overlay function in *.cel script ?

Thanks.

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 1 month
Location: Rome, ITALY

Re: Add a fixed image in Celestia screen

Post #15by ANDREA » 02.09.2008, 14:44

dams2008 wrote:If I understand well, the patch "celestia_win32_1.4.1_patch3" allows to display a fixed image thanks to the cel function overlay. That's exactly what I need !!
But this *.cel script doesn't work with celestia 1.5.1 (svn 1.6.0), right?
Both correct, at least actually.
dams2008 wrote:Is it possible to simply define or add an overlay function in *.cel script ? Thanks.
If you don't wish to use Celestia 1.4.1 and Vincent's celestia_win32_1.4.1_patch3, the other solution, usable in Celestia 1.5 and 1.6, is Bob Hegwood's one, using billboards with their own ssc file, whose you can find a very useful doc here (thank you, Selden!)
http://www.lns.cornell.edu/~seb/celestia/billboard.html#7.0
There look at the paragraph "1.0: The Flat Billboards".
But IMO the best solution is that you add your voice to our ones, asking as we are doing for Vincent's patch (sound and images using cel scripts) merging in Celestia 1.6. :twisted:
My little cent.
Bye

Andrea :D
"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-WIN 11 PRO

Topic author
dams2008
Posts: 16
Joined: 26.08.2008
With us: 15 years 10 months

Re: Add a fixed image in Celestia screen

Post #16by dams2008 » 02.09.2008, 15:03

ANDREA wrote:But IMO the best solution is that you add your voice to our ones, asking as we are doing for Vincent's patch (sound and images using cel scripts) merging in Celestia 1.6. :twisted:
My little cent.
Bye

Andrea :D

I agree with you... I vote for an integration of this functionality in Celestia 1.6 !
It's a very interesting functionality... which deserves to be available on the latest Celestia version.

Hope it will be done...

Dams.

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 1 month
Location: Rome, ITALY

Re: Add a fixed image in Celestia screen

Post #17by ANDREA » 02.09.2008, 15:13

dams2008 wrote:
ANDREA wrote:But IMO the best solution is that you add your voice to our ones, asking as we are doing for Vincent's patch (sound and images using cel scripts) merging in Celestia 1.6. :twisted: My little cent. Bye Andrea :D
I agree with you... I vote for an integration of this functionality in Celestia 1.6 !
It's a very interesting functionality... which deserves to be available on the latest Celestia version. Hope it will be done...Dams.
Thank you Dams, now we are at least three. :wink:

Come on, Celestians, no one more wishes this improvement? :)
Bye

Andrea :D
"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-WIN 11 PRO

tech2000
Posts: 258
Joined: 14.02.2006
Age: 51
With us: 18 years 4 months
Location: Skepplanda, Sweden

Re: Add a fixed image in Celestia screen

Post #18by tech2000 » 02.09.2008, 17:38

You got my vote on this one too.

cheers, Anders
Don't do anything half-assed, your as good as your word and the job you do

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 1 month
Location: Rome, ITALY

Re: Add a fixed image in Celestia screen

Post #19by ANDREA » 02.09.2008, 17:48

tech2000 wrote:You got my vote on this one too.
cheers, Anders
I was sure of this, Anders, happy you joined us. :)

And now ... waiting for more voices. :wink:
Bye

Andrea :D
"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-WIN 11 PRO

SU(3)xSU(2)xU(1)
Posts: 59
Joined: 05.05.2008
With us: 16 years 1 month

Re: Add a fixed image in Celestia screen

Post #20by SU(3)xSU(2)xU(1) » 04.09.2008, 13:40

I've never been using Vincent's patch, but after reading this thread I will give you a vote too. :)

Paul
"Physicists know what's important, but they don't know what is true. Mathematicians know what's true, but they don't know what is important."


Return to “Scripting”