The Milky Way as a nebula

Post requests, images, descriptions and reports about work in progress here.
Boux
Posts: 435
Joined: 25.08.2004
With us: 20 years 2 months
Location: Brittany, close to the Ocean

Post #21by Boux » 21.01.2006, 15:12

OK, here are the bits of code to change/add:

In galaxy.h we have to declare a new SBbc type and enumerate accordingly:

Code: Select all

 public:
    enum GalaxyType {
        S0   =  0,
        Sa   =  1,
        Sb   =  2,
        Sc   =  3,
        SBa  =  4,
        SBb  =  5,
        SBc  =  6,
// begin new/modified code block
   SBbc   =  7, // new galaxy type
        E0   =  8, // increment +1 the next types
        E1   =  9,
        E2   = 10,
        E3   = 11,
        E4   = 12,
        E5   = 13,
        E6   = 14,
        E7   = 15,
        Irr  = 16
// end new/modified code block
    };


There are several things to do in galaxy.ccp.

First, we add the new type's name:

Code: Select all

static GalaxyTypeName GalaxyTypeNames[] =
{
    { "S0",  Galaxy::S0 },
    { "Sa",  Galaxy::Sa },
    { "Sb",  Galaxy::Sb },
    { "Sc",  Galaxy::Sc },
    { "SBa", Galaxy::SBa },
    { "SBb", Galaxy::SBb },
    { "SBc", Galaxy::SBc },
// begin new galaxy type
    { "SBbc", Galaxy::SBbc },
// end new galaxy type
    { "E0",  Galaxy::E0 },
    { "E1",  Galaxy::E1 },
    { "E2",  Galaxy::E2 },
    { "E3",  Galaxy::E3 },
    { "E4",  Galaxy::E4 },
    { "E5",  Galaxy::E5 },
    { "E6",  Galaxy::E6 },
    { "E7",  Galaxy::E7 },
    { "Irr", Galaxy::Irr },
};


Then let's Celestia pick up its choice:

Code: Select all

    switch (type)
    {
    case S0:
    case Sa:
    case Sb:
    case Sc:
    case SBa:
    case SBb:
    case SBc:
// begin new galaxy type
    case SBbc:
// end new galaxy type
        form = spiralForms[type - S0];
        break;
    case E0:
    case E1:
    case E2:
    case E3:
    case E4:
    case E5:
    case E6:
    case E7:
        form = ellipticalForms[type - E0];
        //form = NULL;
        break;
    case Irr:
        form = irregularForm;
        break;   


Now we increase the number of forms and add a new one:

Code: Select all

//    spiralForms   = new GalacticForm*[7];
// begin changed line - we have 8 Hubble types now instead of 7
// we have to add the new form here
    spiralForms   = new GalacticForm*[8]; // <-- 8 forms now
// end changed line   
    spiralForms[Galaxy::S0]   = buildGalacticForms("models/S0.pts");
    spiralForms[Galaxy::Sa]   = buildGalacticForms("models/Sa.pts");
    spiralForms[Galaxy::Sb]   = buildGalacticForms("models/Sb.pts");
    spiralForms[Galaxy::Sc]   = buildGalacticForms("models/Sc.pts");
    spiralForms[Galaxy::SBa]  = buildGalacticForms("models/SBa.pts");

    spiralForms[Galaxy::SBb]  = buildGalacticForms("models/SBb.pts");
    spiralForms[Galaxy::SBc]  = buildGalacticForms("models/SBc.pts");
// begin new galaxy type
    spiralForms[Galaxy::SBbc]   = buildGalacticForms("models/SBbc.pts");
// end new galaxy type


That's it for the code.

We have now to edit the type for the Milky Way from SBc to SBbc in the deepsky.dsc file which sits in /celestia/data/ so that it reads:

Code: Select all

# Milky Way
Galaxy "Milky Way"
{
        Type  "SBbc"
        RA           17.7500
        Dec         -28.9300
        Distance   2.772e+04
        Radius         5e+04
        AbsMag         -20.5
        Axis    [  0.8660   0.4910   0.0910]
        Angle    176.0000
}


We are done.
The SBbc.pts model is there:
http://jmmi.club.fr/celestia/MW/SBbc.pts.zip

I hope I did not forget anything 8)

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #22by Vincent » 22.01.2006, 11:59

Thanks Boux,

Here's a picture showing M109, that was classified, like our milky way, as a SBc type galaxy in the the basic Hubble scheme, and more recently as a SBbc type galaxy in the last Wolfgang Steinicke's NGC/IC Database Files used by Fridger to build the deepsky.dsc file.

Image
credits : NOAO/AURA/NSF
http://www.noao.edu/image_gallery/html/im0611.html

If we (roughly, just to have an idea) modify the picture to make the galaxy face the observer, we can see it is quite close to Boux's SBbc.pts model...
Image
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Boux
Posts: 435
Joined: 25.08.2004
With us: 20 years 2 months
Location: Brittany, close to the Ocean

Post #23by Boux » 22.01.2006, 12:42

Vincent, je viens te t'envoyer un nouveau MP...

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 1 month
Location: Manassas, VA

Post #24by fsgregs » 23.01.2006, 03:45

Vincent and Boux:

I love the new look to the Milky Way from afar. Please check to see what it looks like from inside looking out. I have found that on some galaxy models, the haze of the Milky Way becomes very thin and bright when I change the galaxy type in deepspace.dsc. It no longer looks like the haze that we are used to seeing.

Assuming it looks as good from inside as from outside, could you add the code for SBbc to your sound/overlay/Dr. Joe patch, attach everything to the newest CVS developers version of 1.4.1 and post a Windows.exe files of that for us to check out? :)

Thanks

Frank

Boux
Posts: 435
Joined: 25.08.2004
With us: 20 years 2 months
Location: Brittany, close to the Ocean

Post #25by Boux » 23.01.2006, 08:19

fsgregs wrote:Vincent and Boux:
I love the new look to the Milky Way from afar. Please check to see what it looks like from inside looking out. I have found that on some galaxy models, the haze of the Milky Way becomes very thin and bright when I change the galaxy type in deepspace.dsc. It no longer looks like the haze that we are used to seeing.


Frank, I see what you are talking about some models being overly bright and thin when seen edge on.
This model looks very good edge on and from within.
I have modified the algorithm in the code of the bmp2pts converter so that I can tune the overall thickness of the galaxy disk and the shape of the central bulge almost independently.

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #26by Vincent » 24.01.2006, 18:30

Boux,

It seems like the Milky Way looks too bright from the inside.
- Here's a picture with your SBbc.pts model :
Image

- Here's a picture with the default Sbc.pts model :
Image

As you can notice, there also seems to be a problem of orientation, since these 2 shots have been taken at the same date and hour.

Can you reproduce these problems on your system ?
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #27by ElChristou » 24.01.2006, 18:55

Hello guys,

I just came over this thread and the only thing I can say is better wait a while than loosing time working on this, because:

1) the subclasses will be implemented in some future versions,
2) for a better rendering of the templates we should wait to see the next implementation from Chris with cmod points...

Also the problem with the MW is that even with a really fantastic template seen from outside, once inside this template become useless because generally too bright... I think a special code sould be written for this problem...
Image

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

Post #28by t00fri » 24.01.2006, 19:06

Hey guys,

M109 above really will be a nice special template for the Milky way. The photo is anyhow WAY better than this "artist's view" from NASA...

Sorry, if I have to repeat myself: you have got to normalize your galaxy template brightness to a maximum value of 1.0 by whatever software you prefer. Then the display should be about right also "inside". The code simply assumes properly normalized templates. Also don't forget to allign the bar along the x-axis!

Bye Fridger

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #29by Vincent » 24.01.2006, 19:18

ElChristou,

I agree with you, but since 1.4.1 is gonna be an important maintenance release (with the new phoebe texture/model :D ), we'll have to wait for a little while before the SBbc and all other galaxy sub-types are implemented.

Moreover, many users have asked for a Milky Way model improvement. From that, I think it's not a bad thing at all to try to customize our galaxy right now and to give users the possibility to test it with all the other new functions of the celestia_patch version (sound/overlay/start-end dates, ...).

Fridger,

Thanks for the feedback and the advice. I also think the M109 galaxy can be a very good start for an accurate model of SBbc galaxy. It's like we could see our own galaxy from outside... :wink:
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #30by ElChristou » 24.01.2006, 20:25

t00fri wrote:...Sorry, if I have to repeat myself: you have got to normalize your galaxy template brightness to a maximum value of 1.0 by whatever software you prefer. Then the display should be about right also "inside". The code simply assumes properly normalized templates...


Yes... unfortunatly if you recall my test with "multi layers" of points, once normalized, we lose the benefit of some bright parts, very similar to what can be seen in various photos... IMHO, the use of the actual bmp2pts won't allow some perfect nice templates...
Image

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

Post #31by t00fri » 24.01.2006, 21:31

ElChristou wrote:
t00fri wrote:...Sorry, if I have to repeat myself: you have got to normalize your galaxy template brightness to a maximum value of 1.0 by whatever software you prefer. Then the display should be about right also "inside". The code simply assumes properly normalized templates...

Yes... unfortunatly if you recall my test with "multi layers" of points, once normalized, we lose the benefit of some bright parts, very similar to what can be seen in various photos... IMHO, the use of the actual bmp2pts won't allow some perfect nice templates...


Bye definition, templates are NEVER perfect. Life is a compromise ;-) . Nevertheless, my templates might not be perfect, but they are properly normalized, and do have a bright center. The crucial point is that the templates are not even MEANT to be perfect ;-) . They can never be for rendering 10000+ galaxies.

Bye Fridger

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

Post #32by ElChristou » 25.01.2006, 01:44

t00fri wrote:Bye definition, templates are NEVER perfect. Life is a compromise ;-) . Nevertheless, my templates might not be perfect, but they are properly normalized, and do have a bright center. The crucial point is that the templates are not even MEANT to be perfect ;-) . They can never be for rendering 10000+ galaxies.


By perfect, I mean to give the same feeling of complexity and size that can be seen in whatever photo of a galaxy. I know it can't be possible but some of my tries are giving a not so bad effect, this without talking of normalization nor direction of the template. Unfortunaly I haven't be able to do better because of the limitation of the actual system.

My first goal was to do a first set of very generic templates (quite monotone indeed but with the exact caracteristics of each types). Now the ideal would be to have several version of each templates, let's say for example 5 differents SBc; then via one of your PERL script, generate the catalogue in which all the SBc galaxies "choose" randomly one of the 5 disponible templates (this to avoid a bit the "d?©j?  vue" sensation). Later create some customized templates for the well known galaxies, those ones would be uniques...

The problem of the brightness (and so of the normalization) depend on how the user is watching the galaxies: traveling to them or staying near earth and using a very dim fov make a big difference.
If you watch a galaxy staying near earth, all is fine. If you go to this same galaxy it will become quite dull, ternish; here you have to increase the brightness to recover the same effect;
If you do a template very nice when seen at close distance without changing the brightness it will become overbright when seen from earth... it's hard to find the good balance...
Image

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #33by Vincent » 25.01.2006, 09:55

Then, why not having 2 .pts models for the Milky Way ? A brighter one for an observation from oustide, and a faintest one for a near earth observation... Celestia would switch between these 2 templates at a defined distance from the galaxy center...
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #34by t00fri » 25.01.2006, 10:15

ElChristou wrote:
t00fri wrote:...
The problem of the brightness (and so of the normalization) depend on how the user is watching the galaxies: traveling to them or staying near earth and using a very dim fov make a big difference.
If you watch a galaxy staying near earth, all is fine. If you go to this same galaxy it will become quite dull, ternish; here you have to increase the brightness to recover the same effect;
If you do a template very nice when seen at close distance without changing the brightness it will become overbright when seen from earth... it's hard to find the good balance...


ElChristou,

part of the complexity in my Celestia galaxy code was to precisely account for inside/outside differences, fov dependence, brightness compensation as function of viewing angles etc., PROVIDED the galaxy brightness is properly normalized! You probably know little about all these previsions/corrections that are present in the code.

It just so happended that your layer overlay technique for the templates --despite its advantages-- ended up with a brightness profile after normalization that turned out too "flat" from the center to the galaxiy's periphery. My original (single layer) template designs were inferior to yours as to the geometrical form, but the brightness profiles were far better. Since I knew that this is a crucial display aspect, I had taken care to get it about right from the onset.

We both are aware that mass rendering of galaxies is a tough task in many respects. That's why it cost us half a year of hard work ;-) to get it to a quite acceptable overall performance...

Bye Fridger

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

Post #35by ElChristou » 25.01.2006, 11:34

t00fri wrote:You probably know little about all these previsions/corrections that are present in the code.

I don't know little about this, I know nothing apart what I can see on screen, so yes I can guess there is quite some work to respect the brightness depending on the situation of the observer and without doubt I respect this work entirely.

t00fri wrote:It just so happended that your layer overlay technique for the templates --despite its advantages-- ended up with a brightness profile after normalization that turned out too "flat" from the center to the galaxiy's periphery. My original (single layer) template designs were inferior to yours as to the geometrical form, but the brightness profiles were far better. Since I knew that this is a crucial display aspect, I had taken care to get it about right from the onset.


Precisely it's why I won't spend much time working on those templates with the actual tool; IMHO with the actual state a big step has been done, there is nothing to say about this, but one can feel things can be better (it's why many people have reacted about templates). My only hope is that Chris's technic of cmod points permit the creation of a more flexible tool.
Image

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #36by Vincent » 25.01.2006, 12:01

t00fri wrote:My original (single layer) template designs were inferior to yours as to the geometrical form, but the brightness profiles were far better.

Why can't we have both ? I know you've worked quite a lot to make the SBc.pts template have a very well balanced brightness. Then, we (you...) could get the same result, using your 'savoir-faire', from a template based on the M109 picture, couldn't we (you) ? :wink:
Please, don't answer me to try by myself :cry: :wink:. I know that's what you're gonna answer anyway... :wink:
Last edited by Vincent on 25.01.2006, 13:05, edited 1 time in total.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #37by t00fri » 25.01.2006, 13:04

ElChristou wrote:
Precisely it's why I won't spend much time working on those templates with the actual tool; IMHO with the actual state a big step has been done, there is nothing to say about this, but one can feel things can be better (it's why many people have reacted about templates). My only hope is that Chris's technic of cmod points permit the creation of a more flexible tool.


I think instead of 'cmod points' you rather mean "point sprites". That's precisely what we have been using in FT1.x and Chris is now trying to exploit these also for stars etc ;-) . Just to get things in order ...

Also as to "many people's reaction" I think YES there has been a LOT of very POSITIVE reactions to the present state of the art when FT1.x was released. It was essentially Cham you kept "shouting" about our Milky Way and other galaxies using the SBc template. It's really a bit better as you put it now. Don't forget we are rendering 10000 galaxies with a /hand full/ of templates. The whole approach is also NOT conceived for looking at galaxies from /close distance/. We obviously cannot afford to spend the same amount of time on a /single/ galaxy that you put into your Atlantis model ;-) ...

Bye Fridger

buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Post #38by buggs_moran » 25.01.2006, 14:42

t00fri wrote:
We obviously cannot afford to spend the same amount of time on a /single/ galaxy that you put into your Atlantis model ;-) ...

Bye Fridger


I personally love the galaxies. However this /single/ galaxy, as you put it Fridger, is kind of special, no? (a galactocentric opinion :wink:) I think this added effort for the MW is warranted and worth every minute. This is especially true from the educational perspective for Celestia (because we're shooting for semblance of reality). Thank you all for your hard work on MW.
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M

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

Post #39by ElChristou » 25.01.2006, 15:30

t00fri wrote:I think instead of 'cmod points' you rather mean "point sprites". That's precisely what we have been using in FT1.x and Chris is now trying to exploit these also for stars etc ;-) . Just to get things in order ...

I'm refering to this (about an eventual new tool):

Toti wrote:Recently Chris Laurel wrote that he wants to add a new billboard primitive to CMOD files. This would be ideal and would allow for the kind of extensibility-flexibility-performance I am looking for.

t00fri wrote:Also as to "many people's reaction" I think YES there has been a LOT of very POSITIVE reactions to the present state of the art when FT1.x was released. It was essentially Cham you kept "shouting" about our Milky Way and other galaxies using the SBc template. It's really a bit better as you put it now.

I'm not referring in positive or negative reactions, just in the fact that people with enough interest in this topic have tryied to modify the templates, which is normal I think.

t00fri wrote:...The whole approach is also NOT conceived for looking at galaxies from /close distance/...

This is the key of the problem and perhaps this hasn't been said enough...

t00fri wrote:...We obviously cannot afford to spend the same amount of time on a /single/ galaxy that you put into your Atlantis model ;-) ...


Here I desagree, IMO the galaxies models are much more inportant than whatever model; whith better tools I'm ready to spend the necessary time to have nice "perfect" (:wink:) galaxies from whatever point of view and distance...
Image

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

Post #40by t00fri » 25.01.2006, 17:13

ElChristou wrote:
t00fri wrote:...We obviously cannot afford to spend the same amount of time on a /single/ galaxy that you put into your Atlantis model ;-) ...

Here I desagree, IMO the galaxies models are much more inportant than whatever model; whith better tools I'm ready to spend the necessary time to have nice "perfect" (:wink:) galaxies from whatever point of view and distance...


This last remark of mine you misunderstood ;-) . Once more: given the task of rendering 10000+ galaxies, we cannot spend the time on /every single one/ of them that you spent to do Atlantis.


Bye Fridger
Last edited by t00fri on 25.01.2006, 17:17, edited 1 time in total.


Return to “Add-on development”