How to create a galaxy?
-
Topic authorthefallenghost
- Posts: 42
- Joined: 08.05.2009
- With us: 15 years 6 months
How to create a galaxy?
What is my best option if I want to add NGC 6240 to Celestia 1.6.0 RC3. What I mean is what I should do (I don't want to take a lifetime making a model) and how to do it. A 2d image is an option for me. (see http://apod.nasa.gov/apod/ap090618.html)
Thanks.
Thanks.
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: How to create a galaxy?
thefallenghost wrote:What is my best option if I want to add NGC 6240 to Celestia 1.6.0 RC3. What I mean is what I should do (I don't want to take a lifetime making a model) and how to do it. A 2d image is an option for me. (see http://apod.nasa.gov/apod/ap090618.html)
Thanks.
In case you have overlooked this dim object (13.8m), let me emphasize that it is of course included already in Celestia. ALL NGC/IC objects are included essentially.
In order to see it, you must simply increase the light sensitivity by pushing the ] key a bit. Moreover, make sure to have enabled the automag feature (CTRL+y key).
Here is a little screen shot of Celestia's NGC 6240
Note that in Celestia we display galaxies how they appear to the unaided eye or at best in a small telescope. NGC 6240 has been classified as a spherical galaxy (Hubble type E0) and that is what I have rendered.
If you prefer to replace it by something like a super-hires Hubble photograph, you can do this via an add-on in the extras folder. Just download one of the many user-made add-on galaxies from the Motherlode ( http://www.celestiamotherlode.net/) and see how they were done. Any example should be self-explaining. To suspend a 2d photo is VERY easy. You should only take care that you are not displaying BOTH, the default galaxy AND the new one on top of each other...
Fridger
-
Topic authorthefallenghost
- Posts: 42
- Joined: 08.05.2009
- With us: 15 years 6 months
Re: How to create a galaxy?
I undertand that it is already in celestia. What I would like to do is to superimpose the current model with a picture. I have looked up a couple of 2d suspended addons, but they all require a mesh, and I don't quite know how to do that.
Re: How to create a galaxy?
If it helps, a prescription for displaying flat pictures in Celestia is at http://www.lepp.cornell.edu/~seb/celest ... -cmod.html
Selden
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: How to create a galaxy?
thefallenghost wrote:I undertand that it is already in celestia. What I would like to do is to superimpose the current model with a picture. I have looked up a couple of 2d suspended addons, but they all require a mesh, and I don't quite know how to do that.
But if you just overlay the original, spherical NGC 6240 with a 2d photo, it will look really bad when you get closer. That's why people try to use meshes. Ever thought of just borrowing a mesh from another add-on?
Fridger
Last edited by t00fri on 21.06.2009, 22:02, edited 1 time in total.
-
Topic authorthefallenghost
- Posts: 42
- Joined: 08.05.2009
- With us: 15 years 6 months
Re: How to create a galaxy?
This is what I have now:
in my extra/NGC6240,
+ngc 6240-cmod.dsc:
Nebula "+NGC 6240"
{
RA 16.8828
Dec 2.4031
Distance 3.264e+08 # method: V_cmb
Radius 9.97e+04
Type "E0"
Angle 153.7811
Axis [ 0.0278 -0.8329 -0.5527]
InfoURL "http://simbad.u-strasbg.fr/sim-id.pl?Ident=NGC 6240"
Mesh "+ngc6240.cmod"
}
in my extras/NGC6240/textures/medres:
+ngc 6240.png (4096x4096 png file with transparency [I have tried smaller pictures and they didn't work either])
in my extras/NGC6240/models:
+ngc 6240.cmod:
material
texture0 "+ngc 6240.*" # modify this filename to display other images
diffuse 1 1 1 opacity 1 end_material
mesh
vertexdesc position f3 normal f3 texcoord0 f2 end_vertexdesc
vertices 4
0 0 0 0 1 0 0 1
0 0 1 0 1 0 0 0
1 0 1 0 1 0 1 0
1 0 0 0 1 0 1 1
# the "negative" side: facing the origin
trilist 0 6 0 3 2 2 1 0
# the "positive" side: facing away from the origin
trilist 0 6 0 1 2 2 3 0
end_mesh
Why doesn't it work?
in my extra/NGC6240,
+ngc 6240-cmod.dsc:
Nebula "+NGC 6240"
{
RA 16.8828
Dec 2.4031
Distance 3.264e+08 # method: V_cmb
Radius 9.97e+04
Type "E0"
Angle 153.7811
Axis [ 0.0278 -0.8329 -0.5527]
InfoURL "http://simbad.u-strasbg.fr/sim-id.pl?Ident=NGC 6240"
Mesh "+ngc6240.cmod"
}
in my extras/NGC6240/textures/medres:
+ngc 6240.png (4096x4096 png file with transparency [I have tried smaller pictures and they didn't work either])
in my extras/NGC6240/models:
+ngc 6240.cmod:
material
texture0 "+ngc 6240.*" # modify this filename to display other images
diffuse 1 1 1 opacity 1 end_material
mesh
vertexdesc position f3 normal f3 texcoord0 f2 end_vertexdesc
vertices 4
0 0 0 0 1 0 0 1
0 0 1 0 1 0 0 0
1 0 1 0 1 0 1 0
1 0 0 0 1 0 1 1
# the "negative" side: facing the origin
trilist 0 6 0 3 2 2 1 0
# the "positive" side: facing away from the origin
trilist 0 6 0 1 2 2 3 0
end_mesh
Why doesn't it work?
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
Re: How to create a galaxy?
Sorry, I got no time to check for mistakes in your attempts. Selden's instructions are so detailed that all you got to do is to make sure that you didn't introduce a typo...
Instead, I made you --in less than 5 minutes-- a fresh NGC 6240 add-on, which works and may be downloaded from here:
http://www.celestiaproject.net/~t00fri/images/NGC6240.zip
unzip it in your extras folder. That's all.
One remark about the image file: to get the size about right, I cut out the galaxy from the Hubble-Spitzer image with a square selection. Next, it is crucial that towards its square boundary, the image really becomes BLACK! Otherwise it looks VERY nasty, since you can see the brighter square against the black background.
Since one doesn't want to modify the main galaxy much, the method of choice is to overlay a layer in GIMP, which carries a radial gradient that is transparent in the center and becomes black towards the border. Merge the two layers ==> done. That's what I did for you in the add-on.
Instead of an non-transparent JPG file, you may also add an alpha channel that provides transparency. Then you got to use PNG format of course. But I wanted to keep things simple, at first.
With a gray alpha channel ("Colors->Color to Alpha ..." in GIMP), you can overlay the 2d image with the 3d default galaxy. But it doesn't look nice, since the square border of the 2d texture sticks out against the bright background from the 3d default galaxy.
Here is how it looks:
Anyway, here is the transparent NGC 6240 image version for you to play...
http://www.celestiaproject.net/~t00fri/images/ ... hubble.png
don't forget to adapt the name in the billboard1.cmod!
Personally, I would never implement a galaxy in this unattractive manner.
Fridger
Instead, I made you --in less than 5 minutes-- a fresh NGC 6240 add-on, which works and may be downloaded from here:
http://www.celestiaproject.net/~t00fri/images/NGC6240.zip
unzip it in your extras folder. That's all.
One remark about the image file: to get the size about right, I cut out the galaxy from the Hubble-Spitzer image with a square selection. Next, it is crucial that towards its square boundary, the image really becomes BLACK! Otherwise it looks VERY nasty, since you can see the brighter square against the black background.
Since one doesn't want to modify the main galaxy much, the method of choice is to overlay a layer in GIMP, which carries a radial gradient that is transparent in the center and becomes black towards the border. Merge the two layers ==> done. That's what I did for you in the add-on.
Instead of an non-transparent JPG file, you may also add an alpha channel that provides transparency. Then you got to use PNG format of course. But I wanted to keep things simple, at first.
With a gray alpha channel ("Colors->Color to Alpha ..." in GIMP), you can overlay the 2d image with the 3d default galaxy. But it doesn't look nice, since the square border of the 2d texture sticks out against the bright background from the 3d default galaxy.
Here is how it looks:
Anyway, here is the transparent NGC 6240 image version for you to play...
http://www.celestiaproject.net/~t00fri/images/ ... hubble.png
don't forget to adapt the name in the billboard1.cmod!
Personally, I would never implement a galaxy in this unattractive manner.
Fridger
Re: How to create a galaxy?
You might be having a problem because you've used punctuation in the file names. Try eliminating the "+" and " " (space) from them all. Using anything other than letters, numbers and underscores in file names is asking for trouble.
Selden
-
Topic authorthefallenghost
- Posts: 42
- Joined: 08.05.2009
- With us: 15 years 6 months
Re: How to create a galaxy?
I've tried cutting out only the galaxy, but now I cant get it at the right angle.
This is what the png looks like:
This is how it's supposed to be: http://aladin.u-strasbg.fr/java/nph-aladin.pl?script=get+Aladin+NGC++6240+11arcmin%3Bget+simbad+NGC++6240+11arcmin&from=Simbad4&submit=Aladin+applet
And this is how it appears in Celestia using the default axis and angle for this galaxy:
I've also tried Grant Hutchinson's spreadsheet and it doesn't seem to work.
Also, how do I take out the existing 3d default model for this galaxy?
This is what the png looks like:
This is how it's supposed to be: http://aladin.u-strasbg.fr/java/nph-aladin.pl?script=get+Aladin+NGC++6240+11arcmin%3Bget+simbad+NGC++6240+11arcmin&from=Simbad4&submit=Aladin+applet
And this is how it appears in Celestia using the default axis and angle for this galaxy:
I've also tried Grant Hutchinson's spreadsheet and it doesn't seem to work.
Also, how do I take out the existing 3d default model for this galaxy?
Re: How to create a galaxy?
Many astronomical photographs have a random orientation relative to the sky: they are not oriented with their tops pointed North. As a result, Celestia's default orientation is wrong for them. You must specify a different orientation in the DSC definition of the object.
Grant's spreadsheet works fine for me.
Instructions for how to align DSC objects with or without Grant's spreadsheet are in http://www.lepp.cornell.edu/~seb/celest ... -cmod.html
To eliminate one of Celestia's default galaxy objects, you must use your favorite text editor to remove it from Celestia/data/galaxies.dsc
Grant's spreadsheet works fine for me.
Instructions for how to align DSC objects with or without Grant's spreadsheet are in http://www.lepp.cornell.edu/~seb/celest ... -cmod.html
To eliminate one of Celestia's default galaxy objects, you must use your favorite text editor to remove it from Celestia/data/galaxies.dsc
Selden
-
Topic authorthefallenghost
- Posts: 42
- Joined: 08.05.2009
- With us: 15 years 6 months
Re: How to create a galaxy?
First, Grant's calculations give me this:
Axis [-0.1205 0.8411 0.5272]
Angle 170.538
Second, all the data files are read-only and I don't know how to modify them. However, the "read-only" box is not checked in the properties of "galaxies.dsc".
Axis [-0.1205 0.8411 0.5272]
Angle 170.538
Second, all the data files are read-only and I don't know how to modify them. However, the "read-only" box is not checked in the properties of "galaxies.dsc".
Re: How to create a galaxy?
Grant's spreadsheet assumes North is up in the picture. When it isn't, you must use Celestia's real-time method of alignment to rotate the picture so that it aligns correctly. Please read the Web page mentioned above, section 6.2.
Presumably you're using Vista. Please read the FAQ at
viewtopic.php?f=15&t=13461
Vista Question #3:
# Why can't I make changes to files in the Celestia data directory?
Presumably you're using Vista. Please read the FAQ at
viewtopic.php?f=15&t=13461
Vista Question #3:
# Why can't I make changes to files in the Celestia data directory?
Selden
-
Topic authorthefallenghost
- Posts: 42
- Joined: 08.05.2009
- With us: 15 years 6 months
Re: How to create a galaxy?
I'm done with the alignment problem, thanks for the help!
However, I'm currently running XP, not Vista. Also, I don't suppose there's any way of modifying or replacing a dsc object, right?
However, I'm currently running XP, not Vista. Also, I don't suppose there's any way of modifying or replacing a dsc object, right?
Re: How to create a galaxy?
If you're running XP, it sounds like you may have installed Celestia while an administrator and be trying to modify it while running without privileges.
You might try deinstalling Celestia and reinstalling it.
Alternatively, you might try
1. changing the protection of the Celestia directory tree and its contents so that your username has all access rights, and then
2. "take ownership" of the Celestia directory tree and its contents.
You must perform both steps in order to be able to edit the files.
You might try deinstalling Celestia and reinstalling it.
Alternatively, you might try
1. changing the protection of the Celestia directory tree and its contents so that your username has all access rights, and then
2. "take ownership" of the Celestia directory tree and its contents.
You must perform both steps in order to be able to edit the files.
Selden
-
Topic authorthefallenghost
- Posts: 42
- Joined: 08.05.2009
- With us: 15 years 6 months
Re: How to create a galaxy?
I managed to un-read-only the data folder.
Also, why does the billboard have very intense colours inside Celestia whereas it does not in Gimp before or after adding an alpha channel?
Also, why does the billboard have very intense colours inside Celestia whereas it does not in Gimp before or after adding an alpha channel?
Last edited by thefallenghost on 01.07.2009, 03:43, edited 2 times in total.
Re: How to create a galaxy?
They're options in the Properties popup menu's Security tab.
Right click on the folder and select Properties in the popup menu.
If you haven't already done so, you should invest in one or more of the Windows XP administration manuals by various authors. They're available from your favorite local bookseller. You need to browse through them to find the ones which best match your level of experience.
Right click on the folder and select Properties in the popup menu.
If you haven't already done so, you should invest in one or more of the Windows XP administration manuals by various authors. They're available from your favorite local bookseller. You need to browse through them to find the ones which best match your level of experience.
Selden
-
Topic authorthefallenghost
- Posts: 42
- Joined: 08.05.2009
- With us: 15 years 6 months
Re: How to create a galaxy?
Yes, but what about the colours?