Question for Celestia Developers...

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Question for Celestia Developers...

Post #1by Rassilon » 01.02.2002, 04:03

If I were to import a 3ds model into Celestia and make it transparent...i.e like if I was going to add a nebula as mentioned earlier...How would I set up the material in MAX to achieve this. As in a previous thread, I had applied a texture to one of my modeled planets, and the diffusing wasn't correct. But when I deleted the material off the model...in essence, made a model WITHOUT any material application, and just applied a UVW modifier...the diffusing was correct.

So it seems that either the game does not contain the coding to support MAX texturing, or something...

What I should ask is what IS supported in the coding for models in Celestia...and how would I go about matching the softwares requirements on these options?

Thanks..
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!

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

Post #2by Rassilon » 02.02.2002, 05:06

I found this in the source code...

Code: Select all

class M3DMaterial
{
 public:
    M3DMaterial();

    std::string getName() const;
    void setName(std::string);
    M3DColor getAmbientColor() const;
    void setAmbientColor(M3DColor);
    M3DColor getDiffuseColor() const;
    void setDiffuseColor(M3DColor);
    M3DColor getSpecularColor() const;
    void setSpecularColor(M3DColor);
    float getShininess() const;
    void setShininess(float);
    std::string getTextureMap() const;
    void setTextureMap(const std::string&);

 private:
    std::string name;
    std::string texmap;
    M3DColor ambient;
    M3DColor diffuse;
    M3DColor specular;
    float shininess;
};


So it seems that materials ARE imported into celestia...but why are they set to a specific look? i.e. glossy without proper shading? I will look further...

Edit: I found this in the cpp file...which could explain this..

Code: Select all

M3DMaterial::M3DMaterial() :
    ambient(0, 0, 0),
    diffuse(0, 0, 0),
    specular(0, 0, 0),
    shininess(1.0f)


So if I were to modify these, would that change the look of models?
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!

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #3by chris » 05.02.2002, 00:06

Celestia does not yet extract transparency information when reading 3DS files. It's straightforward to fix this; however, a good implementation of transparent model rendering should make some effort to depth sort transparent polygons. Expect basic transparency support in the next version of Celestia, but probably without sorting.

--Chris

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

Post #4by Rassilon » 05.02.2002, 04:49

Are you saying that lowering the Opaque variable in the material editor will allow a form of transparency?

Also what about regular materials...why do they seem very glossy...and have that choppy look in the diffuse dept.

How can I fix this using Materials...or should I say what is the correct variable amounts put in Glossy Specular and what not...
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!

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #5by chris » 07.02.2002, 16:13

I'm saying that it will work in the next version of Celestia, but not right now.

If the materials appear glossy, it's probably because you have a specular color in the material. Try setting the specular color to black and it should eliminate the glossiness. The choppy look should go away when you set the specular color to black or, if you want proper looking glossy materials, set the shininess (possibly also called specular exponent) to something higher.

--Chris

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

Post #6by Rassilon » 07.02.2002, 23:19

OK thanks...I'll look into that...

By the way...when do you think your update will be completed chris? Can't wait to see what your adding ;)
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!

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #7by chris » 11.02.2002, 20:00

It will probably be another two weeks before the next release. It depends on how many new features I want to include per release--I'm basing the two week estimate on the time it would take to finish the eclipse shadows and high resolution texture support.

Also, I found a bug in how I was handling specular colors that may have been what was giving you problems, Rassilon. I've fixed it for the next release.

--Chris

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

Post #8by Rassilon » 12.02.2002, 04:01

Cool, you rule!...Also alot of those Star Trek modders and gamers are really liking your program as I posted a link to your site on the Star Trek Gaming Network and Armada Universe! I figure the more people see this great project, the more support you'll get to make a full blown application out of this! Maybe with support in true rendering of galactic star clusters...Nebulae, birth and death of stars when time loops! etc...You could really make a killing on this thing man. This software ROCKS!

Sometime in the future I plan on releasing the addons I created...but I think I will wait for your update...

Do you think it is possible to add ALL the stars in our galaxy? LOL that is steep! I bet that you would have to limit the stars on display...and cut out any rendering that is not visible. Adding that to the code would allow you to add ALL the galaxies...but seeing them from a distance might not look right with lack of stars rendered...might have to use a photographic sprite that somehow appears 3d according to perspective...Blending is another issue on that idea too...

Possibilities are as unlimited as our cosmos ;)
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!


Return to “Development”