Lua Edu Tools beta version
Ramon,
The current version of Celestia Edu doesn't integrate the sound playback.
I don't know if Hank has got some plans about this...
Vincent/Hank:
Is this true? Sound is a VITAL part of a Celestia educational version. Its use is wonderful in a computer lab or home setting. The sub-routine MUST be in Celestia-edu. Did you take it out on purpose?
Wouldn't it be easier and cooler to integrate those bottons in the cockpit, in other words, redesign the cockpit so that the buttons would fit into it?
Frank,
I'm for Anders' idea. I'll mind the Celestia-ED version when I'm finished with the Lua Edu Tool.
What about overlay textures? Will the ship cockpit overlay be in this new edu version? If not, that too is most distressing. My students LOVE the cockpit.
If the cockpit overlay is present, then the position of the compass and taskbar at the bottom of the screen is an issue. A circular compass would be located smack in the middle of some gauges and dials on the cockpit.
Here is a cockpit screen as currently displayed in a 1024x768 display:
You have been a wonderful resource to kids all over the world. Your educational version of Celestia is already inside hundreds of classrooms in over 20 countries now. I know this is a lot to think about. However, if this new version is being designed for use in a classroom or by students at home or in a computer lab, then I beg you to accomodate all our needs ... a taskbar ... a compass ... sound and cockpit overlays. It just has to be laid out that way.
convenez-vous ?
Frank
I tested new test version...
Oh, it is actually useful! I had rushed for a conclusion...
Viewpoint problem on the surface of an object:
With enabling compass and alt-azimuth mode, and keeping left or right arrow key pressed, the camera suddenly bend down its head at the low elevation(about 0~30 degrees, especially when the horizon is in sight).
(This already exists in former version.)
What a surprising solution it is!Vincent wrote:- No more localization problem. Just edit the 4 characters in the compass.png image. A compass.psd file containing all the layers is provided in the 'images' folder.
Vincent wrote:I was testing a new function that brings the observer to a distance from selection that makes it fit the screen, for any value of fov. That is particularly useful when the users wants to quit the planetarium mode and select new values of longitude and latitude. That works perfectly for planets, stars, etc..., but unfortunately, not for locations, as you noticed, because their radius is too small.
I can allocate this function to the [shift]+[G] keys, instead of the single [G] key. This way, both the standard 'goto' and the new 'gotoToFit' function will be available...
Oh, it is actually useful! I had rushed for a conclusion...
Viewpoint problem on the surface of an object:
With enabling compass and alt-azimuth mode, and keeping left or right arrow key pressed, the camera suddenly bend down its head at the low elevation(about 0~30 degrees, especially when the horizon is in sight).
(This already exists in former version.)
-Suι
-
Topic authorVincent
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 20 years
- Location: Nancy, France
Frank,fsgregs wrote:Is this true? Sound is a VITAL part of a Celestia educational version. Its use is wonderful in a computer lab or home setting. The sub-routine MUST be in Celestia-edu. Did you take it out on purpose?
As we did for the Information Text and Images, we will do our best to add the possibility to play sound, and even video to the celestia Edu Tools, since they're both very important educationnal means.
fsgregs wrote:What about overlay textures? Will the ship cockpit overlay be in this new edu version? If not, that too is most distressing. My students LOVE the cockpit.
You must care about the difference between the ED features that will be used via the Lua Edu Tools, and the ones that will be used via scripts.
If you're keeping the logic of the previous version of Celestia-ED, the cockpit overlay texture needs to be displayed via a script. This also applies to the sound playback... The Lua Edu Tools have (almost) nothing to do with celx scripts...
Hank and I will mind the possibility to use the Lua functions (overlay textures, etc...) using celx scripts after the Lua Edu Tools are ready to be released.
Paolo, Sui Ota,
I'll reply to your posts in a couple of hours.
Have to go back to my professionnal work now....
Last edited by Vincent on 09.11.2006, 16:40, edited 1 time in total.
@+
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
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
- Chuft-Captain
- Posts: 1779
- Joined: 18.12.2005
- With us: 19 years 1 month
Vincent wrote:As you suggested, I first wanted to set the standard format to little-endian (day/month/year). But that would have required a 'en.lua' localization file to be added to give the possibility to native english users to use the middle-endian date format (month/day/year).
But if a majority of native english users also want to use the little-endian format (day/month/year), I will set it as the default one...
No big deal, Vincent.
I wonder if LUA can just pick up the appropriate formats to use from the culture/locale set in the user's OS? eg. In Windows: "Regional and Language Settings"
Regarding your comment about native english users, I think date format preference has more to do with locale and personal preference, than language spoken. eg. AFAIK, most of Europe would usually use either little or big endian, regardless of native language. (I may be wrong though)
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)
CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS
-- Gerard K. O'Neill (1969)
CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS
-
Topic authorVincent
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 20 years
- Location: Nancy, France
Hello Paolo,
As we talk about 3D rendering, the nicest way to render the compass would be to use a cylinder with a base parallele to the ground and that would rotate around the UP axis... I think that would satisfy everybody. But sorry, I'm not Chris...
Then, it would be possible to give the user the possibility to choose between 3 fixed positions, like the one you've suggested : Left-Right-Middle. But that would require again to add a new setting box...
Again, that could be easily done via a setting box, with a slider... I just fear that Lua tools become too complicated to use...
Well, the current Lua functions that call Celestia Core OpenGL functions only support 2D rendering. Changing the code in celx.cpp to allow the Lua code to use 3D OpenGL functions would be easy. But then, I don't feel like dealing with 3D rendering for now...Paolo wrote:Hello Vincent is it possible to add some "inclination" to the compass in order to reduce the amount of space covered adding some "3D effect"?
As we talk about 3D rendering, the nicest way to render the compass would be to use a cylinder with a base parallele to the ground and that would rotate around the UP axis... I think that would satisfy everybody. But sorry, I'm not Chris...
Hank has already added the possibility to move the different boxes with a left drag. However, that would be a little bit complicated to code for the compass since it has to rotate around its center...Paolo wrote:Is it possible to define the position of the compass? Left-Right-Middle
Then, it would be possible to give the user the possibility to choose between 3 fixed positions, like the one you've suggested : Left-Right-Middle. But that would require again to add a new setting box...
Paolo wrote:Is it possible do define the amount of transparency of the compass?
Again, that could be easily done via a setting box, with a slider... I just fear that Lua tools become too complicated to use...
@+
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
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 authorVincent
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 20 years
- Location: Nancy, France
Sui Ota,Sui Ota wrote:Viewpoint problem on the surface of an object:
With enabling compass and alt-azimuth mode, and keeping left or right arrow key pressed, the camera suddenly bend down its head at the low elevation(about 0~30 degrees, especially when the horizon is in sight).
(This already exists in former version.)
Is this issue still happening with the latest update of the Celestia_edu_1pre3.zip file ? I thought I had fixed this bug... Besides, I can't reproduce it on my system...
CC,Chuft-Captain wrote:I wonder if LUA can just pick up the appropriate formats to use from the culture/locale set in the user's OS? eg. In Windows: "Regional and Language Settings"
The os.date() lua function returns the date with the locale format, e.g. like "09/11/2006". Of course, we can't use it since we need the simulation time, not the current time. And it's not possible to get the local format from this string, since it could be 09/Nov/2006 as well as 11/Sept/2006...
Chuft-Captain wrote:Regarding your comment about native english users, I think date format preference has more to do with locale and personal preference, than language spoken. eg. AFAIK, most of Europe would usually use either little or big endian, regardless of native language. (I may be wrong though)
I was assuming that middle endian users could only be found among the native english users. Anyway, I will follow your suggestion and set the little endian format (day/month/year) as the default one.
@+
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
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
Vincent wrote:Is this issue still happening with the latest update of the Celestia_edu_1pre3.zip file ? I thought I had fixed this bug... Besides, I can't reproduce it on my system...
I first downloaded Celestia_edu_1pre3.zip only after 5 minutes by you posted the link.
I downloaded the file again, and I could not reproduce the bug no longer.
-Suι
Vincent wrote:I was assuming that middle endian users could only be found among the native english users. Anyway, I will follow your suggestion and set the little endian format (day/month/year) as the default one.
I would like to suggest Big endian as default. Year month day. So everyone will have to change a bit and there won't be never mistakes.
kind regards
Because the time used within Celestia to calculate spacecraft and other locations is what is known as barycentric dynamical time, or TDB. The time shown on the display is UTC, which includes leap seconds and other offsets which TDB does not.
For more details, please see http://en.wikibooks.org/wiki/Celestia/Time_Scales
which Chris created just recently.
For more details, please see http://en.wikibooks.org/wiki/Celestia/Time_Scales
which Chris created just recently.
Selden
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years
- Location: Seattle, Washington, USA
selden wrote:Because the time used within Celestia to calculate spacecraft and other locations is what is known as barycentric dynamical time, or TDB. The time shown on the display is UTC, which includes leap seconds and other offsets which TDB does not.
For more details, please see http://en.wikibooks.org/wiki/Celestia/Time_Scales
which Chris created just recently.
Selden's right. The normal time display shows UTC, but the Lua EDU time display shows barycentric dynamical time. We need to add some time conversion functions for Lua so that it can also display UTC.
--Chris
-
Topic authorVincent
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 20 years
- Location: Nancy, France
Jedi wrote:Has anyone else noticed that the time in displayed in the new box is always 1 min 5 sec ahead of the system time. Clearly the objects are placed according to the system time. Why the difference?
selden wrote:Because the time used within Celestia to calculate spacecraft and other locations is what is known as barycentric dynamical time, or TDB. The time shown on the display is UTC, which includes leap seconds and other offsets which TDB does not.
For more details, please see http://en.wikibooks.org/wiki/Celestia/Time_Scales
which Chris created just recently.
Yes, I've also noticed that. Fortunately, I had read Chris' explanation on the dev mailing list a few days before :
http://sourceforge.net/mailarchive/foru ... um_id=9864
If not, I could have searched a clue for a very long time...
@+
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
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 authorVincent
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 20 years
- Location: Nancy, France
Paolo wrote:Is it possible to define the position of the compass? Left-Right-Middle
OK, I have something even better : you can now move the compass box anywhere on the screen.
> http://vincent.gian.club.fr/celestia/Ce ... _1pre3.zip
Just click in the compass to display the red background, and then click and drag from one corner of the compass box.
However, the size of the compass box now varies with the screen size... I hope I'll find a fix, though it doesn't look that simple...
That was the reason why I had first unactivated the possibility to move the boxes.
[EDIT]
Oops, I forgot to remove the display of some test values... It's OK now.
[/EDIT]
@+
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
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 authorVincent
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 20 years
- Location: Nancy, France
Vincent wrote:However, the size of the compass box now varies with the screen size... I hope I'll find a fix, though it doesn't look that simple...
That was the reason why I had first unactivated the possibility to move the boxes.
OK, I've found a solution to that problem, making the compass box go back to its initial position when the size of the screen has changed.
Would you find it useful to make all other boxes (time, light, text,...) movable ?
I've also found a way to unactivate the display of the standard time when a Lua Hook is declared in the celestia.cfg file. That way, only the Lua Tool Time box is displayed at the top right hand corner of the screen. In fact, the standard Time is simply replaced by the Lua Time Box.
However, I had to change the Core code, adding a displayTime boolean value (celestiacore.cpp/celestiacore.h files).
Chris, Hank, please let me know if you're OK with these changes :
> http://vincent.gian.club.fr/celestia/displayTime.patch
@+
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
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
Vincent wrote:Hello Paolo,Well, the current Lua functions that call Celestia Core OpenGL functions only support 2D rendering. Changing the code in celx.cpp to allow the Lua code to use 3D OpenGL functions would be easy. But then, I don't feel like dealing with 3D rendering for now...Paolo wrote:Hello Vincent is it possible to add some "inclination" to the compass in order to reduce the amount of space covered adding some "3D effect"?
As we talk about 3D rendering, the nicest way to render the compass would be to use a cylinder with a base parallele to the ground and that would rotate around the UP axis... I think that would satisfy everybody. But sorry, I'm not Chris...
It should be not so difficult.
Code: Select all
drawcompass = function ()
local az_rad = az*3.14159/180;
lb,bb,rb,tb = compassFrameBox:bounds();
celestia:print(tb.." "..tb0)
local xlb, ylb = rot(lb, bb, az_rad);
local xrb, yrb = rot(rb, bb, az_rad);
local xrt, yrt = rot(rb, tb, az_rad);
local xlt, ylt = rot(lb, tb, az_rad);
compassImage:bind();
local zval = 1;
-- Prepare 3D environment
gl.MatrixMode(GL_PROJECTION);
gl.PushMatrix();
gl.LoadIdentity();
glu.Perspective(35, width4/height4, 0.1, 1000);
gl.MatrixMode( GL_MODELVIEW );
gl.PushMatrix();
gl.LoadIdentity();
gl.Rotate(0.15,0,0);
-- Draw 3D texture
gl.Enable(gl.TEXTURE_2D);
gl.Begin(gl.QUADS);
gl.Color(1, 1, 1, 0.5);
gl.TexCoord(0, 1); gl.Vertex(xlb, ylb, zval);
gl.TexCoord(1, 1); gl.Vertex(xrb, yrb, zval);
gl.Color(1, 1, 1, 0.5);
gl.TexCoord(1, 0); gl.Vertex(xrt, yrt, zval);
gl.TexCoord(0, 0); gl.Vertex(xlt, ylt, zval);
gl.End();
gl.Disable(gl.TEXTURE_2D);
-- restore 2D environment
gl.MatrixMode(GL_PROJECTION);
gl.PopMatrix();
gl.MatrixMode(GL_MODELVIEW);
gl.PopMatrix();
end
It should work.... I think but I'm not an OpenGl guru too....
Kind regards
-
Topic authorVincent
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 20 years
- Location: Nancy, France
Paolo,
The problem is that we can't use all the OpenGL functions directly in the Lua code. There's no binding of the OpenGL functions currently integrated into the Celestia code. For example, the glu.Perpective and gl.Rotate functions are not available. Just check the celx.cpp file to know what are the (2D) functions currently available.
So, before trying your piece of code, I had to implement these two functions, along with the Vertex3D function. Then, I've made the needed changes in your compass.lua file... unfortunately, with no result : the compass image is not displayed anymore. Maybe you just have to make some more testing with your different values. If you wish to do so, I can send you the recompiled celestia_edu.exe file that integrates the needed openGL function, along with the modified compass.lua file. Just let me know...
Chris, Hank, just a thought : wouldn't it be more interesting to integrate the LuaGL library to the code, since LuaGL contains the binding of all the OpenGL functions ?
> http://luagl.sourceforge.net/
The problem is that we can't use all the OpenGL functions directly in the Lua code. There's no binding of the OpenGL functions currently integrated into the Celestia code. For example, the glu.Perpective and gl.Rotate functions are not available. Just check the celx.cpp file to know what are the (2D) functions currently available.
So, before trying your piece of code, I had to implement these two functions, along with the Vertex3D function. Then, I've made the needed changes in your compass.lua file... unfortunately, with no result : the compass image is not displayed anymore. Maybe you just have to make some more testing with your different values. If you wish to do so, I can send you the recompiled celestia_edu.exe file that integrates the needed openGL function, along with the modified compass.lua file. Just let me know...
Chris, Hank, just a thought : wouldn't it be more interesting to integrate the LuaGL library to the code, since LuaGL contains the binding of all the OpenGL functions ?
> http://luagl.sourceforge.net/
@+
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
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
Vincent wrote:wouldn't it be more interesting to integrate the LuaGL library to the code, since LuaGL contains the binding of all the OpenGL functions
Not only interesting, it will also be an extremely useful and flexible feature with which rendering addons can be developed without touching the core code.
Joe
Sorry Vincent, but I think that I've missed something very important. When moving in 3D space using gluPerspective probably your LUA tools uses the same "space" of celestia and so the vertex coordinate values are almost meaningless. Here we need the support of someone more competent in OpenGL.
Kind regards
Kind regards