Page 1 of 1

replacing the earth

Posted: 19.03.2006, 17:09
by blueberry
hi everyone

i am trying to replace the earth by a construct that i have designed. adding a 3d model and scripting it so it takes over the properties of the earth seems straightforward. but how can i, first of all, remove earth from my celestia?

answers are greatly appreciated, best -blueberry

Posted: 19.03.2006, 17:19
by amaury
Hello blueberry,

the Earth is declared in the data folder, in the solarsys.ssc file, under:
"Earth" "Sol"
if you comment (#) or remove all the lines declaring the properties of a planet, it will disappear from the solar system

you can also use these lines to replace the model or texture used, etc.

Do read the Celestia (and scripting) documentation to go any further...

amaury

Posted: 19.03.2006, 17:40
by selden
The easiest way to replace the default spheroid that Celestia uses for the Earth by a model of your choice is to use the SSC directive "Modify." Editing solarsys.ssc is dangerous: errors will cause the rest of the solar system to disappear, too.

You just have to create an SSC file containing the single line

Code: Select all

Modify "Earth" "Sol" { Mesh "name-of-mesh.3ds" }

and put it in your Addon's directory.

This assumes that your model is aligned properly, of course.

Posted: 19.03.2006, 23:33
by amaury
oops, didn't know about that one, it clearly is safer.

Posted: 30.03.2006, 06:32
by blueberry
hi selden

in my early celestiadays, you suggested "modify" to replace the earth:

selden wrote:You just have to create an SSC file containing the single line

Code: Select all

Modify "Earth" "Sol" { Mesh "name-of-mesh.3ds" }
.


can i use "modify" in conjunction with "beginning" and "ending" to switch a texture or change the radius or expand the atmosphere at a certain time?

Posted: 30.03.2006, 09:52
by selden
Yes.

The Modify operator tells Celestia to insert or replace in the old object definition just those parameters declared in the new definition.

Alternatively, you can use the Replace operator, which essentially deletes the old definition entirely, replacing it by the new definition.