Placing A Model On the Surface....

Post requests, images, descriptions and reports about work in progress here.
Topic author
Dollan
Posts: 1150
Joined: 18.12.2003
Age: 54
With us: 21 years 3 months
Location: Havre, Montana

Placing A Model On the Surface....

Post #1by Dollan » 18.04.2005, 04:28

... Of an asteroid. I am completely stumped. Of course, this is my first real foray into model manipulation.....

Can anyone give me an idea? For reference, the asteroid ssc file is:

Code: Select all

"Brost" "Sol"

   {
   Class      "Asteroid"
   Texture      "Brost.jpg"
   Mesh      "Brost.cmod"
   Radius      8.24
   EllipticalOrbit
      {
      Period      0.0438
      SemiMajorAxis   0.125
      Eccentricity   0.013
      Inclination   0.089
      }
   RotationPeriod   383.688
   Obliquity      0.98
   Albedo      0.14
   }


Thanks...
"To make an apple pie from scratch, you must first create the universe..."
--Carl Sagan

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 20 years 2 months

Post #2by ElChristou » 18.04.2005, 12:12

hello,

Well, one solution (and the easy way) is to edit the model of the asteroid (you will need a 3ds, you can not edit cmod) and place your second model in the same 3ds file...

bye
Image

Topic author
Dollan
Posts: 1150
Joined: 18.12.2003
Age: 54
With us: 21 years 3 months
Location: Havre, Montana

Post #3by Dollan » 18.04.2005, 14:14

Yeah, I'd thought of that. But for various reasons, I'd really prefer the dome to be a seperate object.

I was fiddling with it for some time last night, and had successes ranging from having the dome hovering up to 20 meters above the asteroid to having it well below the asteroid's surface. At one point, somehow, the dome was placed "in orbit" of the asteroid at a distance of nearly 4,000 *light years*. Still don't know how I managed that one. I gave up for the night when the dome reappeared back in orbit, but the temporary model itself dissapeared.

...John...
"To make an apple pie from scratch, you must first create the universe..."
--Carl Sagan

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

Post #4by selden » 18.04.2005, 14:38

John,

It sounds like you might be using Grant's old method of using dummy objects to place objects in non-physical orbits.

Starting with Celestia v1.3.2, you can use the .SSC directive LongLat to place an object relative to the surface of another object:

Code: Select all

"MyDome" "Sol/MyAsteroid" {
  Class "spacecraft"
  Mesh "dome.cmod"
  Radius 0.1
  LongLat [ 120 32 0.1 ] # longitude latitude altitude
}


The altitude is relative to a spherical surface, so you'll need to adjust it for irregular shapes.

You also may need to specify Orientation and RotationOffset to properly orient the dome, or you can change the object's orientation within the 3D model itself.

Does this help?
Selden

Topic author
Dollan
Posts: 1150
Joined: 18.12.2003
Age: 54
With us: 21 years 3 months
Location: Havre, Montana

Post #5by Dollan » 18.04.2005, 14:45

Hi Selden...

That DOES help!

Just to clarify, the altitude variable in the LongLat line.... is that in kilometers, meters?

...John...
"To make an apple pie from scratch, you must first create the universe..."
--Carl Sagan

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

Post #6by selden » 18.04.2005, 15:03

John,

I'm pretty sure it's in km.
Selden

Topic author
Dollan
Posts: 1150
Joined: 18.12.2003
Age: 54
With us: 21 years 3 months
Location: Havre, Montana

Post #7by Dollan » 18.04.2005, 15:04

Success! Here's a shot of the dome on the surface.

Image

The model is a temporary file of a hard hat... I need to make a proper dome suitable for covering the remains of a spaceship (opaque for now -- in the future I hope to have a "glass" dome so that the ship's remains can be seen within). If I can learn enough in a short time, I also want to make a plaque for the dome that would measure a few meters across, with a dedication written on it. We'll see, though. I tend to bite off more than I can chew!
"To make an apple pie from scratch, you must first create the universe..."
--Carl Sagan

Topic author
Dollan
Posts: 1150
Joined: 18.12.2003
Age: 54
With us: 21 years 3 months
Location: Havre, Montana

Post #8by Dollan » 18.04.2005, 15:59

Okay, I've come across a model that will serve for now. While it isn't a dome, per se, it does give a wonderful impression of a structure built to display the ruins of a spacecraft.

The problem is, it stands on end when I simply put on the asteroid. So I tried to fiddle with the orientation... and the model dissapears.

Thoughts?

...John...
"To make an apple pie from scratch, you must first create the universe..."
--Carl Sagan

jestr
Posts: 612
Joined: 14.09.2003
With us: 21 years 6 months
Location: Bridgwater,UK

Post #9by jestr » 18.04.2005, 16:26

When placing any model on the suraface of a planet/moon/asteroid,you need to use the RotationOffset command and the Orientation command to orient it correctly.Through trial and error I have found the following formulae seem to work
RotationOffset =Longitude+Planets RotationOffset-90
Orientation = [Latitude 1 0 0 ]
Where the Latitude and Longitude are where you decide to put it on the planet..This should work in most cases but may change if your model is oriented differently to start with .Hope this helps ,Jestr

Topic author
Dollan
Posts: 1150
Joined: 18.12.2003
Age: 54
With us: 21 years 3 months
Location: Havre, Montana

Post #10by Dollan » 18.04.2005, 19:47

Jestr, Selden, thank you both very much. I've pretty muched placed the station as best that I can. Here's a screen shot:

Image

I may still try to hit someone up for a better looking dome. Heck, maybe in one of those larger craters I can get someone to make a dome that would fit into it. *That* would look great. But for now, I'll settle for this.

...John...
"To make an apple pie from scratch, you must first create the universe..."
--Carl Sagan

BlindedByTheLight
Posts: 485
Joined: 19.03.2005
With us: 20 years
Location: Los Angeles, CA

Post #11by BlindedByTheLight » 19.04.2005, 20:01

Hey guys... I had posted something just now, then read this thread and thought it might be relevant to my earlier post.

What I was wondering is a question of possibility. The question is, "Is it possible to somehow pull the CURRENT latitutde and longtitude of the point in front of me on an object I am looking at and make a model appear dynamically at that point?"

In other words, can I "capture" the lat and longitude of a giant crater I am looking at?
Then can I make, say, the Empire State Building appear in that giant crater?

The reason, if it is not obvious, is here:

For reference (but not necessary):

http://www.celestiaproject.net/forum/viewtopic ... highlight=

Thanks!
Steven Binder, Mac OS X 10.4.10

BlindedByTheLight
Posts: 485
Joined: 19.03.2005
With us: 20 years
Location: Los Angeles, CA

Post #12by BlindedByTheLight » 19.04.2005, 20:02

(accidental duplicate)
Last edited by BlindedByTheLight on 19.04.2005, 20:18, edited 1 time in total.
Steven Binder, Mac OS X 10.4.10

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

Post #13by selden » 19.04.2005, 20:13

Longitude/Latitude grids are available for most solar system objects.

See http://www.lepp.cornell.edu/~seb/celest ... grids.html
Selden

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

Post #14by selden » 19.04.2005, 20:20

Of course, that didn't really answer your question.

On Windows systems, the "GoTo" menu usually displays the current longitude and latitude when it's opened, but you have to close and open it again for the values to be updated.
Selden

BlindedByTheLight
Posts: 485
Joined: 19.03.2005
With us: 20 years
Location: Los Angeles, CA

Post #15by BlindedByTheLight » 19.04.2005, 20:25

Thanks Selden. Very helpful to place an object manually. But it seems that would require switching to an AltSurface, getting the lats and longs of the place I want my empire state building to go, quit celestia, modify an SSC, reboot Celestia... then fly back to the specific location.

What I was hoping to do was find a way to automate that process - either as an add-on (which I can work on) or make a feature request (which I did in another forum). That way, as I'm trying to explain to my bored girlfriend just how HUGE that crater is I can just hit, say, ctrl-r (for reference) and make, say, her favorite shopping mall appear as a spec of dust in the giant crater as a reference point.

I guess the real fundamental issue is - once Celestia has loaded is it possible to get it to "refresh" a model's location from its SSC file? Or is it a done deal?

(P.S. You beat me to the punch with your second answer... we overlapped)
Steven Binder, Mac OS X 10.4.10


Return to “Add-on development”