Page 1 of 1

Added code that allows script to display images as overlayed

Posted: 08.09.2004, 10:48
by ben_o
I have added code that allows a script to load images by filename and display them on screen at a scripted size, position and alpha.
i.e.

Code: Select all

showimage { image "test.png"
                    left 100.0
                    bottom 100.0
                    xSize 300.0
                    ySize 300.0
                    alpha 0.8 }


I haven't yet added the script to remove them however, as the problem lies in whether to first add script that removes them all, or script that selectively removes them, one by one, or even have a time limit on the images... :(

I would upload a screenshot, but I have no webspace accessible from work.

If anyone is interested in this, let me know.

Ben

Posted: 11.06.2005, 01:50
by krezip
so, it could be one of the most useful feature

can you send me this addon?

krezip@freemail.hu

thx

Posted: 12.06.2005, 21:46
by BlindedByTheLight
Ben... what would be a circumstance where this would be used?

Thanks

Posted: 12.06.2005, 22:17
by selden
I'm not Ben, but I can think of at least two:

1. informational overlays, perhaps showing data about the object(s) in view, so text messages don't have to be coded in a script.

2. pictorial overlays, that could, for example, give one the impression that one is looking out
the window of a spacecraft.

Posted: 13.06.2005, 11:13
by maxim
There would be a lots of possibilities using overlay images.

Beside beeing able to widely mask the onscreen appearance of Celestia, you also could display images of the real thing where Celestia only offers a more schematic view. Or you can display schematics and diagrams to explain facts that can't be seen in celestia (solar wind, magnetosphere, roche limit, kuiber belt, lines, points, arrows and a lot more). You could display help screens like actual keybord layout, or explanations to your running script, own splash screens and so on.

I'm sure you can find many more examples for yourself. :wink:

maxim

Posted: 18.06.2005, 07:58
by BlindedByTheLight
Ben... when you say "code" do you mean C++ code or script code? I know that's probably a really dumb question... but I'm learning... :)

Posted: 18.06.2005, 11:43
by ElChristou
Hello,

This can be interesting... Do exist a patch?

Posted: 09.07.2005, 09:29
by ben_o_
Thanks for the comments. As you can see, I felt that my first post disappeared into the ether last year and have stopped all work.

Out of curiousity, I checked the boards and have seen that there is a 'glut' of June posts from *this year* about the patch!

I did submit this to the developers email-list, but had an email snafu and heard no more about it (my fault) and have moved on to a different email address now. (Hence ben_o_ with the _ on the end.)

What my changes did

* Laymans terms *
Put your image in the 'lowres' dir and addshowimage { image "test.png"
left 100.0
bottom 100.0
xSize 300.0
ySize 300.0
alpha 0.8 }

Images can be taken off screen using a dropImage cel command (First image on, last image off)

*End layman*
* C++ info *
Where I got to was simply that you could load up a image from the texture dir (using pre-existing img loading functions), put it on a GL_QUAD, and this was contained in a Vector class container. Why Vector? At the time, I was more interested into adding my own stage into the render/cel pipeline...

Used pop and pull to add/remove images from the pipeline.

*end c++*

Your comments have sparked me into trying to add the same functionality into the new codebase (Mine worked on 1.33-4 I think)

PS I had also considered adding in a 'educational mode' whereby you could tick a box on a gui/set it on the command line, and when you clicked on, say Mars, it would look for Mars.cel and run that. Mar.cel would have a preset interactive 'lecture', using images from NASA, showing the 'face' of Mars, under low and high res imaging, etc. That's my real first aim.

Posted: 12.07.2005, 15:06
by fsgregs
Dear ben_o:

I write a lot of educational activities for Celestia. The ability to overlay a graphic onto the screen (spacecraft window, grid, arrows, diagrams, etc.) by some keystroke command, and take the graphic off again while the program is still running, is a great feature. I could use it dozens of ways.

Please finalize this code and tell us how to get it. By the way, Celestia version 1.4.0 is the new version and although still in pre-release, Chris is planning to release the next pre-release soon (1.4.0pre 7). Look for an announcement on the forum soon. Please use it as your base application and apply your code changes to it.

Looking forward to more details.

Frank G

Posted: 12.07.2005, 15:38
by ben_o_
I am mid way through setting up my home server, as I have rapidly become dissatisfied with the costs involved in renting space on a php/mysql server for my own personal use.

I will add a page up there soon with the patch for the old version + instructions (I'll add a new thread to this forum when I'm done.)

I have some holiday time coming up next week so I should be able to do some work on it then. The server should be setup by this Friday, but may only have an IP address, as opposed to being http://www.maysubdivide.org (which is also my current static, useless, non-dynamic site which I have now emptied.)

Ben

Posted: 07.08.2005, 03:41
by fsgregs
Ben:

Any update on your effort to add the overlay feature that the thread discusses? I'm anxious to put it to use.

Frank

Posted: 07.08.2005, 09:47
by ben_o_
Just updating it to the new version in CVS. (Had a weird build problem, but that's okay, as I now know it's not my fault!)

Ben

Posted: 08.08.2005, 02:39
by ben_o_
Patch can be obtained from here:

http://82.69.120.120/blog/?postid=18

Ben