Lua Edu Tools beta version

Discuss Celestia's features, adaptations and Addons for use in educational environments
Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 11 months
Location: Nancy, France

Post #261by Vincent » 16.01.2008, 13:50

16/01/2008 UPDATE :

- Updated translations.
- Added star style setting to the render option dialog:
Image

Edit: 17/01/08 update: minor bug fix.
@+
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

ant
Posts: 2
Joined: 29.01.2008
With us: 16 years 10 months

Post #262by ant » 29.01.2008, 09:27

Hello,
I 've been struggling for many hours now, to make the Magnification Lua Edu Tools option work with a Sun addon.
I have added this texture to the sun : http://www.celestiamotherlode.net/creat ... ds_sun.zip
and this is the result : :D :D



Image


The sun is magnified too.
I can add that My earth is gobbling the moon too...

Do you have any idea to help me ?

Celestia + Lua tool = A great great suprise for this beguining of the yaer !
Thanks

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

Post #263by Vincent » 29.01.2008, 12:19

Ant,

Good to see that you managed to customize the Tools to suit your own specific needs.
If you're interested in the future evolution of the Sun, you can also have a look at my "Future of the Sun" addon:
http://celestiaproject.net/forum/viewtopic.php?t=11593

Then, as for your issue with the Earth engulfing the Moon, you can edit the config.lua file either to set the appropriate magnification coefficients to a smaller value or to set the magnified_objects entry to "earth_moon".
@+
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

ant
Posts: 2
Joined: 29.01.2008
With us: 16 years 10 months

Post #264by ant » 29.01.2008, 18:18

Hello Vincent,

I am really ashamed and frustrated:

1/ I 've never been able to magnify 2 objects at the same time.
Like "planets" and "earth-moon".
2/ And Never been able to reduce the size of my Thorvaldsen Addon Sun in the same time.
I Just want to get something like the Orrery script kind of view with a single button, keeping all my Hi res Planets, Moons and Sun textures.

It is the best view to explain things to kids.

Anyway Orrery script is really good.

Thanks
@+

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 2 months
Location: Manassas, VA

Post #265by fsgregs » 12.02.2008, 01:03

Hi. I am learning how to use the Lua tools and I am stuck. I want to create an overlay texture (a semi-transparent Grid) that I can superimpose on top of a planet. I have read the brief instructions on how to add a custom image, and I think I properly edited the image.lua file and added the image to the Images folder, but ...

(1) What do I click in the toolbox to display the image? There is no box to click labeled "image"
(2) I tried clicking the Info box, but my image is not showing up

(3) Even if it did, I am sure it would be displayed off to one side of Earth, not superimposed on it.

I cannot use an Alternate Texture ssc file for the grid, because I am already using an alternate texture for the main map. You cannot display/select two alternate textures at the same time. So, it looks like I have to use Lua tools ... if it will overlay an image onto the entire planet.

Can it do that?

How do I do that?

HELP!!!

Thanks in advance.

Frank

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #266by ANDREA » 12.02.2008, 10:56

ant wrote:....Anyway Orrery script is really good. Thanks
@+

Ant, happy you like and use my "The Orrery" script.
You are welcome! :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

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

Post #267by Vincent » 12.02.2008, 12:01

fsgregs wrote:Hi. I am learning how to use the Lua tools and I am stuck. I want to create an overlay texture (a semi-transparent Grid) that I can superimpose on top of a planet. I have read the brief instructions on how to add a custom image, and I think I properly edited the image.lua file and added the image to the Images folder, but ...


Frank,

Defining a second alternate surface texture for a planet and displaying it on top of the first alternate texture is not feasible so far, even with the Lua Tools... The "More Info" option will allow you to display an information image in the 2D plane of the Celestia viewport, but this is not what you want.

PS: I'll answer your PM shortly... I have very little time to spend on the forum at the moment...
@+
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
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 2 months
Location: Manassas, VA

Post #268by fsgregs » 12.02.2008, 21:02

Vincent:

OK, thanks for clarifying that LUA will not allow an overlay image on top of a planet itself, but only off to one side.

That said, how do I get an image to appear in LUA? Is there a key that I press to display an image as well as the info box? Do I have to enter a new command in the main lua.cfg file? Is there some toolbox menu item I have to create?

Frank

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Post #269by Chuft-Captain » 13.02.2008, 01:54

fsgregs wrote:I cannot use an Alternate Texture ssc file for the grid, because I am already using an alternate texture for the main map. You cannot display/select two alternate textures at the same time. So, it looks like I have to use Lua tools ... if it will overlay an image onto the entire planet.
Frank,
"You cannot display/select two alternate textures at the same time" on the same planet, so you could try creating another planet (eg. Earth2) with exactly the same orbit as the original, with your transparent grid as the alt-texture. (You may need to make it's radius a little larger than the original planet to avoid Z-fighting)

Alternatively, you could define your grid as a NightTexture on the original planet, but the downsie is it would only display on the night-side, and I suspect that's not the effect you're looking for.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #270by rthorvald » 13.02.2008, 02:01

Chuft-Captain wrote:You cannot display/select two alternate textures at the same time" on the same planet, so you could try creating another planet (eg. Earth2) with exactly the same orbit as the original, with your transparent grid as the alt-texture. (You may need to make it's radius a little larger than the original planet to avoid Z-fighting)


Do that, but define the second Earth with an invisible (placeholder) cmod file, and give this one a cloudmap. The cloudmap is your overlay texture. Easy to turn on/off, too...

- rthorvald
Image

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 2 months
Location: Manassas, VA

Post #271by fsgregs » 13.02.2008, 04:52

Runar and Chuft-Captain:

Thanks for the advice. I've tried to make an ssc file to create a 2nd earth over the first, using a placeholder.cmod file, with the grid texture as a cloud texture. It shows up all right, but the placeholder object appears as a giant semi-transparent hazy white cube surrounding Earth. Here is the ssc file I created:

"Earth2" "Sol"
{
Mesh "placeholder.cmod"
Radius 6390

Atmosphere {
CloudMap "earthgrid.*"
CloudHeight 5
}

CustomOrbit "vsop87-earth"
EllipticalOrbit {
Period 1.0000
SemiMajorAxis 1.0000
Eccentricity 0.0167
Inclination 0.0001
AscendingNode 348.739
LongOfPericenter 102.947
MeanLongitude 100.464
}

UniformRotation
{
Period 23.9344694
Inclination -23.4392911
MeridianAngle 280.5 # offset at default epoch J2000
}

}


I have copied a placeholder.cmod from one of your add-ons, and placed it in a models folder inside the above add-on folder. Apparently, it is not as invisible as I'd hoped. I guess I need another placeholder.cmod that is a sphere, and is totally invisible. Can you tell me where I can get one?

Also, although the grid does appear around Earth as a cloud texture, so does Earth's regular cloud texture. That is because the grid is mostly transparent, and when I turn on Earth's clouds, its own cloud texture appears under the grid. I need that texture to not appear.

I guess I can create a fake Earth somewhere else around another star, and simply substitute the grid texture for the real cloud texture, but is there any way I can continue to use the real Earth, and get a grid to overlay an existing overlay texture?

Frank

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #272by rthorvald » 13.02.2008, 09:54

fsgregs wrote:I have copied a placeholder.cmod from one of your add-ons, and placed it in a models folder inside the above add-on folder. Apparently, it is not as invisible as I'd hoped. I guess I need another placeholder.cmod that is a sphere, and is totally invisible. Can you tell me where I can get one?
If you used one of my recent placeholder cmods, you must also bring with you the th_placeholder.png file in the medres dir where you found it. That will make it totally invisible.

fsgregs wrote:Also, although the grid does appear around Earth as a cloud texture, so does Earth's regular cloud texture. That is because the grid is mostly transparent, and when I turn on Earth's clouds, its own cloud texture appears under the grid. I need that texture to not appear.
Then you must comment it out from the SSC file.

fsgregs wrote:I guess I can create a fake Earth somewhere else around another star, and simply substitute the grid texture for the real cloud texture, but is there any way I can continue to use the real Earth, and get a grid to overlay an existing overlay texture?


Well, if you want to keep the ability to turn the regular Earth clouds on and off, i suggest you give Earth an ending and beginning date, and duplicate it before and after. That is three Earths:

- One with an infinite past
- One with a limited lifetime (begins and ends for example on one spesific day)
- One with an infinite future

--- Then, you remove the Earth clouds from the middle one??s SSC, and add your grid there instead. Only run your "overlay" simulation on the one day it exists.

To not confuse anybody with multiple Earths in the browser, just give the invisible CMOD the name of Earth, and give the three real Earths no name at all (empty brackets in the SSC);

if you do this, you have what works like one Earth, like everybody is used to, and that looks like one Earth in Celestia, exept that on one spesific day, it does not have any clouds. And on that day, you have the overlay grid instead.

- rthorvald
Image

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #273by ANDREA » 13.02.2008, 10:43

Vincent wrote:06/01/2008 UPDATE : .....- Added Asteroid Main Belt rendering using point sprites cmod:
[URL=http://img175.imageshack.us/my.php?image=asteroidbeltji4.jpg[/URL]

Hello Vincent, I'm very interested to use your Asteroid Main Belt rendering using point sprites cmod, in the Solar Systems project I'm working on, together with Buggs Moran.
Is it available for use on 1.5.0? 8)
If yes, can it be modified to allow its use for the Ooort cloud too?
Thanks a lot for your reply.
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
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 11 months
Location: Nancy, France

Post #274by Vincent » 13.02.2008, 12:56

fsgregs wrote:That said, how do I get an image to appear in LUA? Is there a key that I press to display an image as well as the info box? Do I have to enter a new command in the main lua.cfg file? Is there some toolbox menu item I have to create?
Frank,

You could switch the display of an image either with a key or with a check box (or an active button). Then, I'm not really for adding this feature to the standard version of the Lua Tools, unless some other users claim for it. On the other hand, providing a tutorial about "how to add your own feature to the Lua Tools" would be more useful. Your request can represent a good example for that. So I'll shortly open a new thread. Does it sound reasonable ?

ANDREA wrote:Hello Vincent, I'm very interested to use your Asteroid Main Belt rendering using point sprites cmod, in the Solar Systems project I'm working on, together with Buggs Moran.
Is it available for use on 1.5.0? 8)
If yes, can it be modified to allow its use for the Ooort cloud too?

Andrea,

Please, feel free to use and modify the Asteroid Main Belt model in your project. Since Martin originally created the point sprite cmod for his accretion disk model, you may just add something like "original model by Cham, modified by Vincent for the Lua Edu Tools" in your readme. You can of course also modify it to build a model of the Oort cloud. This will work with 1.5.0, except that the luminosity of the point sprites won't fade with distance... :(
@+
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
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 2 months
Location: Manassas, VA

Post #275by fsgregs » 13.02.2008, 14:22

Runar:

Thanks for the advice. I'll try that out and report back here shortly.

Vincent:

You could switch the display of an image either with a key or with a check box (or an active button). Then, I'm not really for adding this feature to the standard version of the Lua Tools, unless some other users claim for it


The reason I asked how to actually display an image using Lua tools is that (1) the Lua tools add-on comes with a folder of images that include pictures of the sun and each of the planets. (2) There is also an images.lua file that I assumed, activated the use of images. (3) Your read-me file that accompanies Lua tools also explains how to add a custom image to the Lua tools folder, by changing the image.lua file and adding the texture to the Images folder. I naturally assumed that if you gave those directions to everyone in the read-me file, and included a set of default images to use, there was actually a way to see those images. :(

If I understand your response above correctly, there is NOT a way currently to display an image on the screen using Lua :?! If true, then ... well ... why include an images feature if they cannot be seen?

Assuming I have not misunderstood the situation here, I would recommend adding the display of images to Lua as a default feature, rather than just telling users how to modify Lua scripts to create an images feature. That said, I would love to learn how to add features like check boxes or keystrokes to Lua on our own, so the tutorial you mention above is still a great idea. :)

Regards

Frank

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

Post #276by Vincent » 13.02.2008, 15:40

fsgregs wrote:If I understand your response above correctly, there is NOT a way currently to display an image on the screen using Lua :?! If true, then ... well ... why include an images feature if they cannot be seen?

Frank,

The Lua Edu Tools do offer a feature, enabled by default, that displays images on screen:
Image

You can associate one or several images to any object using the infos/infoImage.lua file:

Code: Select all

-- Image filenames for Sol:
Sol1 = "../images/image_Sol1.jpg";
Sol2 = "../images/image_Sol2.jpg";
Sol3 = "../images/image_Sol3.jpg";
Sol4 = "../images/image_Sol4.jpg";

Code: Select all

-- Image filenames for Mars:
Mars1 = "../images/image_Mars1.jpg";


These images are displayed whenever the current selection has an Info Image definition and the 'More Info' box is checked.

I think that what you're requesting is a feature that would display an image independently from the current selection, like your cockpit overlay, by checking a box or typing a key.
@+
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

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #277by ANDREA » 13.02.2008, 16:10

Thanks a lot, Vincent, I just tried the Asteroid belt on my Celestia 1.5.0, and it?€™s wonderful.
I have some problem anyhow, but going surely OFF TOPIC, I?€™m moving my next messages to this topic: :wink:
http://www.celestiaproject.net/forum/viewtopic ... e&start=45

By there, and many thanks to Cham and you.

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

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 2 months
Location: Manassas, VA

Post #278by fsgregs » 14.02.2008, 02:31

Vincent:

Thanks for the clarification. I do see now that if an image is in the images file and is called out in the images.lua for that particular planet, it will display when the more info box is checked.

Sorry for any confusion on my part.

I look forward to getting your reply to my PM of a few days ago, at your convenience.

Regards

Frank

eras
Posts: 4
Joined: 30.05.2007
With us: 17 years 6 months
Location: Xalapa, Veracruz, Mexico

Post #279by eras » 14.02.2008, 20:23

Hi Vincent, i tested you Lua_Edu_tools at linux, and not work, only work the render asteroids but without activate edu_tools. May be my machine, because i can't compile celestia with kde, even. at windows work perfectly. thanks.


hi again, i compile celestia with gtk at my linux, and you edu tools work nice, i don't know because with genome no work, thanks .

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

Post #280by Vincent » 16.02.2008, 10:50

eras wrote:hi again, i compile celestia with gtk at my linux, and you edu tools work nice, i don't know because with genome no work, thanks .

Hi eras,

Good to know that the Lua Edu Tools work great with Celestia/gtk.
Can you read any error message in the console when running the Lua Tools with Celestia/Gnome ? You can bring up the console by typing '~'.
@+
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


Return to “Celestia in Education”