Add-on Announcement: Fudge!

Post requests, images, descriptions and reports about work in progress here.
Topic author
Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 23 years 1 month
Location: Darmstadt, Germany.

Add-on Announcement: Fudge!

Post #1by Spaceman Spiff » 24.07.2004, 19:25

Greetings Cel Users,

I'm pleased to announce my first add-on donation to Celestia users. However, it turns out not to work in Cel1.3.2pre10, though it does in Cel1.3.2pre8. I've done several regression tests installing/uninstalling pre8 and pre10 to check. Perhaps someone one would care to confirm this, before I rush off to the Bugs forum?

The Add-on has made it to the Celestia Motherlode: http://celestiamotherlode.net/creators/spiff. It's my only one so far: Fudge.zip (64kB). Download and extract the .zip file to 'extras' as usual, it'll appear in folder Fudge 2.

What is it? well, I wanted it to be a surprise when you visit it, but to find it:

1. The .stc file creates a star for this system. Use the Star Browser to find it...
2. Select 'With planets' to help filter it.
3. You're looking for an entry that says "44 Bo? A Fudge" at 41.615 light years away from Sol, after ZET2 Ret and RHO1 Cnc. This Fudge is created slighty away from the actual 44 Bo? (also known as i Bo?) in the Hipparcos catalogue. This system is for show only, it's not scientifically accurate!

Astronomy experts may guess what's special about 44 Bo? A: once you arrive, close in on the stars, speed time up to ?1000. Then, when you're bored with that, put time to normal, make sure eclipse shadows are on, and use the Solar System Browser to head for Fudge 1.0. Once there, speed time up to ?1000 again to see what happens. Replace the grid textures with your favourites in the .scc if you want. Mine are Tatooine and Endor-with-clouds.

If anyone does get this working in pre10, please let me know! :cry: (sniff!)

Spiff.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 7 months
Location: NY, USA

Post #2by selden » 25.07.2004, 00:48

Threre's a bug in pre10 related to Mass declarations.
Commenting those out should fix your problem, I think.
Selden

Topic author
Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 23 years 1 month
Location: Darmstadt, Germany.

Post #3by Spaceman Spiff » 25.07.2004, 09:22

Hello Selden,

thanks for the tip! Actually, I found it's due to the CustomOrbit lines. People need comment out these lines for pre10, it works as is in pre8. Anyone trying this can do a Find/Replace of

Code: Select all

  CustomOrbit

with

Code: Select all

# CustomOrbit

in Fudge.ssc.

Apols for the faff-around. In retrospect, it is a good idea to comment out the Mass lines too, because I understand they're unused by Celestia and these could become physically inconsistent in a future version: the stars are massed in solar masses, the planets are massed in Earth masses.

So, you haven't tried the add-on yet, Selden? :wink:

Spiff.

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 7 months
Location: Germany

Post #4by Harry » 25.07.2004, 11:30

That was my fault, the new Add/Replace/Modify code gave up on finding a valid orbit when encountering an invalid CustomOrbit. I've just checked in a fix, so 1.3.2 should be back to the old behaviour.

But I am a bit surprised to find (invalid) CustomOrbits in some Addons. Is this just due to copy&paste, or is it on purpose?

Harald

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 7 months
Location: NY, USA

Post #5by selden » 25.07.2004, 11:36

Spaceman Spiff,

I tried it briefly and found that there seem to be several things about it that refuse to work on my system but don't generate error messages :(

Some of them seem to be related to the "?" (o umlaut) that's used in many places, but there seem to be other problems, too, and I just don't have the time to track them all down.

Sorry.
Selden

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 7 months
Location: NY, USA

Post #6by selden » 25.07.2004, 11:42

Harald,

The use of CustomOrbit by Addon authors, as in Fudge, usually seems to be due to to confusion. People see it being used everywhere in solarsys.ssc and apparently conclude that it should be used in all SSC files although they don't know what it's supposed to do. :(
Selden

Topic author
Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 23 years 1 month
Location: Darmstadt, Germany.

Post #7by Spaceman Spiff » 25.07.2004, 13:48

Hallo Harry, Hello Selden,

My inclusion of "CustomOrbit" wasn't 'deliberate', I let it be inherited from copy&paste. It wasn't clear to me what its significance was, so I left it in. In pre8, it was harmless. In the time between submitting my add-on to the Motherlode and getting a link, pre10 turned up...

Well, I seem to have produced an add-on that's serving to test and maybe debug Celestia instead, but no one is getting to see what it is! Oops!

I included the umlauted 'o' following the correct spelling for Bo?tes. Living in Germany, I'm rather sensitive to umlauts being left out of Bo?tes :). My Celestia will write out the ? correctly in the Star Browser list, but misses it out in the HUD top right text:

Code: Select all

44 Bo? A Fudge <- 44 BoA Fudge

with the space after the ? also disappearing. I realise this is because the fonts don't cover all European letters, but I quietly hoped it would help test for when this capability appears in Celestia. I would have thought other peoples Celestia would do the same. Otherwise, the missing ? doesn't bother my Celestia. I expect it's other things in there that your Celestia isn't happy with, Selden.

Maybe it is I who should apologise for the disappointment...

Spiff.

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 7 months
Location: Germany

Post #8by Harry » 25.07.2004, 14:34

Hi,

some recommendations:
- get rid of the umlauts in the filenames, just to be sure.
(maybe get rid of the empty directories too, just to clean up)
- please watch out when using uppercase in filenames, some system are case-sensitive (however your addon is fine)
- if you want to use "?", you have to use UTF-8. Open your files, then choose UTF-8 (maybe Unicode) as encoding, and save them again. Details differ depending on editor, IIRC even notepad can do that. Make sure to use UTF-8 when opening such files, otherwise the umlauts will look strange.

Harald

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

Post #9by maxim » 25.07.2004, 15:27

What exactly are the special things we should see with this addon??
I can't watch anything real surprising. Maybe I'm blind.

maxim

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 7 months
Location: NY, USA

Post #10by selden » 25.07.2004, 15:40

Maxim,

It's an attempt to model the triple-star system 44 Bo?. Components B and C are what are known as a "contact binary". They share photospheres but have separate cores.

Celestia seems to be refusing to draw it.
Selden

Topic author
Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 23 years 1 month
Location: Darmstadt, Germany.

Post #11by Spaceman Spiff » 25.07.2004, 15:49

Harry wrote:- if you want to use "?", you have to use UTF-8.

Well, no, I found out some time back in March with Selden that that kills the add-ons: http://www.celestiaproject.net/forum/viewtopic.php?t=3831#32989. They have to be saved as ASCII text, not unicode, to work. I just tried saving my .stc and .ssc as Unicode/UTF-8, one by one and then both together, and each conversion makes the add-on disappear.

I won't be able to check if removing umlauted chars from ASCII text makes it work, as it already does for me.

Maxim wrote:What exactly are the special things we should see with this addon??
I can't watch anything real surprising. Maybe I'm blind.


Maybe you're not blind: it seems my add-on isn't so transportable as I'd have hoped. If you see just a single, round star and there's no planets in the Solar System Browser, you probably have pre10 objecting to my mistaken inclusion of "CustomOrbit". Please comment those out.

Otherwise: Correct Selden! One of the 44 Bo? stars is a contact binary. It's my best attempt at a binary star system.

I'll await news from anyone else... Or maybe I'll just have to leave the forum in disgrace!

Spiff.

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

Post #12by maxim » 25.07.2004, 16:40

(Not at my home console):

What I remember to see is an egg shaped star, orbited by another star(-planet) that switches texture (the sunspot becomes a bit brighter) and z-buffer position every half orbit. And a binary planet that rotates around a common center, casting simple shadows on each other.

Maybe I'm just not enough of an astronomical insider :wink:

maxim

Topic author
Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 23 years 1 month
Location: Darmstadt, Germany.

Post #13by Spaceman Spiff » 25.07.2004, 16:59

Maxim, yes! That's It! The egg-shapes demonstrate an approximation to Roche lobes. The trick is keeping the egg-shapes aligned to each other. Ah well, I thought there'd be a bit more of a fanfare about it, considering how technically difficult it is to bash Celestia into doing this...

Yes, there are some 'artefacts'. There's no texture switching: the starspot brightens/dims because each star moves in front of and behind the flare.jpg plane. The z-buffering seems to be applied in bulk to objects, but I'm not surprised as getting this 'right' would be very computationally daunting.

Maybe I'm just too much of an astronomical insider... :wink:

Spiff.

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 7 months
Location: Germany

Post #14by Harry » 25.07.2004, 17:30

Spaceman Spiff wrote:
Harry wrote:- if you want to use "?", you have to use UTF-8.

Well, no, I found out some time back in March with Selden that that kills the add-ons:

Well, no, it doesn't kill addons. I can only speculate what went wrong for you, maybe Notepad is writing native Unicode instead of UTF-8, or adding an Endian specifier, or whatever.

Anyway, try this one:
http://www.h-schmidt.net/celestia/Fudge-modified.zip

It has Umlaute, and no CustomOrbits, so should work in pre10 too.

Harald

P.S: If you need that file, please copy it, I won't leave it on my site for long. If you want it on celestiamotherlode, tell me, I can do that for you.

Topic author
Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 23 years 1 month
Location: Darmstadt, Germany.

Post #15by Spaceman Spiff » 25.07.2004, 19:34

Hallo Harry,

yes, please transfer it to Motherlode, as it will work on pre10 without "CustomOrbit", regardless of the unicode issue.

On the unicode issue, Harry, your zipped fudge files worked, though when opened them the ? had been changed to ?¶. Now, I 'associate' .ssc and .stc files with Wordpad (looks nicerer than Notepad). When I open them with Notepad, the ? appears instead. Notepad appears to behave better than Wordpad, it also gives more control over Save As... choices. The unicode really does kill add-ons. I think this is the same problem SloJoe had then.

Also, in Celestia, the Star Browser writes the ?¶ explicitely, but the HUD writes ? OK. So, I went back to testing like back in March. I kept the .stc file working so 44 Bo* Fudge always exists, but changed the encoding of the .scc file, and went to look for planets. Results:

Code: Select all

                                             Opened With ...             Worked in pre10?

                                Notepad   Wordpad   Netscape   Mozilla
                                                      Nav      Firefox

            Notepad    ANSI       ?         ?         ?          ?       Yup!
             "       Bigend       ?      Chinese      ?          ?       Nope!
Saved        "       Lilend       ?         ?         ?          ?       Nope!
With/        "        UTF-8       ?         ?         ?¶         ?       Nope!
As...
            Wordpad     TXT       ?         ?¶        ?¶        ?¶       Yup!
             "      Unicode       ?         ?         ?         ?        Nope!

       Harry's zipped Fudge       ?         ?¶        ?¶        ?¶       Yup!


In other words, as I wrote in March, I cannot save files as unicode. They must be saved as ANSI. Also, it looks like your zipped file was saved as ANSI (TXT) in Wordpad, but the thing that makes the ? work is writing "?¶" in the editor!

OS is Win2K.

Harry, thanks for your help! Ich bedanke mich!

Spiff.

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 7 months
Location: Germany

Post #16by Harry » 25.07.2004, 20:54

Spaceman Spiff wrote:On the unicode issue, Harry, your zipped fudge files worked, though when opened them the ? had been changed to ?¶.
That's just the point: this is what an "?" looks like in UTF-8 if the editor doesn't understand UTF-8.
... When I open them with Notepad, the ? appears instead.
I guess it recognizes the file as UTF-8, and opens it correctly.
The unicode really does kill add-ons.
Not unicode is killing them, bad editors or wrong settings kill them...
Also, in Celestia, the Star Browser writes the ?¶ explicitely, but the HUD writes ? OK
Seems the UTF-8 support still needs more work...

So, I went back to testing like back in March. I kept the .stc file working so 44 Bo* Fudge always exists, but changed the encoding of the .scc file, and went to look for planets. Results: [...]
It seems that Notepad doesn't save the file as simple UTF-8, I don't know what the problem is. But saving with Wordpad as "TXT" seemed to do the trick, as you get the UTF-8 encoding of ? displayed in Wordpad/Navigator/Firefox.

In other words, as I wrote in March, I cannot save files as unicode. They must be saved as ANSI. Also, it looks like your zipped file was saved as ANSI (TXT) in Wordpad, but the thing that makes the ? work is writing "?¶" in the editor!

Maybe a more advanced editor (i.e. with better control of the output) would help handling these files...

Harald

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

Post #17by maxim » 28.07.2004, 18:54

It wouldn't be a bad thing if (advanced) addons would come with an explaining cel-script, so that everyone could get educated what's going on. I mean, it's like doing a tourist tour in a famous location - you won't watch anything if the guide wouldn't explain everything to you.

maxim

Avatar
piellepi M
Posts: 124
Joined: 25.09.2003
Age: 69
With us: 21 years 6 months
Location: Rome, Italy

Post #18by piellepi » 29.07.2004, 08:50

Hi!
I agree with Maxim! :D If you are not guided, you surely miss something!

IMHO I would suggest not to use "strange" characters in file names involved in add-ons: while filenames are correctly handled in explorer or some programs, other programs show strange characters.
I changed the "umlaut o" to a simple "o" either in ssc files or in filenames and everything is correct! 8)
Here in Italy we do use letters like "?", "?" and so on, but as a rule of thumb I use them only in my docs and preferably NOT in file names: perhaps this is because I remember the troubles we had in ancient DOS times when you could only use simple letters (no spaces at all!). :? :?
Bye
Pierluigi

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 7 months

Post #19by danielj » 01.08.2004, 23:41

I change the texture to the Rassilon?s gstar.jpg and a weird thing happened.The C component change the hue of your yellow as it spin the A component,i.e,in some places of the orbit,the star became a lighter yellow.Does this really happens with contact binaries,or is simply a bug?


Return to “Add-on development”