Placing an object on a planetary surface

Post requests, images, descriptions and reports about work in progress here.
Topic author
NoXion
Posts: 56
Joined: 01.05.2005
With us: 19 years 4 months

Placing an object on a planetary surface

Post #1by NoXion » 28.08.2012, 02:43

Hey there, Celestia addon developers! I was wondering if I could seek some assistance with placing an object on a planetary surface. I've got a nice .cmod mesh that I'd like to use as a colony city, but I'm having problems placing it correctly.

Here is the .ssc code as it stands:

Code: Select all

"The Syndicate of Ganymede" "Sol/Jupiter/Ganymede"
{
       Mesh "large_surface_base.cmod"
       Class "surfacefeature"
       Radius 10
       Albedo 0.5
       Orientation [ 45 1 0 1 ]

OrbitFrame { BodyFixed { Center "Sol/Jupiter/Ganymede"}}

FixedPosition
{
    Planetographic [ 270 47 1 ]
}

}


I'm also including a link to a zip file containing the above .ssc code and the mesh, HERE

What am I doing wrong? How can I get this object to just sit on the surface without spinning strangely?
Currently worldbuilding!

Topic author
NoXion
Posts: 56
Joined: 01.05.2005
With us: 19 years 4 months

Re: Placing an object on a planetary surface

Post #2by NoXion » 28.08.2012, 07:04

Thanks a lot, that was very helpful. At least it is now stationary with respect to Ganymede's surface. :)

Now if only if I could get it to be the right way up...
Currently worldbuilding!

Topic author
NoXion
Posts: 56
Joined: 01.05.2005
With us: 19 years 4 months

Re: Placing an object on a planetary surface

Post #3by NoXion » 28.08.2012, 07:42

OK, so it turns out there's an Edit mode for aligning meshes (SHIFT+@) which is definitely useful if a bit fiddly. But for some reason Celestia is not generating the align.log file when I press SHIFT+!.

I'm running Celestia 1.6.0 on a Windows 7 SP1 machine.
Currently worldbuilding!

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 6 months
Location: Thyrrenian sea

Re: Placing an object on a planetary surface

Post #4by Fenerit » 28.08.2012, 12:01

Hi!. Do try this code for your object:

Code: Select all

SurfaceObject "The Syndicate of Ganymede" "Sol/Jupiter/Ganymede"
{
       
   Class "surfacefeature"
   Mesh "large_surface_base.cmod"
   Orientation [ 45 1 0 1 ]
   Radius 10
       
     
# OrbitFrame { BodyFixed { Center "Sol/Jupiter/Ganymede"}}

FixedPosition { Planetographic [ 270 47 1 ] }

FixedRotation { }

Albedo 0.5

}
Never at rest.
Massimo

Topic author
NoXion
Posts: 56
Joined: 01.05.2005
With us: 19 years 4 months

Re: Placing an object on a planetary surface

Post #5by NoXion » 28.08.2012, 13:38

Thanks, but the problem I'm having now is finding the right values for the Orientation variable so that the object is correctly aligned with the surface.

This is what it looks like using the code you provided:

Image

I've tried using the Edit Mode to get the right Orientation values, but it's no good since Celestia doesn't seem to be able to create the align.log file.
Currently worldbuilding!

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 9 months

Re: Placing an object on a planetary surface

Post #6by Chuft-Captain » 28.08.2012, 18:49

You shouldn't mix together the old style Orientation syntax with the newer Reference Frame code.

Either use a LongLat statement with an Orientation (old syntax):

Code: Select all

"The Syndicate of Ganymede" "Sol/Jupiter/Ganymede"
{
       Mesh "large_surface_base.cmod"
       Class "surfacefeature"
       Radius 10
       Albedo 0.5

LongLat   [270 47 0.005 ]
Orientation   [47 1 0 0]
}


... or use the new syntax (recommended):

Code: Select all

"The Syndicate of Ganymede" "Sol/Jupiter/Ganymede"
{
       Mesh "large_surface_base.cmod"
       Class "surfacefeature"
       Radius 10
       Albedo 0.5

# OrbitFrame / FizedPosition to position the object:
#
   OrbitFrame { BodyFixed { Center "Sol/Jupiter/Ganymede"}}
   FixedPosition
   {
       <...>
   }

# BodyFrame / FixedRotation to set it's orientation:
#
   BodyFrame { BodyFixed { Center "Sol/Jupiter/Ganymede" } }
   FixedRotation
   {
      Inclination            <value>
      AscendingNode    <value>
      MeridianAngle    <value>
   }


}


In the new syntax, the type of reference frame, and values for the FixedRotation will depend on how your model is aligned in your modelling tool (eg Anim8ter, Blender) and whether it's output as a 3ds or cmod file.
(You'll probably need to experiment a bit to get the right values, but making sure the model is correctly axis aligned in the modeller first will simplify this process.)

CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 17 years 11 months
Location: Out there...

Re: Placing an object on a planetary surface

Post #7by Reiko » 28.08.2012, 19:14

NoXion wrote:

I've tried using the Edit Mode to get the right Orientation values, but it's no good since Celestia doesn't seem to be able to create the align.log file.
For Celestia to create the align.log file you have to start it via command prompt. Start Celestia with this added string celestia --verbose >align.log

When you align your model hit shit ! and it will save the orientation values to the align.log file.

Topic author
NoXion
Posts: 56
Joined: 01.05.2005
With us: 19 years 4 months

Re: Placing an object on a planetary surface

Post #8by NoXion » 28.08.2012, 20:15

Reiko wrote:For Celestia to create the align.log file you have to start it via command prompt. Start Celestia with this added string celestia --verbose >align.log

When you align your model hit shit ! and it will save the orientation values to the align.log file.

Ah OK, I didn't know that. Now why does one have to jump through that hoop? Why can't Celestia generate the file as its default behaviour? Just start Celestia, go into Edit Mode, align, save, exit, job done and align.log generated.

Because then we could avoid situations like the following:

Code: Select all

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Steven>cd C:\Program Files (x86)\Celestia

C:\Program Files (x86)\Celestia>celestia.exe --verbose >align.log
Access is denied.

C:\Program Files (x86)\Celestia>


Buh?! Access denied? But I should have admin privileges! AARGH!
Currently worldbuilding!

fungun
Posts: 315
Joined: 30.07.2007
Age: 62
With us: 17 years 1 month
Location: Iowa, USA

Re: Placing an object on a planetary surface

Post #9by fungun » 28.08.2012, 20:40

When you align your model hit shit ! and it will save the orientation values to the align.log file.
Hey, Reiko, I don't have that key. :lol: :lol: :lol: :lol:

Avatar
John Van Vliet
Posts: 2941
Joined: 28.08.2002
With us: 22 years 1 month

Re: Placing an object on a planetary surface

Post #10by John Van Vliet » 29.08.2012, 03:24

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 04:40, edited 1 time in total.

Topic author
NoXion
Posts: 56
Joined: 01.05.2005
With us: 19 years 4 months

Re: Placing an object on a planetary surface

Post #11by NoXion » 29.08.2012, 07:47

john Van Vliet wrote:question
the OLD 1.6.0 and NOT the current 1.6.1 ?
or
the beta 1.7

1.7.0 has been forked off and is in testing

Nope, it's as I wrote it: I'm running Celestia 1.6.0, and not any of the other versions you mentioned.

because Celestia has to work on different platforms with DIFFERENT user interfaces

Windows XP,Vista,Win7 ( gtk and QT)
Mac osx 10.? (qt)
Linux ( QT and GTK )

Mac and Linux are in the Unix family
windows is in it's own world
Windows 8 "metro" might not even get supported ????
that is an unknown

Different user interfaces? The controls for Celestia appear to be the same regardless of OS. Or am I misunderstanding what you mean by "user interface"?

??? Are you running Windows 7 AS AN ADMINISTRATOR ????
if so NOT GOOD
use a normal user account

Well, I'm not sure actually. I get those little windows asking me if I want to let [program I just executed] make changes to my computer. But the point is that I am the owner and sole user of this machine, so getting an "access denied" should not be happening!

there is a known bug in how windows FUBARED the UAC in win 7
it IS recommended you install celestia to /
that is to
C:\\Celestia\celestia.exe

this fixes MS's "bleeped" up UAC errors

Thank you, moving my Celestia folder has fixed it. I have now derived the Orientation values I was looking for. Check it:

Image

Although you can see an atmosphere in the above image, the Syndicate had built their self-contained city on Ganymede long before that moon's para-terraformation. To give a sense of scale, the tallest towers in the image are about 2000 metres, roughly equivalent to 500 floors.

It's still not complete, but if anyone's interested, HERE is the addon in it's current state. It's part of a personal project that I may or may not publicly release, depending on how much time and effort I want to dedicate to it.

Thanks to everyone who helped!
Currently worldbuilding!

Avatar
John Van Vliet
Posts: 2941
Joined: 28.08.2002
With us: 22 years 1 month

Re: Placing an object on a planetary surface

Post #12by John Van Vliet » 29.08.2012, 08:27

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 04:40, edited 1 time in total.

Topic author
NoXion
Posts: 56
Joined: 01.05.2005
With us: 19 years 4 months

Re: Placing an object on a planetary surface

Post #13by NoXion » 29.08.2012, 14:22

john Van Vliet wrote:you ARE aware that 1.6.0 was released in 2009 ? right? 3 years out of date
celestia-win32-1.6.0.exe 2009-07-09 35.2 MB
and dose NOT support a lot of things that 1.6.1 now dose

i would install 1.6.1
http://sourceforge.net/projects/celesti ... bin/1.6.1/

I actually didn't realise the version I was running was that old. I've upgraded my installation accordingly.
Currently worldbuilding!

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Re: Placing an object on a planetary surface

Post #14by selden » 29.08.2012, 15:14

Noxion,

Referring back to your orientation problem, if you use the directive SurfaceObject, as shown in Fenerit's example, objects are automatically oriented perpendicular to the local surface on a sphere. You do not have to use Orientation or Rotation directives to make that happen.
Selden

Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 17 years 11 months
Location: Out there...

Re: Placing an object on a planetary surface

Post #15by Reiko » 31.08.2012, 05:36

fungun wrote:
When you align your model hit shit ! and it will save the orientation values to the align.log file.
Hey, Reiko, I don't have that key. :lol: :lol: :lol: :lol:
Oops hehe :lol: :blue:


Return to “Add-on development”