Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: PotzUK on June 14, 2006, 03:36:30 pm

Title: Custom backgrounds?
Post by: PotzUK on June 14, 2006, 03:36:30 pm
Hi guys,

After playing a few of the great campaigns, I thought I'd get back into Fred a little, but it's been so long and I barely scratched the surface before. :) 

I'm an amatuer astronomer and I'd love to be able to use a few of my images as backgrounds to a few missions, just to add a little realism to the background.  Do I need to save my backgrounds as .tga files and put them in \data\effects or somesuch for FRED to pick them up?

Cheers :)
Title: Re: Custom backgrounds?
Post by: karajorma on June 14, 2006, 04:24:18 pm
Basically yes. But you also need to edit the Stars.tbl so that it knows about them too.

I'll leave a more detailed explaination to someone who has actually done it :)
Title: Re: Custom backgrounds?
Post by: Axem on June 14, 2006, 06:46:09 pm
I'd use a modular table so it won't conflict with anything. A stars modular table is very basic. Just open up a text editor and use this template.

Code: [Select]
BitmapX: <1st image name>
BitmapX: <2nd image name>
...
BitmapX: <last image name>
#end

And its name should be something like spiffyname-str.tbm. And then that would go into /data/tables.
Title: Re: Custom backgrounds?
Post by: PotzUK on June 15, 2006, 02:34:12 am
Thanks guys :)

Where do the images themselves go? Going by the table do they have to be BMP files?  The SCP seems to have an option to allow JPG/TGA textures   :sigh:
Title: Re: Custom backgrounds?
Post by: karajorma on June 15, 2006, 02:43:37 am
They don't have to be BMPs (In fact they won't work if they are). TGA is actually not as good a choice as DDS. Although you'll need someone who knows the format to tell you which kind you should be using for background graphics.
Title: Re: Custom backgrounds?
Post by: PotzUK on June 15, 2006, 02:51:42 am
Ok

I just tried it with a standard jpg and it doesn't appear in the list of backgrounds in fred.  Looks like this is a tad more complicated than I had hoped   :blah:
Title: Re: Custom backgrounds?
Post by: aldo_14 on June 15, 2006, 03:18:37 am
Try TGA / DDS (DDS is better in terms of filesize and memory use).  I'm not sure I've seen anyone use JPG before, actually, so it could have broken without being caught.
Title: Re: Custom backgrounds?
Post by: PotzUK on July 14, 2006, 07:15:59 am
I'm stilling having problems here.

I've created the table file, made a .tga file, slapped into /data/effects etc .  But the background editor in FRED seems none-the-wiser?
Title: Re: Custom backgrounds?
Post by: Colonol Dekker on July 14, 2006, 07:21:14 am
Would a skybox be an easier option for astronomic corellation? :yes:
Title: Re: Custom backgrounds?
Post by: PotzUK on July 14, 2006, 07:38:35 am
bah :P

I'm getting a little closer now... I've realised that putting my 'mod' name into FRED2's shortcut (fred2.exe -mod tony) as I have the files in /freespace2/tony/..... helped(!) but despite this my image doesn't appear in the pulldown list in fred2.  In fact, I now have 2 of everything!

The file is test.pcx (i've tried TGA, I dont have a clue what DDS is...) Are there any set requirements?  image dimensions, file size, colour depth etc?
Title: Re: Custom backgrounds?
Post by: PotzUK on July 14, 2006, 07:59:47 am
Would a skybox be an easier option for astronomic corellation? :yes:

I'm a fool - I was rooting in Fred and found a tickbox labelled skybox.  i thought you were being sarcastic somehow  :lol:  Unfortunately I don't have the necessary software :(
Title: Re: Custom backgrounds?
Post by: PotzUK on July 14, 2006, 08:56:02 am
OK, I've had some luck here...

If I copy the normal stars.tbl file and put that into my 'mod' folder, and add my background image to it, it appears in the list in FRED2 (hurrah).  If I select it and add it however, I get a standard nebula whisp!

 :sigh:
Title: Re: Custom backgrounds?
Post by: PotzUK on July 14, 2006, 10:55:26 am
Figured it, you have to add it, then change it to what you want (go figure).

The problem now though is the texture shows in FRED's background, but not in game??
Title: Re: Custom backgrounds?
Post by: Colonol Dekker on July 14, 2006, 10:59:57 am
LOL, so simple, yet we all overlooked it. Sorry man FrED2 is a bit particular about that, you always "ADD" first then manipulate.
Title: Re: Custom backgrounds?
Post by: karajorma on July 14, 2006, 11:00:29 am
Are you correctly picking your mod in the launcher for Freespace?

Are you getting no nebula at all or are you getting a different one?
Title: Re: Custom backgrounds?
Post by: PotzUK on July 14, 2006, 11:16:52 am
Yer, running Freespace with the -mod tony (tonys the mod name, for now as I'm still experimenting).  There's nothing there at all :(

FRED has put this into the FS2 file:

Code: [Select]
#Background bitmaps ;! 1 total

$Num stars: 500
$Ambient light level: 0
$Sun: SunBlue
+Angles: 0.000000 0.000000 1.047197
+Scale: 4.000000
$Starbitmap: protostar
+Angles: 0.157080 0.157080 0.000000
+ScaleX: 3.000000
+ScaleY: 3.000000
+DivX: 1
+DivY: 1

I've tried two builds of FRED, and I'm using FS2 3.6.9 RC3

Thanks Kara
Title: Re: Custom backgrounds?
Post by: PotzUK on July 14, 2006, 11:36:47 am
augh - I feel so silly now... so many questions and I manage to solve them within 20 minutes of posting.

I had two copies of the image in the effects folder, a pcx and a tga.  The PCX works OK, but the TGA does not.  I can live with that :)

I'll just have to run with PCX and a complete stars.tbl file