New spiral galaxy types rendering
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
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.
Many Tx for spending time on this.
Bye.
Last edited by ElChristou on 15.04.2005, 20:35, edited 1 time in total.
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)
Bye
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)
Bye
Last edited by Toti on 11.05.2005, 02:05, edited 1 time in total.
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
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
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.
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.
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
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
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.
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.
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
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
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
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 ???
Keep up the good work !
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
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS
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
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
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
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
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
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.Fridger wrote:I have not yet looked into the code from the point of view of speed and efficiency.
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.
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...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
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.
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
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
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 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
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
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:
Bye Fridger
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:
Bye Fridger
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months