Page 1 of 2

Billboard objects

Posted: 05.04.2003, 20:03
by selden
Now that Celestia supports "Deep Sky Objects", it is almost easy to add nebulae and galaxies in full color. Not quite easy, but it is possible.

As an incentive for the novice artists, I've created a simple square "billboard" 3DS model that can be used to display colorful pictures of objects in Celestia. Skill with a 3D modelling package is needed to produce objects that have the correct shapes when viewed from more than one direction.

http://www.lepp.cornell.edu/~seb/celestia/billboard.zip

This ZIP file is a 1.1MB download, but only because of the size of the accompanying .PNG texture image. The 3ds model itself is less than 1KB.

http://www.lepp.cornell.edu/~seb/celestia/billboard.3ds

As an example, the accompanying BILLBOARD.DSC defines a nebula named
"Billboard". The Billboard nebula definition specifies the model
"billboard.3ds". The model file billboard.3ds specifies the surface
texture map "billboard.png".

Code: Select all

#Hoag's Object
Nebula "Billboard" {
    Mesh     "billboard.3ds"
        Axis [ -0.16 0.94 0.27 ]
        Angle 121
    Distance   6.0e+8
    RA          15.3208  # 15h 17m 17s
    Dec         21.57917 # 21deg 34' 45"
    Radius     120000
    InfoURL   "http://heritage.stsci.edu/2002/21/table.html"
}


In order to use this 3DS model for different objects in Celestia,
you have to copy it, creating a new .3ds file with a different name.
You also have to edit the new 3DS file to change the name of the
texture image file that it looks for. Currently it specifies
"billboard.png". You cannot use most text editors to make this change
because of the binary codes in the model file. A binary editor can be
used, but I found that Emacs works quite well.

You don't have to specify a PNG image file, of course. Celestia will
happily render a .JPG or .DDS file just as well.

However, a bug in Celestia requires that the surface texture map
be stretched to have 2:1 proportions if you use a PNG file that
contains an alpha channel. Square JPG images and PNG files without
an Alpha channel work fine. I haven't tried any DDS files to see if
they have a similar problem.

Another problem is getting the billboard properly aligned face-on to
the line-of-sight from Earth. The details are a little too complicated
to go into here.

The 3DS model used as the billboard is a flattened cube, 100x100x1 units
on a side. The Z dimension is minimized since the Z face is the one where
Celestia places the surface texture. When seen from the front, the image
is upright. On the back of the billboard object the image is reversed.
As a result, the image seems to be embedded in the billboard. The
billboard object is thin enough that it's effectively invisible when
seen from the sides.

The surface texture file "billboard.png" happens to be an image
of Hoag's Object. The image it renders is rather feeble because
a greyscale copy of the image is used as the alpha transparency channel.
This causes the image to be partially transparent in areas where the
luminosity is reduced. Producing a proper alpha channel for Hoag's Object
is left as an exercise for the artist :)

Here's a pcture of the result.
Image
(which is a link to a larger image)

Posted: 05.04.2003, 23:18
by Sum0
Should be fun to start populating the skies with my favourite nebulae... :D I'll try this out.

Posted: 06.04.2003, 18:30
by selden
Here's a slightly more dramatic use of the billboard model:
Image
Earth in the Carina Nebula.
(as usual, this is a link to a larger image)

Posted: 06.04.2003, 18:50
by Rassilon
The lone wanderer...Nice shot selden...Where did you find a full scale pic of that neb?

Posted: 06.04.2003, 19:40
by selden
Ras',

Thanks for the kind words.

I'm not quite sure what you mean by "full scale". I didn't use a picture of the entire nebula, if that's what you mean. The billboard uses a 1Kx1K jpeg clipped from the center of a high resolution Hubble picture that I downloaded from http://hubblesite.org/newscenter/archive/2000/06/image/a. The Celestia snapshot was taken with the center of that as the backdrop. The viewpoint is within the Solar System. The billboard is at a Distance of 12000 ly with a Radius of 6000 ly, so it covers a large part of the sky.

Most pictures of the entire nebula are copyright. One by the NOAO (with quite different colors) is at http://www.noao.edu/image_gallery/html/im0061.html. They do allow free use for "educational outreach activities composed by amateur astronomers." I think an add-on for Celestia qualifies.

Posted: 07.04.2003, 03:55
by marc
A change or an option that makes nebulae always face the observer would make it much easier for people to play around with these objects.

An AxisAutomatic entry or such.

Code: Select all

#Hoag's Object
Nebula "Billboard" {
    Mesh     "billboard.3ds"
        AxisAutomatic true
        Angle 121
    Distance   6.0e+8
    RA          15.3208  # 15h 17m 17s
    Dec         21.57917 # 21deg 34' 45"
    Radius     120000
    InfoURL   "http://heritage.stsci.edu/2002/21/table.html"
}


I'd like to put a patch like this in Mostly Harmless so i can populate it with lots of Nebulae. Its fair eneough to say that it wouldnt be accurate but it would look good. Especially using nebulae images with the stars filtered out.

What do you think? How difficult would the change be?

Posted: 07.04.2003, 11:46
by selden
I'd also like to be able to specify particualr locations to be faced.

e.g.

FaceLocation { RA 0 Dec 0 Distance 0 }

It'd also help if the Galactic coorinate system could be used for orienting objects.

Posted: 12.04.2003, 00:23
by selden
So, has anyone had any luck using these "billboard" objects?

Are my instructions too obscure?

Or are the Axis and Angle alignments just too much of a pain?

Posted: 12.04.2003, 14:43
by JackHiggins
Selden,

I've used your billboard objects to add a good few new nebulae to celestia, and I think your instructions etc are grand! I just dont like the way that they stop looking like 3d objects when you go to one side & they become thinner... Even though rassilon's nebula models arent really true to life when viewed from the side, they still give a better 3d effect.
On the whole though the billboard idea is a pretty good one as long as you stay within a few light years of the sun!

Posted: 12.04.2003, 15:26
by selden
Thanks.

Personally I'm getting quite frustrated with the current alignment method. The rotations provided by the mouse are not at all intuitive to me. A forced "point Z axis toward the sun" (or toward a specific xyz coordinate or star position for those working in other stellar systems) plus "rotate about body's Z axis" would certainly make things a lot easier.

I really want to be able to get the positions of the stars in the photographs to line up as precisely as possible with their counterparts in Celestia.Currently it's essentially hit-and-miss. :(

Posted: 14.04.2003, 00:59
by selden
I've been updating my "Billboard" Web page at http://www.lns.cornell.edu/~seb/celestia/billboard.html

Among other things, it now includes an over-all view of the Eta Carina Nebula (NGC 3372). I've also updated the coordinates of the detailed Hubble picture so it's properly oriented with respect to the extended nebula.

Image
(as usual, this links to a larger picture)

Posted: 14.04.2003, 11:04
by ElPelado
chris, i have some questions about the carina ngc 3372 and barnard 33 nebuales.
first of all: why did you put in the billboard page links to dds textures, we cant use them in the meshes, can't we? if we can tell me how please.

why in celestia the meshes are inclinated? i mean if the pictures that you use where taken from earth, from earth we must be able to see the meshes perpendiciular to us, not inclinated.
if you can explain me

Posted: 14.04.2003, 12:25
by selden
ElPelado,

You can use a binary file editor or a version of the Emacs text editor to change the mesh to use the name of any texture you want. The texture must be one of the image formats that Celestia understands. The image formats that are used by the 3D design software are irrelevant.

The images are tilted because I am not very good at aligning them. The tool in Celestia is very frustrating for me.

I hope this clarifies things a little.

Posted: 14.04.2003, 12:46
by ElPelado
thanks selden
can you give me names of binary editros? and how to use them(if its difficult, if you think that i will understand them, dont need to tell me).

and about the orientation, so what you are saying is that the idea was to put the meshes like i said, but you dont know how to orientate them?

Posted: 14.04.2003, 12:56
by selden
ElPelado,

HexEdit is a binary editor that I've heard of.
http://www.expertcomsoft.com/

I use Emacs.
http://www.gnu.org/software/emacs/windows/ntemacs.html

Celestia includes a tool for using the mouse to align objects.
The way it turns objects does not follow the mouse.
This drives me crazy.

Posted: 14.04.2003, 18:45
by jim
Hi Selden,

I have some questions about the billboard object. You mentioned that the billboard object was created with Anim8or. But why can i not open this with Anim8or0.81 ? I have edited the billbord.3ds and insert a texture format that Anim8or supports but i can't find a object.
Why did i try to open the billboard object? I want know how did you manage that the transparency (alpha channel) works after export to 3DS. I made some futile attempts and came to the result that's impossible with Anim8or. A test cube with a gif texture works with transparent parts in Anim8or but after export to 3DS the transparency is vanished (i've tested to replaced the GIF by a PNG and edited the 3DS file). In Celestia and in a 3DS viewer works my model without transparency.

Can you give me some advices?

Bye Jens
________________________________
http://www.angelfire.com/de3/jimpage

Posted: 14.04.2003, 20:29
by selden
jens wrote:I have some questions about the billboard object. You mentioned that the billboard object was created with Anim8or. But why can i not open this with Anim8or0.81 ?

Probably because my default "billboard.3ds" specifies "billboard.png" (9.3 characters). Certainly Anim8or cannot handle .PNG format. I edited the 3DS file to change the file name after Anim8or exported it. This name also is a different length from the original name. Perhaps Anim8or does not like this. I told Anim8or to use the image "iss-sol1a.jpg" because it was convenient (8.3 characters),

I have edited the billbord.3ds and insert a texture format that Anim8or supports but i can't find a object.


That's very strange. I must admit that I never tried to import the file back into Anim8or. (You are using the menu "Object", item "Import" I hope.)

You might try starting with the mesh "b33.3ds" on the web page ( http://www.lepp.cornell.edu/~seb/celestia/b33.3ds ) It specifies the texture file "b33.jpg", so Anim8or might be happy with it. You'll have to put a jpeg image named b33.jpg in Anim8or's default directory for it to find the file, I suspect.

Why did i try to open the billboard object? I want know how did you manage that the transparency (alpha channel) works after export to 3DS.

I didn't care about what Anim8or would do with the surface texture. What matters is what Celestia does with it.

I made some futile attempts and came to the result that's impossible with Anim8or. A test cube with a gif texture works with transparent parts in Anim8or but after export to 3DS the transparency is vanished (i've tested to replaced the GIF by a PNG and edited the 3DS file). In Celestia and in a 3DS viewer works my model without transparency.


That's very strange. Are you telling Animator to do create a transparency effect or are you just depending on it doing the right thing with the Alpha channel within the GIF image?

My guess is that perhaps Celestia does not know what to do with a transparancy command built into a 3DS mesh.

All I did was create a cube object with scale factors of 100x, 100y and 1z. I also told Anim8or to use a JPG image for the "diffuse" surface material. I then used the Object menu to Export it to a 3DS file. I did *not* try to create a transparency effect within Anim8or.

Next I used Emacs to edit the 3DS file to change the file name. It only appears in one place near the beginning, so the file name is easy to find.

All the transparency effects are being done by Celestia using the Alpha channel that is included in the PNG or DDS file. I was glad to see the transparency, actually. I don't think a Nebula should have a specular reflection :)

Does this help?

Posted: 14.04.2003, 23:13
by jim
Hi Selden,

Ok now i see that you did nothing special to build the billboard object. All these steps i have also tried but with Celestia 1.2.5. I think i will try it again with Celestia 1.3.

Your edit with Emacs and the different name length has probably destroyed the 3DS file. I can't open billboard.3ds and b33.3ds with Anim8or, AutoCAD, GMAX and 3D Exploration. Only with Crossroads i can see the mesh.

I use an hex editor to modify the texture in the 3DS file but the new name must have the same lenth.

selden wrote:Are you telling Animator to do create a transparency effect or are you just depending on it doing the right thing with the Alpha channel within the GIF image?


Anim8or supports only an alpha channel (RGBA) with the GIF format. I thought the information if a RGBA texture is used must be saved to the 3DS file that the transparency works correct.

Thanks for your post

Jens

Posted: 15.04.2003, 00:33
by selden
Jens wrote:Ok now i see that you did nothing special to build the billboard object. All these steps i have also tried but with Celestia 1.2.5. I think i will try it again with Celestia 1.3.

I never even considered trying this in v1.2.5, sorry. I've been running the v1.3 prereleses ever since they became avaiilable. Several 3DS related bugs have been fixed in v1.3. The "final release" is supposed to be available *very* soon. (Before the end of this week, I'd guess.)

Your edit with Emacs and the different name length has probably destroyed the 3DS file. I can't open billboard.3ds and b33.3ds with Anim8or, AutoCAD, GMAX and 3D Exploration. Only with Crossroads i can see the mesh.

My primary interest has been to find a way to display pictures of Nebulae in Celestia. When I discovered that Celestia had no problems with the different name lengths, I didn't bother to test the models with any other 3D software. Sorry.

I originally tried to use Crossroads to translate a simple POVRay model into 3DS format, but it seemed to lose the texture name. Have you (or anyone?) ever tried that?

(I used to do a lot of modelling using POVRay v2.2. It has been a while since I've done any, though. I think the GUI of POVRay v3 is almost unusable.)

I use an hex editor to modify the texture in the 3DS file but the new name must have the same lenth.


I agree that should cause the fewest problems.

Posted: 15.04.2003, 08:52
by jim
selden wrote:I originally tried to use Crossroads to translate a simple POVRay model into 3DS format, but it seemed to lose the texture name. Have you (or anyone?) ever tried that?


Yes i have tried that but Crossroads convert only the mesh without a texture. Therefore i use 3D Exploration and GLView for conversion but both programs can't open POVRay files maybe that POVRay can export a file type which is supported by one of these programs.

Bye Jens