Page 1 of 1

Fireworks in space ! (globular clusters testing)

Posted: 25.12.2006, 21:30
by Cham
Since I'm in vacation, I use my time to test some ideas about globular clusters representations, using some CMOD models. Instead of making a huge STC file of fictious stars, I'm building some random spherical distribution of dots. The pure CMOD format is really under exploited by all the Celestia creators. So I'll try to convince some to make their own experimentations with this format. Here's a testing ball of random dots distributed on a sphere. While moving close to it, the ball grows and it really feels like a firework in space !

Image

A typical CMOD file of dots is like this (in this case, there are only four dots in this code) :

Code: Select all

#celmodel__ascii

material
  emissive 1 1 0
  diffuse 1 0 0
  opacity 1
end_material

mesh
  vertexdesc position f3 end_vertexdesc

vertices  4
0.8658485885146612       0.2426581291531574       -0.43751943285191164
0.09960431714365557      -0.8865045061998517      0.4518724825586342
-0.9508415773552661      -0.2907842543243548      0.10651202847368269
0.694091501772355        -0.5857211989415121      -0.41853036243254127

points 0  4
0
1
2
3

end_mesh



Next, I'll try to make a fuzzy ball of dots distributed inside the sphere, with a "nucleus", and various colors.

Posted: 25.12.2006, 22:30
by Cham
Here's a simple rendering test :

Image

Posted: 25.12.2006, 23:01
by Cham
The parameters I'm controlling for this "fuzzy ball" distribution are the total number of dots, the size of the ball, the radial distribution shape and the number of dots per spherical layer. The color is global (defined in the CMOD file). I'm not sure I'll be able to make a color variation inside the fuzzy ball without doing it by hand (which could be a lot of work).

Since my Mathematica code is done, generating an arbitrary fuzzy ball is extremelly easy and is a matter of seconds.

Posted: 25.12.2006, 23:17
by Cham
It's possible to put some (fake) stars in other galaxies, with the model defined as a nebula.

The advantage of this method is it's extremely fast in Celestia, since the model is only a bunch of luminous dots.

Later, I'll try to make a spiral pattern of random dots.

Image

Posted: 25.12.2006, 23:28
by Cham
I forgot to tell that I'll also try to simulate an accretion disk with this technique. I'll use several layers of oblate shells rotating with a differential angular velocity. I think I may achieve a "fluid" like motion and a real 3D effect. Of course, the global aspect will not be like a smooth distribution of gas, but it may be very interesting nonetheless.

Posted: 26.12.2006, 00:27
by Cham
In case someone want to play with a spherical layer and a simple fuzzy ball, here's a link to both CMOD files :

http://nho.ohn.free.fr/celestia/Cham/Divers/balls.zip (48 KB zip file)

Posted: 26.12.2006, 00:30
by BlindedByTheLight
Don't know if I know how to play with it myself...but looks good!

Thanks!

Posted: 26.12.2006, 00:45
by selden
Cham,

In principle, you should be able to persuade Mathematica to generate an appropriately random set of colors (and thus brightness) in addition to random radial distances with an appropriate distribution: the stars don't have to be in shells.

Posted: 26.12.2006, 01:04
by Cham
Selden,

really, I don't know how to do that with Mathematica. The problem is to export the data in a proper way, so I could easily paste it into a CMOD file.

Currently, I don't know how to tell Mathematica to make all the CMOD headers and formatting. It's just exporting the coordinates as three columns of numbers, and all I have to do is to paste that data into a proper CMOD file. So my method doesn't let me define the colors within Mathematica.

Posted: 26.12.2006, 01:15
by selden
Colors are just three numbers, too :)

I think you can use StringForm to create the text parts of a CMOD flie.

http://documents.wolfram.co.jp/mathemat ... tion-2.9.6

Posted: 26.12.2006, 01:18
by Cham
Thanks Selden, I'll check this.

And here's another example of fake stars cluster :

Image

Posted: 26.12.2006, 06:47
by Cham
Here's a good one. 3989 "stars". It's fun to travel inside.

Image

http://nho.ohn.free.fr/celestia/Cham/Di ... 2.cmod.zip (128 KB zip file)

The radial profile is an exponential probabilistic distribution (I removed the layers I was using at first). Should I use a gaussian (normal) radial distribution ?

Please, tell me what you think of this chip.


EDIT : It may be usefull to know how this format (CMOD) is working, so here's a micro-tutorial. Below is a typical code for a distribution of dots :

#celmodel__ascii

material
emissive 1 1 0
diffuse 1 0 0
opacity 1
end_material

mesh
vertexdesc position f3 end_vertexdesc

vertices 4
0.8658485885146612 0.2426581291531574 -0.43751943285191164
0.09960431714365557 -0.8865045061998517 0.4518724825586342
-0.9508415773552661 -0.2907842543243548 0.10651202847368269
0.694091501772355 -0.5857211989415121 -0.41853036243254127

points 0 4
0
1
2
3

end_mesh


The red numbers are RGB color definitions. You can change them to any numbers you want, but they must lie between 0 and 1.

The yellow number is the transparency effect (alpha). You can change it to any number between 0 and 1. Of course, 0 means "totally transparent" while 1 means "opaque".

The vertices number defines the coordinates of dots (vertices, actually).

The number 0 defines the material assignement, which is declared in the header (0 is associated to the first material declaration, 1 is the second material in the header, etc...) In the example above, there's only one material definition.

The number 4 is the number of vertices which are rendered as "dots" (points). This number may be different than the number of vertices.

There are some other options for this format, which permits the definition of lines between vertices, dash lines, etc, but I will not describe them here.

Posted: 26.12.2006, 19:54
by Cham
Now, I'm hitting a problem that kills the whole project >8-(

The model used as a nebula doesn't have a distance dependant brightness. At close range, it looks nice, but at large distance, it's annoying :

Image

Image

Another Celestia limitation that chop the creator's legs. Too bad. End of topic.

Posted: 26.12.2006, 20:54
by t00fri
Cham,

there are other aspects that tend to kill the whole project.

If you try to include many open clusters (>= 500, say) as add-ons, the highly effective octree culling mechanism is lacking! Hence by including many such add-ons the performance will be VERY slow.

Also by coding open cluster methods within the respective class, it is very easy to generate random star distributions according to an arbitrary pobability distribution (using the acceptance-rejection method very familiar from MonteCarlo techniques) .

Moreover, like for galaxies, an appropriate color profile can easily be incorporated.

Bye Fridger

Posted: 26.12.2006, 21:08
by Cham
My globular clusters project was actually just a pretext to use pure CMOD models. I like very much that format, and I want it to be used more often, as diagrams, schematics, magnetic fields, light trajectories, various kind of information layers, etc. So I'm looking for more ideas about how to use them.

I have tons of ideas, but I'm lacking the data, the skills, the knowledge or know-how to implement them. This is very frustrating.

I want the galactic magnetic field lines to be drawn as an information layer that could be toggled ON and OFF at will. I want nebulae and gas clouds contours to be drawn, I want vector fields of various types, etc.

O well, I'm just dreaming ... :cry:

Posted: 27.12.2006, 13:05
by neo albireo
Cham wrote:My globular clusters project was actually just a pretext to use pure CMOD models. I like very much that format, and I want it to be used more often, as diagrams, schematics, magnetic fields, light trajectories, various kind of information layers, etc. So I'm looking for more ideas about how to use them.

I want the galactic magnetic field lines to be drawn as an information layer that could be toggled ON and OFF at will.


I agree totally. Maybe a fast first step that provides a great advancement would be to have the option to toggle CMOD models on/off generally. Right now, I can place addons at another location, around another star etc. if I don't want the original solar system version stuffed with addons. p.e. Runar's Sun or things like a dying system addon that alter the appearance of the solar system dramatically, I place them just somewhere else than in our solar system and can fly there to show everything.
But: If I add CMOD models, i.e. the excellent deep space addons 2df_300k-cmod and sdss-dr2-v2, the points are just there to stay. So each time I present Celestia to somebody, I first tour the solar system and show some galaxies. Then I have to quit Celestia, put those addons into the extra folder and restart Celestia in order to show the bubble structure of the galaxy distribution. :cry: This is absolutely disappointing and I hope that it would not require a lot of work to include a toggle CMOD option. Please! Or is there already a key that I haven't discovered yet?

I think as a first step a simple toggle option would be sufficient. If you are showing the magnetic field addon, it does not disturb so much to have the deep space data points at the same time, as the feeling with Celestia changes immediately anyway: It becomes more an abstract scientific tool than without the CMODs. So I think even if you have many CMOD files, they can all coexist at the same time, but very often you just don't want to have ANY CMOD's in order to show an impressive photorealistic view of the universe without additional data. Of course additional layers would be even nicer :wink:

Posted: 29.12.2006, 18:11
by Monolyth
its seems as if there is a need for a cmod editor for celestia....this is interesting

Posted: 29.12.2006, 21:00
by selden
Yup -- one that understands lines and points, not just triangles as most 3D modelling software packages do.

Often, however, models need to be created algorithmically, as Cham has done to represent magnetic fields. Since it's relatively simple and well documented, ASCII CMOD format is well suited for this.

Posted: 29.12.2006, 21:09
by Cham
While a CMOD editor could be very usefull, I don't see how I could use a CMOD editor in many cases, since I have to develop some mathematical curves.

Since a week, I fights against Mathematica to draw some sophisticated magnetic field lines. I hope to be able to finish this project very soon.