Galaxy Rendering

General discussion about Celestia that doesn't fit into other forums.
Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #21by t00fri » 04.02.2005, 21:00

maxim wrote:
t00fri wrote:The challenge would be to
render from that typical base information something that is
more realistic than what we have got right now, without
'overdoing' it.

And all this has to be done FAST...
Well, at first 10000 Galaxies with *individual* 16x16 'far
distance' textures would need *less* space than a single 2k
texture.

Second, using a culling algorithm that removes invisible
instances before rendering would remove most of them (as
Evil Dr. pointed out on the andromeda example). Lets say -
generously - we'll get 200 remaining galaxies, so the needed
pixels are far less than in a 0.5k texture. I'm not sure what
size the default galaxy texture is, but I think is about that
size, and will have to be processed once for EVERY single
instance to be drawn.


So, in general, there is A LOT of potential rendering speed to
be gained, while, at the same time, galaxy rendering is
considerably improved. In special cases - when we zoom
onto a group of galaxies, so that they will show up in 'hires'
textures - we'll loose of course our gained benefits, but only
to end at the present general situation.


A first step would be to define the format, file storage space,
naming and general handling (existence, LOD switch
point/distance, ...) of such very lowres galaxy textures.



maxim



1 1/2 years ago I improved Celestia's galaxy culling
efficiency by about a factor of 3 for smaller fields of
view. So we are doing pretty well there already. I have
pictured above the standardized galaxy types. These have to
be generated generically depending on the type label in the
respective cataloque. Moreover, we can easily scale the
galaxies to the correct size and rotate them to the right
orientation from the above catalogue data. Finally, the correct
surface brightness can also easily be incorporated. This is
quite a bit of possible improvement altogether.

I should also mention that watching M31 (Andromeda) with
a 16 inch telescope is close to a "worst case scenario" ;-)
Given the small field of a 16", one can at best overlook the
extreme inner core of M31 and the contrast is much worse
than in good binocular glasses... While M31 is very bright, its
surface brightness is low! So using a pair of very good
70-100mm binoculars gives amazing results for that very
large galaxy, that extends over 6 full moon
diameters
!

Last not least, the theory of galaxy formation is meanwhile in
quite an advanced modelling stage. So I am sure we could
extract quite a bit of info about the generic 3d
structure
of the standard galaxies from the state of the
art scientific computer simulations of these galaxy types.

Bye Fridger

Evil Dr Ganymede
Posts: 1386
Joined: 06.06.2003
With us: 21 years 5 months

Post #22by Evil Dr Ganymede » 04.02.2005, 21:29

I should also mention that watching M31 (Andromeda) with
a 16 inch telescope is close to a "worst case scenario"
Given the small field of a 16", one can at best overlook the
extreme inner core of M31 and the contrast is much worse
than in good binocular glasses... While M31 is very bright, its
surface brightness is low! So using a pair of very good
70-100mm binoculars gives amazing results for that very
large galaxy, that extends over 6 full moon
diameters!


I thought it looked rather disappointing through the 16"... next time the sky is clear (fat chance around here...) I'll have a look with the binos and compare.

(I thought it looked like Comet Macholz, which I saw through an 8" Dobsonian (I think) - just a fuzzy blob).

MKruer
Posts: 501
Joined: 18.09.2002
With us: 22 years 2 months

Post #23by MKruer » 04.02.2005, 21:37

You also have to remember you are looking through a few thousand feet of atmosphere which blurs and washes out the image.

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

Post #24by t00fri » 04.02.2005, 21:48

MKruer wrote:You also have to remember you are looking
through a few thousand feet of atmosphere which
blurs and washes out the image
.


That's no argument whatsoever in case of galaxies. See here,
M31 as taken through "a few thousand feet of atmosphere"
(32 inch telescope, Kitt peak) and reduced by a factor of 4 in resolution!!,

Image
"NOAO/AURA/NSF"


Bye Fridger

Evil Dr Ganymede
Posts: 1386
Joined: 06.06.2003
With us: 21 years 5 months

Post #25by Evil Dr Ganymede » 04.02.2005, 22:41

Yes, and I still didn't see anything that looked remotely like that through the 16". The Kitt Peak photo is obviously long exposure - I'd be interested to see a short exposure (ie just click the shutter and that's it) photgraph of M31 to compare it to that. I'd imagine there must be on on an amateur astronomy site somewhere.

(bear in mind also that Kitt Peak is at the top of a mountain, so it's above most of the dense part of the atmosphere. Most of the rest of us live near sea level ;)).

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

Post #26by t00fri » 04.02.2005, 22:55

Evil Dr Ganymede wrote:Yes, and I still didn't see
anything that looked remotely like that through the 16". The
Kitt Peak photo is obviously long exposure - I'd be
interested to see a short exposure (ie just click the shutter
and that's it) photgraph of M31 to compare it to that. I'd
imagine there must be on on an amateur astronomy site
somewhere.

(bear in mind also that Kitt Peak is at the top of a mountain,
so it's above most of the dense part of the atmosphere.
Most of the rest of us live near sea level ;)).


I actively do astronomical observations since I am a child and certainly do bear in
mind that Kitt peak is at the top of a mountain! I am a
professional physicist, bear that in mind, please, when teaching me elementary physics lessons ;-) .


I have taken many photographs of M31 through my own 8 inch
telescope from sea level, with a very similar
result to the above picture. Remember, I reduced it by a
factor of 4 in resolution relative to the native resolution of
the 32 inch. I just happened to find the above image for
illustration purposes in the net.

Actually it was only meant to show that MKruer's atmosphere
argument is not the point here. With the narrow visual field of
a 16 inch, one can just see a little bit of the inner bright core
of M31 that is rather dull!


Since M31 is very bright, even a non-CCD exposure is quite
short. The above image is a mosaic of many CCD images, each one being a very short exposure, for sure.
Otherwise, with a 32 inch, M31 could never be mapped as a
whole.

Evil Dr Ganymede
Posts: 1386
Joined: 06.06.2003
With us: 21 years 5 months

Post #27by Evil Dr Ganymede » 04.02.2005, 23:23

t00fri wrote:I actively do astronomical observations since I am a child and certainly do bear in mind that Kitt peak is at the top of a mountain! I am a professional physicist, bear that in mind, please, when teaching me elementary physics lessons ;-) .

Well, you didn't mention it in your post - I was mentioning it more for everyone else who might not realise that was the case.


I have taken many photographs of M31 through my own 8 inch
telescope from sea level, with a very similar
result to the above picture.

How long was the exposure in your photos? And can you post any of your pictures here so we can compare them?


Since M31 is very bright, even a non-CCD exposure is quite
short. The above image is a mosaic of many CCD images, each one being a very short exposure, for sure. Otherwise, with a 32 inch, M31 could never be mapped as a whole.


Yes, I was wondering whether the KP picture was a mosaic, since you said that 16" couldn't see the whole galaxy...

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

Post #28by t00fri » 04.02.2005, 23:25

Here is a photo from an amateur (shot from his house)
with a small Takahashi FS-60C refractor, like the one
owned by Chris. The aperture is 'tiny' (60 mm) and the field so large that most of M31 fits on a single photo!

Image

I do not have a CCD and correspondingly do not have my images in digital form.

Evil Dr Ganymede
Posts: 1386
Joined: 06.06.2003
With us: 21 years 5 months

Post #29by Evil Dr Ganymede » 04.02.2005, 23:53

Wow. That's just a single 'click the shutter' short exposure?!

BTW, I found this artist impression of the milky way on APOD, I dunno if it would help with getting the look of the milky way right....
http://antwrp.gsfc.nasa.gov/apod/ap050104.html

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

Post #30by t00fri » 04.02.2005, 23:57

Evil Dr Ganymede wrote:Wow. That's just a single 'click the shutter' short exposure?!

BTW, I found this artist impression of the milky way on APOD,
I dunno if it would help with getting the look of the milky way
right....
http://antwrp.gsfc.nasa.gov/apod/ap050104.html


It is certainly a single shot and nicely illustrates what I said
before about using 70-100 mm binos. With a 100 mm
telescope a single (color) ccd exposure would just be very
few minutes
. However, often people stack a number of
them on top of each other to enhance detail and contrast.

Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 9 months

Post #31by Toti » 05.02.2005, 01:48

Fridger,

Thank you for your most informative answer.

After a quick glance through the code, it looks like Celestia condenses all the spiral subtypes into a single category.
The 3d structure associated with each shape type is defined once, and at loading time, bound to each galaxy instance.
These shapes are created procedurally; subtle structures like barred-spirals, etc, are more difficult and time-consuming to describe mathematically, hence -I assume- the lack of spiral subtypes.
Galaxies are aligned and oriented as defined in the corresponding catalog entry (currently the brightness parameter is commented out)
Also, a dynamic LOD implementation is included, so the rendering of distant galaxies is quite minimized.
Each galaxy is rendered as a collection of small particles (squares facing the camera) There are up to 5000 of these squares per object (this can be limited using the "detail" parameter)


So an immediate improvement would be to expand the spiral type into its constituent subtypes, thus accounting for the morphological differences. This appears to be rather simple, and would lead to a more realistic and complete visualization.
Also a self-brightness value could be added to each particle. This way, brightness differences toward the most star-populated volumes could be portrayed (using some exponential scale during the shape creation stage)

Last, since galaxies are compound of these low resolution, discrete "particles" of procedural nature, they appear as good candidates for testing a multispectral filtering/variable exposure scheme. (A really interesting research subject)


Bye

Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 22 years 9 months
Location: Darmstadt, Germany.

Post #32by Spaceman Spiff » 05.02.2005, 11:45

t00fri wrote:I should also mention that watching M31 (Andromeda) with a 16 inch telescope is close to a "worst case scenario" Wink Given the small field of a 16", one can at best overlook the extreme inner core of M31 and the contrast is much worse than in good binocular glasses... While M31 is very bright, its surface brightness is low! So using a pair of very good 70-100mm binoculars gives amazing results for that very large galaxy, that extends over 6 full moon diameters!


Hmm, this might be slightly misleading. For observing low surface brightness objects like M31, what's more important for binoculars is the power, rather than aperture. Patrick Moore's banged on about this for decades: use lower power, not higher aperture. From my experience with 7?—50's, you will still see M31 as a misty blob occupying only the centre of the field of view. It's because you are only seeing the core of M31, which is the bright white patch in those lovely pics above. Arms are still invisible in binos.

By the way, here's a development idea I have for (Milky Way) galaxy rendering. Since the Milky Way you see in the sky is composed of unresolved stars, not nebulae, then use the remainder of stars from the stars.dat that aren't explicitely drawn. Whenever a star is determined to be below magnitude limit, don't ignore it: decide which pixel it would have appeared in and add its brightness to a pixel bucket. When all stars have been processed, turn this pixel map of the Milky Way into a transparent PNG and render as a sphere where the grids are placed. Simple.

When you travel to another star system, re-render the background stars image when you arrive.

You can get an idea of this effect by upping the magnitude limit in Celestia to max, and you'll see the stars seem to 'draw' the dark dust lanes of the Milky Way.

Yes, there'll be 'problems' and it's only as good as the coverage of the stars.dat file, but I'm sure that very good for 100 (1,000?) light-years or so within Sol. When we have our 500THz PC's this could be done on the fly, and the next catalogue should cover 10,000LY.

Spiff.

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #33by maxim » 05.02.2005, 12:46

t00fri wrote:1 1/2 years ago I improved Celestia's galaxy culling
efficiency by about a factor of 3 for smaller fields of
view. So we are doing pretty well there already. I have
pictured above the standardized galaxy types. These have to
be generated generically depending on the type label in the
respective cataloque. Moreover, we can easily scale the
galaxies to the correct size and rotate them to the right
orientation from the above catalogue data. Finally, the correct
surface brightness can also easily be incorporated. This is
quite a bit of possible improvement altogether.

I am supposing that the generall culling algorithm works quite well. I had in mind, especially, the missing magnitude handling for galaxies. Additionally removing galaxies that a too dim to display may improve rendering speed even more.

Toti, thank you for your short explanations. I hadn't been gone throught the code.
So we have a hybrid situation here. In general galaxies are rendered procedurally, in special they are rendered as billboards if explicitly defined (my posts above did only mention billboard rendering, for wich I think my suggestions stay valid because of main- and texture memory considerations).

I can't really guess how time consuming procedural rendering is here, but my systems reactions indicate that it almost triples the time for constructing one frame. Apparently there is some space for improvements here. I'd like to suggest some experimental configuration entrys that allow to reduce the amount of rendered particles for one galaxy, and to switch between 'procedural only' and 'billboard only' rendering. This could give us a better understanding of time costs.

maxim

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

Post #34by t00fri » 05.02.2005, 15:37

Spaceman Spiff wrote:
t00fri wrote:I should also mention that watching M31 (Andromeda) with a 16 inch telescope is close to a "worst case scenario" Wink Given the small field of a 16", one can at best overlook the extreme inner core of M31 and the contrast is much worse than in good binocular glasses... While M31 is very bright, its surface brightness is low! So using a pair of very good 70-100mm binoculars gives amazing results for that very large galaxy, that extends over 6 full moon diameters!

Hmm, this might be slightly misleading. For observing low surface brightness objects like M31, what's more important for binoculars is the power, rather than aperture. Patrick Moore's banged on about this for decades: use lower power, not higher aperture. From my experience with 7?—50's, you will still see M31 as a misty blob occupying only the centre of the field of view. It's because you are only seeing the core of M31, which is the bright white patch in those lovely pics above. Arms are still invisible in binos.
...
Spiff.


I don't think I made any misleading statements.

When observing M31 with a 7x50 bino, another important
effect might easily affect your observing pleasure: Sky
brightness, that generally increases with decreasing power
(and 7x is definitely too low!). In your case of a 7x50 in less
than perfect conditions, the delicate outer regions vanish in
the sky "glow", unfortunately, such that only the central
"blob" of M31 remains visible. I suppose we do agree here...

My own experience is that for the best view of M31 (or e.g.
also of M33), one needs aperture AND sufficient power
through wide-angle eyepieces. In the Engadin/Switzerland,
where I hike since many years in summer, I had often
spectacular views of M31 with as little as 10x50 binos. Such
views I could never have gotten near my house close to a big
city like Hamburg. In the Engadin, the sky background is
/really/ black at night with NO artificial light anywhere. The
milky way appears unbelievably bright.

Another issue concerns the quality of the bino optics. Lens
aberations and|or aberations in the delicate bino alignment,
may leave comparatively few apparent traces, if one watches
distinct objects (notably, since the magnification is generally
LOW) . However, when it comes to exploiting the faintest
possible light levels
in the outer regions of galaxies, the
perfect convergence of /all/ rays in the focal plane over a
/large/ angular domain is CRUCIAL. I made plenty of
respective experiments over the years, checking various
low-priced binos against a LEITZ Trinovid (<- LEICA!) as a
reference (that is really a class of its own, optically and
correspondingly VERY expensive...)

We all agree, of course, that the /visual/ observation of spiral
arms is yet another matter. Only M51 clearly exhibits its
beautiful spiral structure visually in smaller telescopes
due to a much higher surface brightness. Unlike photographs,
the eye unfortunately does not "add up" the incoming
photons! The generally low level of incoming light usually
also leads to the well-known loss of colors in visual
observations of galaxies and|or nebulae.


Bye Fridger
Last edited by t00fri on 06.02.2005, 12:24, edited 1 time in total.

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #35by Rassilon » 05.02.2005, 15:51

t00fri wrote:Here is a photo from an amateur (shot from his house)
with a small Takahashi FS-60C refractor, like the one
owned by Chris. The aperture is 'tiny' (60 mm) and the field so large that most of M31 fits on a single photo!

Image

I do not have a CCD and correspondingly do not have my images in digital form.


Hmm I think I better own that scope....Ive been reading on it and it sounds like a real powerful piece of equipment but a tad out of my price range....What I need is to find an affordable solution of possibly a used model...I tried ebay but no cigar...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 22 years 9 months
Location: Darmstadt, Germany.

Post #36by Spaceman Spiff » 05.02.2005, 16:17

Hallo Dr S. Well, I can't say I've tried out this Trinovid, I only have impoverished bog-standard binos...

t00fri wrote:Unlike photographs, the eye unfortunately does not "add up" the incoming photons!


What I'm curious about is what do owls see at night. I roughly calculated they must see stars down to mag 9-10, so I wonder how they perceive M31?

Spiff.

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

Post #37by t00fri » 05.02.2005, 16:59

Rassilon wrote:...
Hmm I think I better own that scope....Ive been reading on it and it sounds like a real powerful piece of equipment but a tad out of my price range....What I need is to find an affordable solution of possibly a used model...I tried ebay but no cigar...


Hey Ras',

indeed, the 2000$ FS-60C seems to be a really neat toy, but --not to forget-- quite specialized to wide-angle, large-scale observations and photography.


Bye Fridger

Toti
Developer
Posts: 338
Joined: 10.02.2004
With us: 20 years 9 months

Post #38by Toti » 07.02.2005, 04:26

maxim wrote:Toti, thank you for your short explanations. I hadn't been gone throught the code.
So we have a hybrid situation here. In general galaxies are rendered procedurally, in special they are rendered as billboards
if explicitly defined (my posts above did only mention billboard rendering, for wich I think my suggestions stay valid
because of main- and texture memory considerations).
I can't really guess how time consuming procedural rendering is here, but my systems reactions indicate that it almost
triples the time for constructing one frame.
Apparently there is some space for improvements here. I'd like to suggest some experimental configuration entrys that allow
to reduce the amount of rendered particles for one galaxy, and to switch between 'procedural only' and 'billboard only'
rendering. This could give us a better understanding of time costs.


A bottleneck here is that all these small particles must be blended together per each single frame.
These are two cases that we may consider:

-blending the particles that form a single galaxy
When galaxies fill a small portion of the screen, the LOD implementation guarantees that each one will be made up of a small number of particles. Also, under this condition, the probability that two galaxies are overlapping is quite small.
Hence, increasing the number of rendered galaxies doesn't imply a big performance hit due to the fact that pixel operations also grow more or less linearly.

-blending different overlapping galaxies
On the other hand, when a galaxy is very close to the viewer, almost all of its constituent particles must be rendered, and most of them will produce some overlap. With the remaining (far) galaxies the situation is similar to the former point: they rarely overlap, but some of them will indeed share pixels with the foreground galaxy. (But since they are made up of a few particles, and they mostly span a few pixels, this won't add much overhead)
So we are left with the problem of "intra overlapping".
The LOD implementation includes a device that rejects particles when they cover more than a determined screen area.
This avoids extreme performance hits in fill-limited systems (ie. a large amount of pixel-blending operations is saved)

With billboard rendering there isn't a noticeable difference when they are far away (and small). But if you are very close to one of them (assuming it's planar) for each billboard's pixel only a single blending operation must be done. They are rendered quite fast when compared to galaxies.
Things change dramatically when you put a few of them very close to each other (eg. to fake a volume) and you watch it from a short distance: with a stack of 32 of such bilboards fps fall from 25 to 5 in a PIII 1Ghz Riva TNT2.

Bye


Return to “Celestia Users”