Lua Edu Tools beta version

Discuss Celestia's features, adaptations and Addons for use in educational environments
Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Post #201by selden » 18.06.2007, 17:26

I just now downloaded and installed the most recent version of Lua Edu Tools.

On my system, numeric-pad-8 (pitch down; screen scrolls up) is not functioning, although 7 and 9 (roll) work, 4 and 6 (yaw) work, and 2 (pitch up) works, too.

Typing Ctrl-F does not and should not change the numeric pad keys, only the arrow keys. The arrow keys do correctly change state, and the up and down arrows properly pitch up and down.

[edit]
With the Edu Tools not loaded (luahook commented out), numeric-pad-8 works fine.

With the Edu Tools running, Shift-I makes no difference in the numeric pad: 8 continues to be disabled.
[/edit]

Strange.

System configuration:
2GB, 1.86GHz Core2Duo 6300; Win XP Pro SP2
128MB, Quadro 550; ForceWare v91.85
Celestia v1.5.0pre3 and from cvs.
Selden

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

Post #202by Vincent » 18.06.2007, 17:42

selden wrote:On my system, numeric-pad-8 (pitch down; screen scrolls up) is not functioning, although 7 and 9 (roll) work, 4 and 6 (yaw) work, and 2 (pitch up) works, too.

[edit]
With the Edu Tools not loaded (luahook commented out), numeric-pad-8 works fine.

With the Edu Tools running, Shift-I makes no difference in the numeric pad: 8 continues to be disabled.
[/edit]

Selden,

I get exactly the same behaviour with the numpad 8 key on my system.
I think more about a bug in the C++ Lua Hook code than in the Lua code itself.
I'm going to investigate this. Strange indeed...

Thanks.
@+
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

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

Post #203by Vincent » 18.06.2007, 20:10

Vincent wrote:I think more about a bug in the C++ Lua Hook code than in the Lua code itself.

Actually, I was wrong. The bug concerned the key mapping Lua code.
I'm quite happy to have located it ! It should be fixed now.

Selden,
Could you please confirm that the bug is also gone on your system ?

Frank,
Could you please let me know if this fixed also the left/right arrows
and the 4/6 numpad keys bug ?

Only the 'lua_edu_tools.lua' was changed.

Thanks.
@+
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
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Post #204by selden » 18.06.2007, 20:31

Vincent,

Unfortunately, when I downloaded the zip file just now from the link in your .sig, I got the old version: lua_edu_tools.lua is dated June 10.

I'll try again in a while.
Selden

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Post #205by selden » 18.06.2007, 20:39

The updated version does fix the numeric keypad bug for me!
Selden

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

Post #206by fsgregs » 18.06.2007, 20:44

Vincent:

Yes, that fix seems to have fixed things.

Thanks :D

Frank

Jedi
Posts: 13
Joined: 02.11.2006
With us: 18 years 1 month
Location: Tucson, Arizona USA

Post #207by Jedi » 19.06.2007, 01:12

Does anyone know if the GL_POINTS command in available in the lua code for celestia?
May the FORCE BE WITH YOU

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

Post #208by Vincent » 19.06.2007, 11:13

selden wrote:The updated version does fix the numeric keypad bug for me!
fsgregs wrote:Yes, that fix seems to have fixed things.

Great !
Selden, Frank, Thanks !

Jedi wrote:Does anyone know if the GL_POINTS command in available in the lua code for celestia?
Jedi,

GL_POINTS is not part of the Celestia Lua OpenGL library yet.
Here are the commands that are the currently available (celx.cpp, line 5492):
RegisterMethod(l, "Frustum", gl_Frustum);
RegisterMethod(l, "Ortho", gl_Ortho);
RegisterMethod(l, "Color", gl_Color);
RegisterMethod(l, "TexCoord", gl_TexCoord);
RegisterMethod(l, "TexParameter", gl_TexParameter);
RegisterMethod(l, "Vertex", gl_Vertex);
RegisterMethod(l, "Translate", gl_Translate);
RegisterMethod(l, "BlendFunc", gl_BlendFunc);
RegisterMethod(l, "Begin", gl_Begin);
RegisterMethod(l, "End", gl_End);
RegisterMethod(l, "Enable", gl_Enable);
RegisterMethod(l, "Disable", gl_Disable);
RegisterMethod(l, "MatrixMode", gl_MatrixMode);
RegisterMethod(l, "PopMatrix", gl_PopMatrix);
RegisterMethod(l, "LoadIdentity", gl_LoadIdentity);
RegisterMethod(l, "PushMatrix", gl_PushMatrix);

RegisterValue(l, "QUADS", GL_QUADS);
RegisterValue(l, "LIGHTING", GL_LIGHTING);
RegisterValue(l, "LINE_LOOP", GL_LINE_LOOP);
RegisterValue(l, "POLYGON", GL_POLYGON);
RegisterValue(l, "PROJECTION", GL_PROJECTION);
RegisterValue(l, "MODELVIEW", GL_MODELVIEW);
RegisterValue(l, "BLEND", GL_BLEND);
RegisterValue(l, "TEXTURE_2D", GL_TEXTURE_2D);
RegisterValue(l, "TEXTURE_MAG_FILTER", GL_TEXTURE_MAG_FILTER);
RegisterValue(l, "TEXTURE_MIN_FILTER", GL_TEXTURE_MIN_FILTER);
RegisterValue(l, "LINEAR", GL_LINEAR);
RegisterValue(l, "NEAREST", GL_NEAREST);
RegisterValue(l, "SRC_ALPHA", GL_SRC_ALPHA);
RegisterValue(l, "ONE_MINUS_SRC_ALPHA", GL_ONE_MINUS_SRC_ALPHA);
lua_settable(l, LUA_GLOBALSINDEX);

lua_pushstring(l, "glu");
lua_newtable(l);
RegisterMethod(l, "LookAt", glu_LookAt);
RegisterMethod(l, "Ortho2D", glu_Ortho2D);


I'd like to add the gl_LineWidth command to allow line smoothing for Lua distance markers too. So, I could add GL_POINTS as well it if it appears to be useful. Just let me know...
@+
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

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

Post #209by Vincent » 19.06.2007, 16:48

Jedi and I have optimized the distance markers. The "distances" check box now cycles through the following steps:
0- No distance marker is displayed.
1- Only square markers centered on screen are displayed in the observer's plane.
2- Only circle markers centered on the current selection are displayed in the ecliptic plane.
3- Both the square and the circle markers are displayed.

I've also finely tuned the size of the markers. The following screenshot shows how well the 1 AU circle marker matches the orbit of the Earth. Note also how both curves are crossing exactly when the Earth is at 1.0000 AU from the Sun:
[click to enlarge]
Image

I've also changed the behaviour of the timerate slider which now works like the new FoV slider.
One advantage of this version is that the "slow", "medium", "fast" buttons are not needed anymore.
@+
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

Jedi
Posts: 13
Joined: 02.11.2006
With us: 18 years 1 month
Location: Tucson, Arizona USA

Post #210by Jedi » 20.06.2007, 01:00

Vincent wrote:
Jedi wrote:Does anyone know if the GL_POINTS command in available in the lua code for celestia?
Jedi,

GL_POINTS is not part of the Celestia Lua OpenGL library yet.
Here are the commands that are the currently available (celx.cpp, line 5492):
RegisterMethod(l, "Frustum", gl_Frustum);
RegisterMethod(l, "Ortho", gl_Ortho);
RegisterMethod(l, "Color", gl_Color);
RegisterMethod(l, "TexCoord", gl_TexCoord);
RegisterMethod(l, "TexParameter", gl_TexParameter);
RegisterMethod(l, "Vertex", gl_Vertex);
RegisterMethod(l, "Translate", gl_Translate);
RegisterMethod(l, "BlendFunc", gl_BlendFunc);
RegisterMethod(l, "Begin", gl_Begin);
RegisterMethod(l, "End", gl_End);
RegisterMethod(l, "Enable", gl_Enable);
RegisterMethod(l, "Disable", gl_Disable);
RegisterMethod(l, "MatrixMode", gl_MatrixMode);
RegisterMethod(l, "PopMatrix", gl_PopMatrix);
RegisterMethod(l, "LoadIdentity", gl_LoadIdentity);
RegisterMethod(l, "PushMatrix", gl_PushMatrix);

RegisterValue(l, "QUADS", GL_QUADS);
RegisterValue(l, "LIGHTING", GL_LIGHTING);
RegisterValue(l, "LINE_LOOP", GL_LINE_LOOP);
RegisterValue(l, "POLYGON", GL_POLYGON);
RegisterValue(l, "PROJECTION", GL_PROJECTION);
RegisterValue(l, "MODELVIEW", GL_MODELVIEW);
RegisterValue(l, "BLEND", GL_BLEND);
RegisterValue(l, "TEXTURE_2D", GL_TEXTURE_2D);
RegisterValue(l, "TEXTURE_MAG_FILTER", GL_TEXTURE_MAG_FILTER);
RegisterValue(l, "TEXTURE_MIN_FILTER", GL_TEXTURE_MIN_FILTER);
RegisterValue(l, "LINEAR", GL_LINEAR);
RegisterValue(l, "NEAREST", GL_NEAREST);
RegisterValue(l, "SRC_ALPHA", GL_SRC_ALPHA);
RegisterValue(l, "ONE_MINUS_SRC_ALPHA", GL_ONE_MINUS_SRC_ALPHA);
lua_settable(l, LUA_GLOBALSINDEX);

lua_pushstring(l, "glu");
lua_newtable(l);
RegisterMethod(l, "LookAt", glu_LookAt);
RegisterMethod(l, "Ortho2D", glu_Ortho2D);

I'd like to add the gl_LineWidth command to allow line smoothing for Lua distance markers too. So, I could add GL_POINTS as well it if it appears to be useful. Just let me know...


Thanks, I was looking in the source code for that. I think that GL_POINTS would be very useful.
May the FORCE BE WITH YOU

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #211by ElChristou » 20.06.2007, 02:38

Vincent, those 3 options are quite cool!
Image

cwiz
Posts: 1
Joined: 04.08.2007
With us: 17 years 3 months

Post #212by cwiz » 04.08.2007, 19:31

very cool.

Now I don't have to write my own version. That saves me loads of time and money. hehe.

DT
Posts: 49
Joined: 27.08.2007
With us: 17 years 3 months
Location: In Orbit...

Post #213by DT » 28.08.2007, 14:25

This is already possible by editing the config.lua file.
The last version of the Lua Tools is available here:
http://shatters.net/forum/viewtopic.php?t=10352

Is this the one you've tested ?


I just went through the config file, that's excellent. The version I am testing is the one that is attached to your signature, it looks to be the same link.

As I said before, I would like it to replace the Menu bar, it makes Celestia more immersive.

Excellent work.
A whack in the face with a fish can solve a whole manner of problems.

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

Post #214by ANDREA » 28.08.2007, 15:46

Vincent, sorry for asking it once again, but do you have any (good) news about sound capability in Lua Edu Tools for Celestia 1.5?
Tks for your patience. :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

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

Post #215by fsgregs » 29.08.2007, 01:31

Vincent:

I too am most anxious for any word about sound. Since you built it into Celestia-ED 141, it has been a GREAT feature. I use it throughout all 12 educational activities. My students love it.

The overlay feature that is part of Celestia-ED 1.4.1 is also a vital part of the program. I know LUA tools incorporate lots of new overlay features, but the spacecraft cockpit overlays in Celestia-ED 1.4.1 are really wonderful. Hopefully, they would not be too difficult to incorporate into 1.5.0 also :)

Frank

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

Post #216by Vincent » 29.08.2007, 10:23

ANDREA wrote:Vincent, sorry for asking it once again, but do you have any (good) news about sound capability in Lua Edu Tools for Celestia 1.5?
Tks for your patience. :wink:

fsgregs wrote:I too am most anxious for any word about sound. Since you built it into Celestia-ED 141, it has been a GREAT feature. I use it throughout all 12 educational activities. My students love it.

The overlay feature that is part of Celestia-ED 1.4.1 is also a vital part of the program. I know LUA tools incorporate lots of new overlay features, but the spacecraft cockpit overlays in Celestia-ED 1.4.1 are really wonderful. Hopefully, they would not be too difficult to incorporate into 1.5.0 also :)

Andrea, Frank,

Please see http://celestiaproject.net/forum/viewtopic.php?t=11429

Frank, the spacecraft cockpit overlays can already be displayed via the current Lua interface. I can help you to do that if you want.
@+
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

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

Post #217by Vincent » 30.08.2007, 06:52

DT wrote:I just went through the config file, that's excellent. The version I am testing is the one that is attached to your signature, it looks to be the same link.
Thanks ! I'll post an updated version very soon.

DT wrote:As I said before, I would like it to replace the Menu bar, it makes Celestia more immersive.

Are you saying that you'd like the Lua Tool bar to replace the standard Menu bar, or that you'd like the Lua Tool bar to be hidden to make Celestia more immersive ?

In the first case, you can switch to full screen mode with [Alt] + [Enter].
As for hidding the Tool bar, I've been thinking about it. So far, this could be done with a simple click. However, it would be nicer to bring the Lua Tool bar up when the mouse reaches the right hand side of the window, and to make it disappear automatically otherwise. That would require another Hook in the code, though.
@+
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

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #218by ElChristou » 30.08.2007, 11:31

Vincent wrote:...That would require another Hook in the code, though.


If possible, is there a problem to not add this hook?
Image

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

Post #219by Vincent » 31.08.2007, 09:31

ElChristou wrote:
Vincent wrote:...That would require another Hook in the code, though.
If possible, is there a problem to not add this hook?

Chris,

I think you know the problem as well as I do :wink: : the current development of Celestia is at a standstill, and there are priorities on which the dev team has to focus before discussing this kind of adds.
@+
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

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #220by ElChristou » 31.08.2007, 11:25

Vincent wrote:
ElChristou wrote:
Vincent wrote:...That would require another Hook in the code, though.
If possible, is there a problem to not add this hook?
Chris,

I think you know the problem as well as I do :wink: : the current development of Celestia is at a standstill, and there are priorities on which the dev team has to focus before discussing this kind of adds.


:wink:, yep... but actually as there is no dev at all... I was thinking adding a hook should not be so problematic... :?
Image


Return to “Celestia in Education”