New "plug-in" for Celestia

Post requests, images, descriptions and reports about work in progress here.
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Re: New "plug-in" for Celestia

Post #61by Vincent » 02.01.2010, 20:19

Fenerit wrote:while in full screen, boxes still behaves bad
Massimo,

I just tested your plug-in, and the problem seems to come from your lightsBox.lua file.
When resizing the main celestia window, your lightsLb, lightsBb, lightsRb, lightsTb values
are not getting updated, which causes the weird behaviour of your lightBox on screen.

Adding the following code to your lightsFrame.Customdraw function should solve the problem:
(Don't forget to delete your previous prefs.lua file)

Code: Select all

      if newwidth ~= iwidth or newheight ~= iheight then
         iwidth = newwidth;
         iheight = newheight;
         lightsLb = pref.lightsLb;
         lightsBb = pref.lightsBb;
         lightsRb = newwidth - lightsLb - lightsFrameWidth;
         lightsTb = newheight - lightsBb - lightsFrameHeight;
         lightsFrame:attach(screenBox, lightsLb, lightsBb, lightsRb, lightsTb)
      end



fsgregs wrote:Will you be releasing that part of the addon soon, or is there some short tutorial that instructs us in how to add images to the plugin now, and designate clickable "hot spots" on the planet?
fsgregs wrote:Perhaps the parameters plugin could be an addon in Lua Tools that could be turned on or off via the "set addons visability" menu!!! :)
Frank,

I'll provide the Lua Plug-ins as a single addon shortly.
This will include the picture box.

As to the Keplerian parameters box, I'll add it to the Lua Edu Tools.
I should be done with all this by next weekend.
@+
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

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 8 months
Location: Thyrrenian sea

Re: New "plug-in" for Celestia

Post #62by Fenerit » 02.01.2010, 21:44

Vincent, now phase plugin work as a charm, but I'm still experiencing the displacement of keplerian's title and incipit, not the text's parameters; perhaps are these features a bit problematics, or even the keplerian need such customDraw changes?
Never at rest.
Massimo

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

Re: New "plug-in" for Celestia

Post #63by Vincent » 03.01.2010, 09:37

Fenerit wrote:Vincent, now phase plugin work as a charm, but I'm still experiencing the displacement of keplerian's title and incipit, not the text's parameters; perhaps are these features a bit problematics, or even the keplerian need such customDraw changes?

Massimo,

Have you you made the iwidth, iheight values local in KeplerParamBox.lua?

Code: Select all

local iwidth, iheight = celestia:getscreendimension();
@+
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

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 8 months
Location: Thyrrenian sea

Re: New "plug-in" for Celestia

Post #64by Fenerit » 03.01.2010, 10:35

Nope! Ops! :x
Never at rest.
Massimo

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New "plug-in" for Celestia

Post #65by Cham » 03.01.2010, 20:29

Here's a shot, showing the new picture box in "action" :)

Image
"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
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New "plug-in" for Celestia

Post #66by Cham » 06.01.2010, 17:04

I'm releasing a huge set of pictures specifically selected for the new "pictures box" plug-in. The pictures are increasing A LOT the Celestia experience, putting literally "life" in the software. It's simply fantastic to see this kind of stuff while cruising in Celestia's space, especially for Sol, Venus, Earth, the Moon, Mars, Jupiter, Saturn, all the exoplanets, pulsars and black holes ! 8)

Take note that about 3/4 of the pictures are coming from the various NASA and ESA web sites, so they are of "public domain". However, about 1/4 of the pictures are copyright work and there may be some issue here. I don't think there really is a problem, since all of these pictures are already freely available on the web, were cropped to a square format and significantly downsampled to 512 X 512 pixels. They are clearly unfit for printing or any other activities than for Celestia. Of course, this pack of pictures is useless without the LUA plug-in. Enjoy. :D

http://fsgregs.startlogic.com/Public_Fi ... images.zip (31.4 MB)
"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
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 8 months
Location: Thyrrenian sea

Re: New "plug-in" for Celestia

Post #67by Fenerit » 13.01.2010, 02:46

Cham wrote:I'm releasing a huge set of pictures specifically selected for the new "pictures box" plug-in. The pictures are increasing A LOT the Celestia experience, putting literally "life" in the software. It's simply fantastic to see this kind of stuff while cruising in Celestia's space, especially for Sol, Venus, Earth, the Moon, Mars, Jupiter, Saturn, all the exoplanets, pulsars and black holes ! 8)
.
.
.
The add marked as bold allow the pictureBox's ANIMATION. :wink: Simply add an image sequence (loop) and it will be showed as a film. This could be useful whether one as build an animated 3d model for showing something.

for k, name in pairs(objectname_t) do
if name == selname then
if not image[selname][picindex] then
image[selname][picindex] = celestia:loadtexture("../images/"..selname.."/"..selname.."_"..picindex..".png");
end
if image[selname][picindex] then
pictureFrame:fillimage(image[selname][picindex]);
picindex = picindex + 1;
message = "";
windowcolor = {0.0, 0.0, 0.0, 0.0};
elseif image[selname][1] then -- at least one image is present
picindex = 1 -- reset index
else -- no image
pictureFrame.fillimage = nil;
message = "No image for "..selname;
windowcolor = {0.0, 0.0, 0.0, 0.4};

end
selname_found = true;
end
end
Never at rest.
Massimo

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New "plug-in" for Celestia

Post #68by Cham » 18.01.2010, 00:56

And another module to the LUA Extension plug-in. 8)

Vincent and I worked hard last week on a Hertzsprung-Russell diagram, for any star (well, except neutron stars and brown dwarfs...).

Select a star, and you'll get this (Sol is selected, in this example) :

Image

The stars indicated with a label are there as references, for comparison purposes.
Now click on the title, and you'll get the vicinity of Sol (in a radius of 25 LY) :

Image

Click again the title, and you get the HR diagram for all the stars which have exoplanets :

Image

Another state (for my personal uses) gives the HR diagram of a star cluster made by Rassilon, a long time ago. We can clearly see its unphysical nature here, which reflects the random generator used to produce the STC file :

Image

The strange horizontal lines are a manifestation of the way this particular stars addon was made. The vertical "lines" are most probably a manifestation of the way Celestia defines the star parameters (temperature and spectral classes). The database is "quantified" in some way, and this isn't a limitation of the LUA module, which again may reveal some never-seen before "features" of Celestia or of addons !
Last edited by Cham on 19.01.2010, 14:44, edited 1 time in total.
"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
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New "plug-in" for Celestia

Post #69by Cham » 19.01.2010, 07:36

Two more images of the previous H-R module, which is still evolving :

Image Image
Last edited by Cham on 19.01.2010, 14:45, edited 1 time in total.
"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
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 8 months
Location: Thyrrenian sea

Re: New "plug-in" for Celestia

Post #70by Fenerit » 19.01.2010, 12:42

This is great! Such a plotting functions opens LOTS of possibilities! 8O
Never at rest.
Massimo

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 1 month
Location: Manassas, VA

Re: New "plug-in" for Celestia

Post #71by fsgregs » 19.01.2010, 16:00

Martin, Vincent ... I am searching for the picturebox lua tools plugin/extension and cannot find the link to it. :oops: I downloaded beta7 and it was not there.

Please ... where is the link to the picturebox addon?

Thanks for all this great work!

Frank

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New "plug-in" for Celestia

Post #72by Cham » 19.01.2010, 16:05

fsgregs wrote:Martin, Vincent ... I am searching for the picturebox lua tools plugin/extension and cannot find the link to it. :oops: I downloaded beta7 and it was not there.

Please ... where is the link to the picturebox addon?

Frank,

sorry, Vincent hasn't released the picture box yet. I guess he's waiting for the final state of the H-R box (?). He's the one responsible of publishing the LUA Extensions, since it's a "brother" of his LUA Edu Tools.
"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
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 8 months
Location: Thyrrenian sea

Re: New "plug-in" for Celestia

Post #73by Fenerit » 19.01.2010, 23:31

fsgregs wrote:Martin, Vincent ... I am searching for the picturebox lua tools plugin/extension and cannot find the link to it. :oops: I downloaded beta7 and it was not there.

Please ... where is the link to the picturebox addon?

Thanks for all this great work!

Frank

Frank, just FYI, we stay to develop AND TESTING ( yes, even myself, in very autarchic way :wink: ) such a new LUA extensions; and the last word is of Vincent because the seamless insertion of the new LUA code into the LUATOOLS structure. Working upon several and different plug-ins is a way to exploit pros and cons.
Never at rest.
Massimo

maatkai
Posts: 8
Joined: 14.01.2010
With us: 14 years 10 months

Re: New "plug-in" for Celestia

Post #74by maatkai » 20.01.2010, 10:12

The H-R module seems great!

Vincent, do you intend to implement it (and the Keplerian parameters box) in the next release of LuaEduTools?


Cyril

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New "plug-in" for Celestia

Post #75by Cham » 20.01.2010, 21:27

The H-R module is finished ! 8)

There's also an option to show the mass of the reference stars :

Image Image

It's very easy to add a simple text file which includes some star names, and to plot its H-R diagram. Here are the Pleiades, as an example :

Code: Select all

HR_Title[5] = "Les Pl?iades ( M45 )";
HR_Line[5] = "";
HR_stars_t[5] =
{
    "Celaeno",
    "Electra",
    "18 Tau",
    "Taygeta",
    "Maia",
    "Asterope",
    "Merope",
    "Alcyone",
    "HD 23753",
    "Atlas",
    "Pleione",
    "HD 23923",
    "HD 23950",
    "22 Tau"
}

The first line defines the title you want to show on the diagram. The second line adds a comment at the bottom of the diagram. That's all ! :mrgreen:

Image
"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
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New "plug-in" for Celestia

Post #76by Cham » 23.01.2010, 15:44

I've updated the pictures collection for the pictures Box module :

http://fsgregs.startlogic.com/Public_Fi ... images.zip (43 MB)
"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!"

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: New "plug-in" for Celestia

Post #77by BobHegwood » 23.01.2010, 19:44

Cham wrote:I've updated the pictures collection for the pictures Box module :

Just wanted to say "Thanks very much" for the new images Martin.
To quote another well-known character, "Fascinating." :wink:

Thanks again, 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

NorthOfPolaris
Posts: 10
Joined: 31.12.2009
With us: 14 years 11 months
Location: Quebec City

Re: New "plug-in" for Celestia

Post #78by NorthOfPolaris » 24.01.2010, 02:42

Hi Cham, Vincent and anyone who has ever contributed to making this program what it is and also all those who follow its development on a regular basis.

I have been using it and have been reading postings to this forum for quite a while but only recently registered.

After downloading the lua_plugins I decided to try to expand the content of the pictures box to include the various pictures of the Messier Objects that I have collected on my computer over the years.

Image

One way that I was able to make this work was to simply add the name of the object in the code at the line: objectname_t = {Sol", ... etc.} as it appears in the search panel that opens when you press the "enter" key and adding a folder for every object containing the pictures for that object.

Code: Select all

objectname_t = {"Sol", "Mercury", "Venus", "Earth", "Moon", "Mars", "Jupiter", "Saturn", "Titan", "Itokawa", "M 31"};


This works well as can be seen in the accompanying picture but I have a question. This line of code can get quite long and messy as objects are added to it and I was wondering if the code could not include a line for Deep Space Objects (dso) to sort by categories the pictures we want to add to the program.

In the example picture there is an image of M 31. I have lost the info as to where it came from so I can't add credits but it is simply for my own use and not for distribution and to show an example.

As an added note, I find that Celestia crashes on occasion when using the image box but I can't reproduce it consistently. It appears that if the picture box is showing and another object is selected and the "G" key is pressed then the program will simply exit without warning. I will try to nail it down more precisely.

For your info I am running the program on a Windows XP full updates with a GE Force 8800 XT graphics card. The program is a compiled version with SVN 4950

Greetings, Serge

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New "plug-in" for Celestia

Post #79by Cham » 24.01.2010, 02:59

Serge,

welcome to the forum.

First : be aware that you need to use pictures with dimensions in powers of 2. For example : 128 X 128 pixels, 256 X 256 pixels, and so on... For the pictures box, the best would be to use 512 X 512 pixels JPG pictures only.

As for the Messier objects, I already considered the possibility to add a special folder just for them (110 objects, a single picture for each object), but abandoned the idea since most pictures of these objects were of bad quality. Many of them are just boring globular clusters anyway.
"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!"

NorthOfPolaris
Posts: 10
Joined: 31.12.2009
With us: 14 years 11 months
Location: Quebec City

Re: New "plug-in" for Celestia

Post #80by NorthOfPolaris » 24.01.2010, 03:06

Cham, thank you for the welcome and the answer. The available method works as it is. It's just that I was wondering if it would make it any easier.
The picture is 512 x 512. Although it does not show it, the image you see in the example was superimposed on a black background of 512 x 512.
By the way, this latest round of add-ons is really great. Thank you for the work.

Serge


Return to “Add-on development”