Page 1 of 1

Align.log

Posted: 27.07.2003, 22:51
by Rassilon
Im not sure if this is a bug or it just wont work in windows....I did everything as discribed below...

Here's the procedure using Celestia's builtin positioning tool:

Run Celestia so it creates a log file:
.\celestia -v > align.log
Type the key pair "Shift-~" to enable edit mode
Hold down Control-Shift Left-Mouse-Button and use the mouse to adjust the object's x-y orientation.
Hold down Control-Shift Right-Mouse-Button and use the mouse to adjust the object's Z-axis rotation orientation.
Type the key pair "Shift-!" to save your final Axis and Angle values to align.log
Exit Celestia
Type align.log
Put the Axis and Angle values you see there into your object's .DSC file.

The only difference is 1 I have to put the -v > align.log in the celestia shortcut and 2 where do I type align.log?...I am hoping someone could enlighten me on the windows procedure also I did a search for align.log and could find no such file...thx...

Posted: 27.07.2003, 23:43
by selden
Ras',

This only works for DSC objects, not for objects defined in a .SSC file.

You have to open a "command window"
e.g. in the Start menu, select the Run menu, type CMD in its "open" line, and click on [ OK ]

In the command window, cd to the directory containing Celesta. Then in the command window type

Code: Select all

.\celestia -v > align.log


After you exit from Celestia, again in the same "command window", type the command

Code: Select all

type align.log


Here's an example of what I see in the command window when doing this for one of the add-ons I'm working on:

Code: Select all

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Selden>e:

E:\>cd "Program Files\Celestia131p5"

E:\Program Files\Celestia131p5>.\celestia -v > align.log

E:\Program Files\Celestia131p5>type align.log
Opened registry key
Using joystick: Microsoft PC-joystick driver
nStars: 112523
.
.
.
.
.
.
Parent body 'TYC 5503-946-1' of 'b' not found.
.
.
.
.
.
.
.
.
.
.
.
.
Initializing ARB vertex programs . . .
Loading ARB vertex program: shaders/diffuse_arb.vp
Loading ARB vertex program: shaders/specular_arb.vp
Loading ARB vertex program: shaders/haze_arb.vp
Loading ARB vertex program: shaders/bumpdiffuse_arb.vp
Loading ARB vertex program: shaders/bumphaze_arb.vp
Loading ARB vertex program: shaders/shadowtex_arb.vp
Loading ARB vertex program: shaders/diffuse_texoff_arb.vp
Loading ARB vertex program: shaders/rings_arb.vp
Loading ARB vertex program: shaders/ringshadow_arb.vp
Loading ARB vertex program: shaders/night_arb.vp
Loading ARB vertex program: shaders/glossmap_arb.vp
All ARB vertex programs loaded successfully.
render path: 5
Trying DDS: ./extras/seb/lmc/textures/medres/lmc-2123.dds
Trying DDS: ./extras/seb/lmc/textures/medres/phot-05a.dds
Trying DDS: ./extras/seb/lmc/textures/medres/30dor_hst_big.dds
lmc-2123
Orientation: [0.0625254,0.0255321,0.997717], 182.961
Saving preferences . . .
Opened registry key

E:\Program Files\Celestia131p5>


The line starting with "Orientation" is the one to be inserted into the .DSC file. The line above it shows the name of the object. The Orientation has to be edited to become

Code: Select all

Axis  [0.0625254 0.0255321 0.997717]
Angle 182.961


(I'll add this detailed example to the web page.)

Posted: 01.08.2003, 08:14
by chris
Ras,

I just fixed this so it works for planets too . . . will that be helpful for you?

--Chris

Posted: 01.08.2003, 09:58
by Darkmiss
whats up with this line

Code: Select all

Parent body 'TYC 5503-946-1' of 'b' not found.


I get this too, but the line looks okay in my Extrasolar.ssc ?

Posted: 01.08.2003, 15:54
by chris
The problem is that this star isn't in the HIPPARCOS database, so Celestia complains. It is present in the million star database though.

--Chris

Posted: 04.08.2003, 02:47
by Guest
chris wrote:Ras,

I just fixed this so it works for planets too . . . will that be helpful for you?

--Chris


Yes it will...I think I pmed you some other features that would be helpful some time back...cant remember though...

Re: Align.log

Posted: 05.12.2003, 15:28
by Rassilon
Rassilon wrote:Im not sure if this is a bug or it just wont work in windows....I did everything as discribed below...

Here's the procedure using Celestia's builtin positioning tool:

Run Celestia so it creates a log file:
.\celestia -v > align.log
Type the key pair "Shift-~" to enable edit mode
Hold down Control-Shift Left-Mouse-Button and use the mouse to adjust the object's x-y orientation.
Hold down Control-Shift Right-Mouse-Button and use the mouse to adjust the object's Z-axis rotation orientation.
Type the key pair "Shift-!" to save your final Axis and Angle values to align.log
Exit Celestia
Type align.log
Put the Axis and Angle values you see there into your object's .DSC file.

The only difference is 1 I have to put the -v > align.log in the celestia shortcut and 2 where do I type align.log?...I am hoping someone could enlighten me on the windows procedure also I did a search for align.log and could find no such file...thx...


Is anything changed in the newer versions of Celestia for the shortcut keys to work in edit mode? For some reason the combination keys I have listed above do not move the dsc objects...Edit mode loads with SHIFT ~ and the save key seems to work...as far as I know but no data is outputting about any object, just vertex shaders etc...I have done all of what selden instructed and got that bit to work but now cannot get objects to orient...let alone move...

Could someone enlighten me further on this?

Posted: 05.12.2003, 15:35
by selden
Ras',

With v1.3.1pre11, edit mode is invoked with Shift-2, not Shift-~.
Shift-~ now invokes the console log display.
This change is because Chris decided to use the same console log display command as is used in many other 3D programs and games.

Does this help?

Posted: 05.12.2003, 15:49
by Rassilon
Yes, thank you but there is still no data output on the orientation when using SHIFT ! I exited edit mode and tried SHIFT ! as well and no go...did this combo change as well?

Posted: 05.12.2003, 15:56
by selden
Shift-1 should still write the coordinates to the log file.
At least, it still works for me! (I'm using the pre11 binary from Shatters' celestia/files directory. I don't rebuild from the CVS archive.)

Note that it writes the orientation of the currently selected object. If nothing is selected (for whatever reason, e.g. using a Cel://URL of an undefined object), then it won't write anything. I usually type Shift-1 while orientation editing is still enabled, but I don't think that should matter.

Posted: 05.12.2003, 15:56
by Rassilon
nevermind...typing the command in dos doesnt show the information...Opening the folder in the celestia root and the align.log file in notepad does...

Thanks for your help!

Posted: 05.12.2003, 16:02
by selden
One other thing: you do have to exit from Celestia in order for the information to be written to the file. It's kept in an internal buffer until then.

Posted: 05.12.2003, 16:16
by Rassilon
Yeah thanks that was the step I was missing selden,

The only drawback of this is with models...The orientation as added to the ssc files for models doesnt come out the same as the edit mode...I am guessing one of the parameters angle or align is ignored for models...

Posted: 05.12.2003, 19:20
by selden
Ras',

I know the RMB "rotate around screen axis" command has problems with models used within a solar system. I think Chris said that it doesn't do anything. I think the expectation is that SSC models will be oriented with orientation commands within SSC files. The RMB orientation command originally was created for orienting deep space Nebulas.

I use the internal alignment often for the "billboard" Nebula objects that I defined some time ago. They're rectangular, so they show misalignments easily.

A possibility might be due to the way your models' X,Y&Z axes are defined. I always have the Z axis pointing toward the observer because that's the way Anim8or creates its models. This alignment also is assumed by Grant Hutchison's DSC Alignment spreadsheet.

Posted: 06.12.2003, 00:42
by granthutchison
Darkmiss wrote:whats up with this line

Code: Select all

Parent body 'TYC 5503-946-1' of 'b' not found.


I get this too, but the line looks okay in my Extrasolar.ssc ?

If you don't want to add Pascal's large stars.dat file as Chris mentions above, you can add the single necessary star with an stc as follows:

Code: Select all

1009465503 "BD-10 3166"
{
   RA 164.61993
   Dec -10.77038
   Distance 378.39
   SpectralType "G4V"
   AppMag 10.0
}

Grant