Page 1 of 1
LongLat and Orientation, how do they works, $#@%&*! ?
Posted: 14.07.2005, 19:12
by Cham
Let say I want to place a plane tangent to some fictious planet P. The plane is defined as a 3ds model and is oriented horizontaly in the 3D modeler. So in the ssc file, I define the position of the plane on the planet using the LongLat command :
LongLat [A B C]
where A, B and C are respectively the Longitude, Latitude and Altitude coordinates (am I correct, please?). But WHAT UNITS ARE THEY USING !?
And then, the plane isn't oriented properly on the planet. It isn't tangent to the surface. So I have to use the Orientation command :
Orientation [D E F G]
where D is an angle (in degrees), and E, F, G are the three components of some UNIT vector which defines the orientation axis. We must have this equation satisfied :
But then, HOW DO I CALCULATE THOSE $#@%&* FOUR NUMBERS D E F G ?
I want the exact mathematical formula !
P-p-p-p-please help somebody !
Posted: 14.07.2005, 19:41
by Cham
To be more specific, consider the two pictures below. What I understand, is this. The longitude angle is the angle Phi depicted, while the Latitude is 90 degrees minus the angle Theta below. The Altitude C isn't relevent here.
If I'm right, the unit vector that I need ( E, F, G ) is the vector "n" depicted on the pictures. Its components E, F, G should be the ones on the picture. Right ?
The angle Alpha should be indentical to D, but it isn't relevent either.
Then, the components are easy to calculate using the trigonometric functions. BUT IT DOESN'T WORKS !
Posted: 14.07.2005, 20:58
by selden
Have you looked at Grant Hutchison's explanation for how to place a body on a planet's surface? It's at
http://www.lepp.cornell.edu/~seb/celestia/hutchison/defined_locations-130.html
Posted: 14.07.2005, 21:03
by Cham
Selden,
It doesn't explain the LongLat and Orientation commands.
Posted: 14.07.2005, 21:56
by Cham
How do you create the align.log file on a Macintosh ?
Maybe the "Edit mode" could be usefull. I can activate the Edit mode easily, but I'm unable to trigger the align.log. Shift-1 doesn't work.
Posted: 14.07.2005, 22:57
by ElChristou
I had the same problem with the stack... an align.log file is created inside the Celestia package, but the file is completly clear...
Posted: 14.07.2005, 23:01
by jestr
Cham I have found the following equations work fine with most models.
LongLat [ a, b, c ]
Orientation [ b,1,0,0 ]
RotationOffset a+planet or moon's RotationOffset-90
where a=longitude
b=latitude
c=height
the units are degrees for Latitude and Longitude and km for altitude.
This works if you are looking orthogonally down on the base of the model (landscape) in the Top viewport of your modelling program.Hope this helps Jestr
Posted: 14.07.2005, 23:17
by Cham
jestr wrote:Cham I have found the following equations work fine with most models.
LongLat [ a, b, c ]
Orientation [ b,1,0,0 ]
RotationOffset a+planet or moon's RotationOffset-90
where a=longitude
b=latitude
c=height
the units are degrees for Latitude and Longitude and km for altitude.
This works if you are looking orthogonally down on the base of the model (landscape) in the Top viewport of your modelling program.Hope this helps Jestr
Jestr,
you are my hero ! It works like a charm !
Guys, let put this formula inside some golden box somewhere on the forum. It's very important !
Posted: 14.07.2005, 23:24
by Cham
Here it is, Jestr's formula :
Posted: 14.07.2005, 23:42
by jestr
Thanks mate,I guess if you have a big landscape though you might need to curve it to fit with the surface of a planet,and the formulae may need some tweaking for worlds such as Venus (retrograde rotators).Jestr
Posted: 14.07.2005, 23:53
by Cham
I think that we should all start to add nice landscapes to our Celestia worlds. Here's a timid start :
Posted: 14.07.2005, 23:59
by rthorvald
jestr wrote:Cham I have found the following equations work fine with most models.
LongLat [ a, b, c ]
Orientation [ b,1,0,0 ]
RotationOffset a+planet or moon's RotationOffset-90
This is very, very cool! Thanks!!
-rthorvald
Posted: 15.07.2005, 00:12
by jestr
It would be nice to also have the ability to set RotationPeriod (around an axis,at 90 degrees to the surface?) for these objects so you might have a cloud of an erupting volcano rotating to give the appearance of a cloud ascending,or the giant red spot of Jupiter revolving,,and to be able to have other objects (spaceships?) orbiting around them,Jestr
Posted: 15.07.2005, 00:19
by Cham
jestr wrote:It would be nice to also have the ability to set RotationPeriod for these objects so you might have a cloud of an erupting volcano rotating to give the appearance of a cloud ascending,or the giant red spot of Jupiter revolving,,and to be able to have other objects (spaceships?) orbiting around them,Jestr
In principle, this is possible with some ssc definitions. The real problem is the depth sorting problem in Celestia. I already tried some months ago to make an erupting volcano. The moving smoke and flames were looking weird near their crater. Sometimes, the crater was looking in front of the flames, and if you rotate around, the reverse may happen !
This is a project I abandoned.
Posted: 15.07.2005, 00:23
by jestr
Cham I think this is a transparency bug not a depth sorting problem-I assume you were using a semi transparent texture for the clouds?DDS (DXT3) seems to have a strange semi-transparent effect with mountains (in particular),Jestr
Posted: 15.07.2005, 00:34
by Cham
Transparency bug? I don't think I've experienced that one.
Yes, I was using several semi-transparent textures. Some were used for the rotating cone of smoke, and some were used as flowing lava. The problem occured when some parts was supposed to be on the foreground and the volcano on the background (behind), but Celestia was showing the reverse. Exactly the same problem we experiencd with our nebulae experimentation (remember, Jestr ?).
Posted: 15.07.2005, 00:38
by jestr
As far as I have noticed the depth sorting problem is just with DSC objects though not with those defined with SSC's.Jestr
EDIT:try making the textures opaque with NO alpha channel (as an experiment) or perhaps try making the objects semi-transparent in your modelling software