Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: wistler on June 15, 2009, 05:37:55 pm

Title: What are Nebula Data Files?
Post by: wistler on June 15, 2009, 05:37:55 pm
Does anyone know what the nebula data files are in the effect directory of Sparky_fs2 are and what it is they do exactly? just out of curiosity.
Title: Re: What are Nebula Data Files?
Post by: Aardwolf on June 16, 2009, 12:08:53 am
I think those are the FS1 nebulas. They don't work any more, but I think I read somewhere that the original source release included code for an editor of some sort.
Title: Re: What are Nebula Data Files?
Post by: portej05 on June 16, 2009, 07:03:25 am
As far as I can tell, they're used in
load_nebula_sub in neb.cpp line 221

which is called from nebula_init
which is called from parse_bitmaps

which is actually called. I haven't traced the actual execution though.

Anyone know?
Title: Re: What are Nebula Data Files?
Post by: Aardwolf on June 16, 2009, 05:27:31 pm
Earlier today I attempted to resurrect a defunct GTI-- I mean, resurrect a defunct :v: project included in the original source code release called "Nebedit". Unfortunately, I haven't been able to get it to build... yet.
Title: Re: What are Nebula Data Files?
Post by: wistler on June 16, 2009, 07:37:12 pm
I may as well ask here. I was playing around making my own nebula's and was wondering whether that green trick works in terms of nebula background. By green trick I mean making textures and logos a certain shade of green so that they turn transparent in game. I tried but didn't have much look and was wondering if anyone had a definitive answer on the subject.
Title: Re: What are Nebula Data Files?
Post by: Aardwolf on June 16, 2009, 08:51:03 pm
Nebulas don't work that way. Nebulas are drawn additively, i.e. the color you see is the sum of all the nebulas being drawn in that spot.

The game engine detects if the effect has an alpha channel. If it does, it draws it like a planet. If it doesn't, it draws it as a nebula. If, however, it's an indexed-color .pcx image, it will draw it opaquely but with (0, 255, 0) green as transparent.

But that's a different kind of nebulas.

Speaking of the .neb kind, I finally got Nebedit to build, but it doesn't seem to do anything and I can't exit it once it builds. I think it might be because I'm debugging, so I'll try turning that off, but if that's the case, there's no way to debug it...
Title: Re: What are Nebula Data Files?
Post by: FreeSpaceFreak on June 17, 2009, 01:08:21 am
Additionally,about 256-colour PCX images:
If you table them in the stars.tbl as $Bitmap: , FS will treat them as a nebula picture and just "overlay" them on the background; if you table them as $BitmapX: , FS will treat them as planets, with black fully opaque but the #00ff00 green transparent.