Page 1 of 3

Add a fixed image in Celestia screen

Posted: 29.08.2008, 13:40
by dams2008
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.

Re: Add a fixed image in Celestia screen

Posted: 29.08.2008, 15:03
by BobHegwood
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

Re: Add a fixed image in Celestia screen

Posted: 29.08.2008, 15:12
by dams2008
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,..).

Re: Add a fixed image in Celestia screen

Posted: 29.08.2008, 17:57
by BobHegwood
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

Re: Add a fixed image in Celestia screen

Posted: 01.09.2008, 15:10
by dams2008
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.

Re: Add a fixed image in Celestia screen

Posted: 01.09.2008, 16:56
by BobHegwood
dams2008 wrote:I have found nothing on ML...

Then you didn't look very hard... See HERE.

Re: Add a fixed image in Celestia screen

Posted: 01.09.2008, 19:19
by Vincent
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}

Re: Add a fixed image in Celestia screen

Posted: 01.09.2008, 21:01
by BobHegwood
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)?

Re: Add a fixed image in Celestia screen

Posted: 01.09.2008, 23:12
by ANDREA
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

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 00:54
by BobHegwood
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:

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 12:08
by ANDREA
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

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 12:58
by BobHegwood
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:

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 13:27
by ANDREA
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

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 14:09
by dams2008
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.

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 14:44
by ANDREA
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

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 15:03
by dams2008
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.

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 15:13
by ANDREA
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

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 17:38
by tech2000
You got my vote on this one too.

cheers, Anders

Re: Add a fixed image in Celestia screen

Posted: 02.09.2008, 17:48
by ANDREA
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

Re: Add a fixed image in Celestia screen

Posted: 04.09.2008, 13:40
by SU(3)xSU(2)xU(1)
I've never been using Vincent's patch, but after reading this thread I will give you a vote too. :)

Paul