Pointing Hubble

Post requests, images, descriptions and reports about work in progress here.
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #41by chris » 08.12.2006, 08:07

chris wrote:
Vincent wrote:Chris,

I've just noticed a significant FPS drop that seems to be linked to the ScriptedRotation definition :
- When I go to 'hubble-fov' with the following .ssc, my FPS goes down to ~0.75. This happens even when the Lua Tools are not running.

I found this bug last night; the orientation computed by the script isn't getting cached. I will commit the one-line fix to scriptrotation.cpp tonight.


The problem should be fixed now.

--Chris

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

Post #42by Vincent » 08.12.2006, 11:20

I've just synched with CVS and I confirm that the problem is fixed.
Thanks Chris.
@+
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
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #43by Vincent » 10.12.2006, 13:34

Chris,

I've used Selden's graticules addon to display Hubble's x,y,z axis within
Celestia in order to compare Hubble's model orientation as seen in
Anim8or and in Celestia. Here are the results :

- Anim8or's views :
Image

- Celestia's views :
Image

------------------------------------------------------------------------------------
>> Except the z axis inversion, there seems to be no orientation offset
between Hubble's model and Celestia's axes.
So, unless I missed something important, this tends to show that the offset
problem doesn't come from Hubble default orientation... Chris, are you
using the CVS version of spacecraft.ssc ? Do you have any other .ssc
correction about Hubble in your extras folder ?
------------------------------------------------------------------------------------

As a second /less important/ point, we can also notice that Celestia
doesn't keep the default location of the model about the origin.
As for that, it would be useful to fix as a convention that the models
must be centerd about the origin in the 3D modeling software. For
example, this can be easily done in Anim8or using the "Center about
origin" option.
Last edited by Vincent on 10.12.2006, 21:41, 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

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

Post #44by ElChristou » 10.12.2006, 13:40

Vincent wrote:...As for that, it would be useful to fix as a convention that the models
must be centerd about the origin in the 3D modeling software. For
example, this can be easily done in Anim8or using the "Center about
origin" option.


Not sure all the modeler have such feature...
Image

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

Post #45by Vincent » 12.12.2006, 19:19

Chris,

I'm currently working on adding a "Custom Rotation Mode" on top of the "Track Target Mode" already included in the Lua Tools. This will allow user to make Hubble rotate around its X, Y, Z axis using some "Rot X", "Rot Y", Rot Z" buttons. So far, I'm able to make Hubble rotate perfectly around one single axis (X, Y or Z). But I'm having problems when I want Hubble to perform a composition of rotations around two or three axis. This is because Hubble's rotation frame is not actualized everytime a rotation is done., i.e., the rotation frame is not fixed to the telescope.

Here's an illustration (a picture is worth a thousand words...)

1- Hubble in its initial frame. No rotation has been performed.
Image

2- A rotation was performed around the X axis (Cyan-Magenta) with a click on the "Rot X" button.
Image

3- Then, if I click the "Rot Z" button, the new rotation will be done around the former Z axis (green-red), since the rotation frame is not fixed to the telescope, whereas it should be done around Hubble current Z axis (= optical axis).

So, is it currently possible to actualize the rotation frame in the aimproto:orientation(tjd) function (orbits.lua file) everytime a rotation is performed ?

Here's a test package if needed : http://vincent.gian.club.fr/celestia/hu ... a_test.zip
@+
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
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #46by selden » 24.05.2007, 11:55

I've finally managed to determine why the "aim" Lua function originally provided by Chris doesn't seem to work correctly.

The "aim" function is performing all of its orientatation calculations and returning its result in the "Universal" (EclipticJ2000) coordinate system, but the actual BodyFrame of Hubble is something different.

One needs either to Modify the BodyFrame of the object (Hubble in this case) to be "EclipticJ2000" or one needs to transform the returned value of "aim" into the object's local BodyFrame.

Unfortunately, the latter is what is really needed, since there are likely to be other constraints on the object's orientation.

Vincent (or other Lua expert), what would be the appropriate Lua code to do the transformation from the Universal coordinate system to the object's current BodyFrame?
Selden

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

Post #47by Vincent » 25.05.2007, 10:25

selden wrote:Vincent (or other Lua expert), what would be the appropriate Lua code to do the transformation from the Universal coordinate system to the object's current BodyFrame?

Selden,

I haven't had the time yet to dive back into the Pointing Hubble addon and its issue, but you you might want to try this:

Code: Select all

-- Define a new frame using Hubble as the reference object:
hubble = celestia:find("Hubble")
hubble_frame = celestia:newframe("planetographic", hubble)

-- Transform the position from the Universal system to the hubble_frame system:
h_pos = hubble_frame:to(u_pos)


I'll try to have a deeper look at this as soon as possible.
Last edited by Vincent on 25.05.2007, 20:50, 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

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #48by chris » 25.05.2007, 18:13

selden wrote:I've finally managed to determine why the "aim" Lua function originally provided by Chris doesn't seem to work correctly.

The "aim" function is performing all of its orientatation calculations and returning its result in the "Universal" (EclipticJ2000) coordinate system, but the actual BodyFrame of Hubble is something different.

One needs either to Modify the BodyFrame of the object (Hubble in this case) to be "EclipticJ2000" or one needs to transform the returned value of "aim" into the object's local BodyFrame.

Unfortunately, the latter is what is really needed, since there are likely to be other constraints on the object's orientation.

Vincent (or other Lua expert), what would be the appropriate Lua code to do the transformation from the Universal coordinate system to the object's current BodyFrame?


I would say that changing the BodyFrame of Hubble is the right approach right now. The support for frames in Lua needs to be updated to support 1.5.0 style reference frames. Currently, you can only operate on the much less flexible old style frames.

--Chris

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

Pointing Hubble v0.4

Post #49by selden » 26.05.2007, 15:26

An updated version of "Pointing Hubble" which points the HST toward the Selected object of your choice is now available at
http://www.lepp.cornell.edu/~seb/Celestia/files/pointing-hubble_v04.zip
(160 KB)

This Addon requires Celestia v1.5.0pre3 or later. It uses a Scripted Rotation which takes advantage of Lua environment changes made available in that release.
Selden

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

Re: Pointing Hubble v0.4

Post #50by ElChristou » 26.05.2007, 17:11

selden wrote:An updated version of "Pointing Hubble" which points the HST toward the Selected object of your choice is now available at
http://www.lepp.cornell.edu/~seb/Celestia/files/pointing-hubble_v04.zip
(160 KB)

This Addon requires Celestia v1.5.0pre3 or later. It uses a Scripted Rotation which takes advantage of Lua environment changes made available in that release.


Tx Selden, works fine! :P

One thing that would be cool to add is a message on screen when Earth is between hubble and it's target; seems tricky but... would be nice...
Image

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

Post #51by Cham » 27.05.2007, 18:37

Selden

that new addon doesn't work well :

1- I'm getting an EXTREMELLY slow and laggy FOV zoom. It's unusable.

2- the Hubble FOV frame isn't properly aligned with M16. I also tried my old version (which was perfectly aligned with Hubble's grid), but it isn't aligned anymore. See the picture below :

Image

There's yet another bug somewhere.
"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
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Post #52by Cham » 27.05.2007, 19:17

I've identified three or four things which are showing something is wrong with Celestia :

1- showing the nebulae gives an extremelly laggy animation. My FPS is dropping dramatically as soon as I switch ON the nebulae. With most of the previous builds, it was acceptable. Now, it isn't.

2- using your addon, I noticed there's a smalll unidentifiable object visible at the center. See the picture below. The red arrow is indicating that "fly", which shouldn't be there :

Image

That small object is scale independant (can't zoom on it). Here's another screen capture of it :

Image

3- the zoom function is now extremelly laggy, even if only one nebula is showing on screen. There's a clear problem with the FOV zooming at high magnification.

4- Hubble's grid isn't properly aligned anymore, relative to M 16, while it was absolutly perfectly aligned before.

EDIT : I just realised what that "fly" actually is : it is the Hubble's model itself, showing as a tiny object ! I don't understand what it is doing there, but it is the Hubble model !! :?
"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
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #53by selden » 27.05.2007, 20:05

Cham wrote:I've identified three or four things which are showing something is wrong with Celestia :

1- showing the nebulae gives an extremelly laggy animation. My FPS is dropping dramatically as soon as I switch ON the nebulae. With most of the previous builds, it was acceptable. Now, it isn't.
I'm getting 30fps using an Nvidia 7800GTX.
I have not had an opportunity to try this Addon on a slower system, but getting less than 60fps does suggest that there's more overhead than there used to be. The two 3DS Nebula objects in this Addon are simple cube "billboard" objects, each with a 512x512 jpeg image on it. The 3DS model used for the fov image has no transparent materials to cause problems, either.

2- using your addon, I noticed there's a smalll unidentifiable object visible at the center. See the picture below. The red arrow is indicating that "fly", which shouldn't be there
I see no such object on my Windows system.

3- the zoom function is now extremelly laggy, even if only one nebula is showing on screen. There's a clear problem with the FOV zooming at high magnification.
The slowest I've seen is 25fps.

4- Hubble's grid isn't properly aligned anymore, relative to M 16, while it was absolutly perfectly aligned before.
If you mean that it is rotated relative to the picture, then that's just the way it is. As I mentioned in the readme, the rotational orientation of the hubble-fov model on the "plane of the sky" is not controllable in this version of the Addon. I hope to make this possible in a future version. It is pure chance that the rotational orientation of the fov model in the previous TwoVector BodyFrame versions matches the orientation of the picture of M16.

On the other hand, if you mean that the fov is offset to one side or another, that would happen if your viewpoint is displaced too far to one side or another of the object at "hubble-pov", causing a parallax between "hubble-fov" and the target.
EDIT : I just realised what that "fly" actually is : it is the Hubble's model itself, showing as a tiny object ! I don't understand what it is doing there, but it is the Hubble model !! :?


What do you see if you type "t*" (turn off Track, look backward)?

When you do that, you should see the "real" Hubble telescope model. It should be extremely large in Celestia's window. You'll have to reduce magnification, returning Celestia to a field of view that is 20 or 40 degrees or more across. If you don't see Hubble there, then perhaps the bug is the "real" Hubble and somehow your viewpoint is very far away from where it is supposed to be (at hubble-pov).
Selden

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

Post #54by selden » 27.05.2007, 20:21

For comparison, here is what I see when I use the Cel:// URL "Hubble fov: M16 pillars closeup", which is the last URL in the html file pointing_hubble_v04.html

Image

The rotation is "wrong", but the alignment looks OK.

[edit]
If there somehow is something different with how URLs are being interpreted for Macs compared to Windows, you should see essentially the same thing if you use the CEL script pointing_hubble_v04, wait until it has finished, and then type
[return]m16[return]
[/edit]
Last edited by selden on 27.05.2007, 20:30, edited 1 time in total.
Selden

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

Post #55by Cham » 27.05.2007, 20:23

Selden,

I tried everything to identify the "hubble fly". Yes, the real model is in my back, very close to me. While using the zoom, I still see the ""fly" at the center. So apparently, the FOV zooming isn't doing the proper action.

The Hubble's grid used to be perfectly aligned with M 16, with some previous versions of Celestia, if I'm placed at the proper point of observation (using an old script from you). No, it doesn't give an exactly aligned grid. I had to edit a bit the old SSC to place the grid at another location. Now, it's a bit better, but not perfect. Since this problem is occuring with the older addon too, this shows that Celestia has a problem.
"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!"

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #56by chris » 27.05.2007, 20:24

Cham wrote:Selden

that new addon doesn't work well :

1- I'm getting an EXTREMELLY slow and laggy FOV zoom. It's unusable.



Is it just this add-on that causes the slowdown? Celestia runs smoothly without it?

--Chris

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

Post #57by Cham » 27.05.2007, 20:29

Chris,

the slowdown is occuring all the time the nebulae are ON and it's independant of Selden's addon. Zooming at large magnification becomes completelly unusable and very laggy. It wasn't like this before.
"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
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #58by selden » 27.05.2007, 20:43

Cham,

I think your fov seems to be misaligned because you have more than one Nebula Addon named "M16".

Your screengrab shows a larger background image and I suspect that's the one Celestia has selected. The fov is properly aligned with the large Nebula, not with the small one. I'll make sure the example M16 Nebula has a unique name in the next version of my PointingHubble Addon.

To fix this problem, you can edit m16.dsc and change the name of the Nebula to something else (maybe m16_v4), then Select that name.
Selden

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

Post #59by Cham » 27.05.2007, 20:45

Okay, the Hubble's grid is now back to normal. I had to edit slightly its size in the SSC. Also, I'm not using the script anymore : I go directly to Hubble-pov (point of view, in front of the model), then center my view to M 16 (pillars of creation). Here's what I get (notice the PERFECT alignement) :

Image


But I still have this jerkiness (laggs) when playing with the FOV zoom. Also that annoying tiny "hubble fly" on the middle.
"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
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

v0.6

Post #60by selden » 11.06.2007, 19:40

pointing_hubble_v0.6 is now available at
http://www.lepp.cornell.edu/~seb/celest ... e_v0.6.zip (86KB)

The script has been completely rewritten in Lua. It now creates multiple views so you can have a better appreciation of what the telescope is doing. The largest window shows the fov. Other windows show a wide angle view of the fov, the telescope's orientation in Ecliptic coordinates, and the telescope's position over the Earth. A disadvantage is that the multiple views slow Celestia significantly.

As ElChristou suggested, there now is a warning message when the target is behind the Earth plus one when the telescope is pointing too close to the Sun.

Image
Selden


Return to “Add-on development”