New spiral galaxy types rendering

General discussion about Celestia that doesn't fit into other forums.
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 7 months

Post #41by ElChristou » 14.04.2005, 21:38

For those who are not progamers (like me) your post is very well done, and give a good idea on how thing work in Celestia...

Many Tx for spending time on this.

Bye.
Last edited by ElChristou on 15.04.2005, 20:35, edited 1 time in total.
Image

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years
Location: Pordenone/Italy

Post #42by Paolo » 15.04.2005, 11:51

I think that is a great pity that any developer is going to be involved and give a hand to Toti.

Perhaps this issue is not perceived as something important or fun to play with. If I'll have some spare time in a near future I'll make some tests.
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

Topic author
Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 7 months

Post #43by Toti » 11.05.2005, 00:10

Hello,

Just an update on development status.

As you may recall, there was a distribution density problem that caused the renderer to saturate the fillrate (in old hardware) when the observer was close to the bulge of barred galaxies.
Trying to fix this by tweaking the LOD caused some quite unrealistic side effects.
I had the idea of reparametrizing the spiral curve as an arc-length trajectory (speed = 1 on every point). Sampled at regular intervals, this would give a perfectly uniformly distributed placement of blobs. But this solution implies solving some integrals that can very quickly turn out to be unmanageable. This was true for almost all the cases I tried: the involved solutions couldn't be analytically resolved or they were too complex to be computed fast enough.
On the other hand, several algorithmical solutions were simple and direct, but with not very satisfactory results (ie. the galaxies looked as regular and unnatural as with the former strategy, but without its many advantages).

To circumvent these problems, I tried an image based modelling approach.
Here is a screenshot that shows some very quick attempts using this technique. The galaxy models are built from three small images that were processed to make them less identifiable and more generic, etc.

There are obvious improvements to do, but this gives the most realistic results so far, it's relatively faster and completely flexible (it's really easy to adjust the shapes, etc.). Moreover, the small code modifications involved make possible to enable truely 3D "pseudo-volumetric" objects in the future (ie. not single billboards or surface-only 3d meshes, albeit real data availability is the main issue here).

I won't be able to work much on this during the next weeks though. I'll eventually clean the code and submit a patch for revision.

Chris, would it be a good idea to load the models from a single binary CMOD (using the [points] primitive)?

(Click to enlarge)
Image


Bye
Last edited by Toti on 11.05.2005, 02:05, edited 1 time in total.

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 7 months

Post #44by ElChristou » 11.05.2005, 00:52

Toti wrote:...the small code modifications involved make possible to enable truely 3D "pseudo-volumetric" objects in the future (ie. not single billboards or surface-only 3d meshes, albeit real data availability is the main issue here)...


This is a very promising news...
Very good work Toti, tx, know I hope Chris will have a serious look at all this...

Bye
Image

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years
Location: Pordenone/Italy

Post #45by Paolo » 11.05.2005, 22:25

Toti
I don't understand why you want to change the initial approach.
IMHO if the distribution is the problem I suggest to place the blobs in a parametrized multipassage system:

Parameters for galaxy type AAA:

#amount of stars
bulge 30%
disc 30%
arms 30%
halo 10%
# bulge shape related to size
bulgeX 30%
bulgeY 30%
bulgeZ 30%
# disc height related to size
discY 20%
#
discZ 85%
...

So using these parameters you can place randomly the disk, the halo and the bulge blobs in the vector. The using the same parameters and your algorithms you can create the arms and add the blobs to the vector.

Last operation in order to allow a good LOD management you will use an STL random_shuffle algorithm on the entire vector and you'll have the final result.

To improve further the appearance you can use vectors of 4 float instead then Point3F. The fourth argument can store informations about color and size of the blob that will be used in the rendering.

Not very difficult to do. :wink:
Remember: Time always flows, it is the most precious thing that we have.

My Celestia - Celui

Topic author
Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 7 months

Post #46by Toti » 13.05.2005, 03:49

Paolo,

This was an strategy that I followed several weeks ago, after finally rejecting the arc-length stuff.
I PM'd the last of these intents to Fridger: we both agreed that despite being an enhancement, it was not yet entirely satisfactory.

The suggestion you posted above is very close to the outline of my algorithm, including of course the random_shuffle() part.

Bye

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years
Location: Pordenone/Italy

Post #47by Paolo » 13.05.2005, 13:45

Toti IMHO your solution for now is more than enough.
It should allow us to include a big database of galaxies into a DSC addon and finally we will be able to see almost realistically how appears the milky way surroundings, the local group and the filamentous structure of the universe at the galaxy groups scale!
So please :!: publish an executable or the source code in order to allow the community to make some experiments :!:
Thank you.
Remember: Time always flows, it is the most precious thing that we have.

My Celestia - Celui

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #48by t00fri » 13.05.2005, 14:19

Indeed, I could easily extract (<--Perl-script) a modified galaxy catalog for Celestia from Steinicke's corrected NGC catalog with 14000 objects that contains Hubble's extended shape classification and possibly some color info and inclination i (relative to face-on view)

Note: Toti has prepared the ground already for colorful galaxies!

Normally in catalogues, the appearance of galaxies is characterized by

Vmag, Bmag (visual and Blue (photographic) magnitude
Sb (Surface Brightness)
smallest apparent size d
largest apparent size D
position angle (many PA's are actually incorrect in popular
catalogues; they must be mirrored at 90deg!),

and empirically, one may use in most cases the formula for the
/inclination i from face-on/:

i = 3deg + acos(sqrt(((d/D)^2 - 0.2^2)/(1 - 0.2^2)))


Bye Fridger

TERRIER
Posts: 717
Joined: 29.04.2003
With us: 21 years 4 months
Location: West Yorkshire, England

Post #49by TERRIER » 13.05.2005, 19:09

Is it fair for me to say that it appears that we are beginning to see some light at the end of the tunnel.....or maybe I should say, a focusing of the fuzzy light sources in our Celestia telescopes ??? :wink:

Keep up the good work !
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

Topic author
Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 7 months

Post #50by Toti » 14.05.2005, 12:10

Paolo wrote:Toti IMHO your solution for now is more than enough.
It should allow us to include a big database of galaxies into a DSC addon and finally we will be able to see almost realistically how appears the milky way surroundings, the local group and the filamentous structure of the universe at the galaxy groups scale!
So please publish an executable or the source code in order to allow the community to make some experiments
Thank you.


I'll publish a compressed file (still a WIP). This includes the new spiral models except the S0 and SBb ones, a simplistic, proof-of-concept light sensitivity mode and indexed coloring of galaxies. It still needs some extensive tweaking of transparency, hue, etc., but I can't properly judge these things in my low contrast CRT.

Some quick notes:
1) For the time being the models are loaded from text files, so you'll experience a noticeable delay at startup.
2) The default settings are meant to allow an acceptable frame rate in limited video cards: galaxies could look much better in modern hardware.
3) I am interested in the way this code handles lots of galaxies (it's very good at rejecting far objects, but the depth buffer precision could be a serious limitation, especially with older systems).


Bye

Topic author
Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 7 months

Post #51by Toti » 14.05.2005, 23:03

The file is here:

http://s1.youshareit.com/files/ae0b50c6fd7960066bdf92a668e988ce.html

The galaxy models must be in //root, unless you manually change the code, of course.
Press Ctrl-u to increase the "light sensitivity" and Ctrl-r to decrease it (this breaks multiview: the modification is at core level, so platform-specific code is not affected, ie. menues will still refer to split view, etc.)

Bye

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #52by t00fri » 15.05.2005, 10:30

Toti wrote:The file is here:

http://s1.youshareit.com/files/ae0b50c6fd7960066bdf92a668e988ce.html

The galaxy models must be in //root, unless you manually change the code, of course.
Press Ctrl-u to increase the "light sensitivity" and Ctrl-r to decrease it (this breaks multiview: the modification is at core level, so platform-specific code is not affected, ie. menues will still refer to split view, etc.)

Bye


Hi Toti,

I have installed your galaxy patch! It's a big step forward in appearance. So far I used your "dummy galaxy catalog" only.

I have not yet looked into the code from the point of view of speed and efficiency. Linux-KDE users can indeed not use CTRL-r, CTRL-u without reprogramming (ALT-u, ALT-r should work better, I guess). These CTRL-r,u keys make lots of multi-windows appear instead of changing the luminosities ;-)

The next important step would be to discuss which galaxy-input parameters are required for their adequate description in Celestia.

As I emphasized in my previous post, besides the min-max extensions and the position angle, we must use some estimate for the inclination relative to face-on view. From the two standard magnitudes ((Vmag and Bmag) we may implement some rough color estimates, etc...

Bye Fridger

Topic author
Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 7 months

Post #53by Toti » 15.05.2005, 12:15

Fridger wrote:I have not yet looked into the code from the point of view of speed and efficiency.
The main performance penalty is the parsing of the .pts files at startup. Loading them from a single binary file should improve this a lot.
Also, this LOD uses Chris' original algorithm, with a minimal setup change: there is a small speed loss in change for visual quality, but it works quite well in my TNT2.
I still must compensate the brightness saturation when galaxies are watched edge-on (this should be easy).
Of course, feel free to adjust the visual settings as preferred.

Fridger wrote:Linux-KDE users can indeed not use CTRL-r, CTRL-u without reprogramming (ALT-u, ALT-r should work better, I guess). These CTRL-r,u keys make lots of multi-windows appear instead of changing the luminosities
I am also a KDE user, but I have mapped the keyboard with the MS-Windows layout, so I don't have any problems. I didn't think about that... :oops:

Fridger wrote:The next important step would be to discuss which galaxy-input parameters are required for their adequate description in Celestia.

As I emphasized in my previous post, besides the min-max extensions and the position angle, we must use some estimate for the inclination relative to face-on view. From the two standard magnitudes ((Vmag and Bmag) we may implement some rough color estimates, etc...

I think that we could still use a single color table for all galaxies, and -on frame rendering- multiply every blob color asignment by a blue magnitude factor specific for each instance.

Bye
Last edited by Toti on 15.05.2005, 16:15, edited 1 time in total.

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 1 month

Post #54by danielj » 15.05.2005, 14:38

Is this file intended to Celestia final users?Or just for programmers?In other words,I would like to know if it is an experimental file or a format not recognised by Celestia.

Toti wrote:The file is here:

http://s1.youshareit.com/files/ae0b50c6fd7960066bdf92a668e988ce.html

The galaxy models must be in //root, unless you manually change the code, of course.
Press Ctrl-u to increase the "light sensitivity" and Ctrl-r to decrease it (this breaks multiview: the modification is at core level, so platform-specific code is not affected, ie. menues will still refer to split view, etc.)

Bye

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #55by t00fri » 15.05.2005, 14:49

danielj wrote:Is this file intended to Celestia final users?Or just for programmers?In other words,I would like to know if it is an experimental file or a format not recognised by Celestia.

Toti wrote:The file is here:

http://s1.youshareit.com/files/ae0b50c6fd7960066bdf92a668e988ce.html

The galaxy models must be in //root, unless you manually change the code, of course.
Press Ctrl-u to increase the "light sensitivity" and Ctrl-r to decrease it (this breaks multiview: the modification is at core level, so platform-specific code is not affected, ie. menues will still refer to split view, etc.)

Bye


This is development stuff. You have to be able to compile Celestia yourself to make use of it.

Bye Fridger

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years
Location: Pordenone/Italy

Post #56by Paolo » 15.05.2005, 18:08

Thank you Toti :D

Unfortunately I'm not a linux user/developer so I don't know how to use your diff file in order to update my Celestia source files. :?
I guess that there is some way to avoid to do the work by hand. :oops:
Indeed it's even a long time that I don't recompile Win Celestia on my system.
Remember: Time always flows, it is the most precious thing that we have.

My Celestia - Celui

Topic author
Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 7 months

Post #57by Toti » 16.05.2005, 00:17

Paolo wrote:Unfortunately I'm not a linux user/developer so I don't know how to use your diff file in order to update my Celestia source files.
I guess that there is some way to avoid to do the work by hand.


There are several free diffing/patching utilities for Windows. See here: http://www.programmersheaven.com/zone16/cat654/

Bye

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #58by t00fri » 16.05.2005, 20:22

Hi all,

I played a bit further with Toti's galaxy patch. Altogether, I think we are almost there. They

JUST LOOK GOOD!

...and also their 3d structure is most appealing. I changed the colors a bit and placed the reference galaxy images into one directory (galaxy-types).

Here is another little screen-dump of how things look like:

Image
Image

Bye Fridger

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 7 months

Post #59by ElChristou » 16.05.2005, 20:37

Hello, Fridger

This work seems great... can you make a zoom on one of these to have a better view? (your screenshot is a bit small to appreciate the details)
Image

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 5 months
Location: Hamburg, Germany

Post #60by t00fri » 16.05.2005, 20:39

ElChristou wrote:Hello, Fridger

This work seems great... can you make a zoom on one of these to have a better view? (your screenshot is a bit small to appreciate the details)


I just added one you might have missed it seconds ago ;-)

Bye Fridger


Return to “Celestia Users”