Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Marcov on June 13, 2010, 06:37:47 am

Title: How to use a .jpg file for a background?
Post by: Marcov on June 13, 2010, 06:37:47 am
Is this possible? For example I just want to use some random pic and make it a FreeSpace background?

How am I supposed to turn it to .pof?

Just too lazy to research  :P.
Title: Re: How to use a .jpg file for a background?
Post by: Dragon on June 13, 2010, 06:46:27 am
A background bitmap, interface background, or skybox texture?
Title: Re: How to use a .jpg file for a background?
Post by: Jeff Vader on June 13, 2010, 07:31:59 am
use some random pic ... background?

...turn it to .pof?
You can probably turn a .jpg into a .pof much in the same way you turn a .jpg into an .mp3.

Just too lazy to research  :P.
What if people respond that they're too lazy to give an answer?
Title: Re: How to use a .jpg file for a background?
Post by: The E on June 13, 2010, 07:44:46 am
Start here: http://www.hard-light.net/wiki/index.php/Portal:Modding
Title: Re: How to use a .jpg file for a background?
Post by: Marcov on June 13, 2010, 09:34:40 am
A background bitmap, interface background, or skybox texture?

Any, but I'm thinking background. What if I wanted to use a pic of the Lucifer as a background?

What if I wanted to fight in a city environment?

Can I do any of these using just normal pics? If so, how?
Title: Re: How to use a .jpg file for a background?
Post by: Rodo on June 13, 2010, 09:53:48 am
There's a difference between background bitmaps and skyboxes, here's the deal:

background bitmaps (just like nebulae) are used to cover a small portion of the sky/ambient, the bigger the portion of the ambient you want to cover, the more distortion you'll get from the image.

skyboxes are made to fill the entire sky/ambient using a model and various textures, normally if those are made correctly no distortion will be noticeable, but... as you can imagine, making a skybox is way harder than making a background bitmap.

What if I wanted to use a pic of the Lucifer as a background?

Probably a background bitmap will be the best choice.

What if I wanted to fight in a city environment?

This one might need a skybox.

Can I do any of these using just normal pics? If so, how?

Not really, background bitmaps tend to be an image onto an invisible layer, so any kind of image you get from real life will not work, it will require for you to add that "invisible layer".
For skyboxes, you can try loading a 360° view onto some skybox model, but the 6 images and the model will also require additional tweeking, it's kinda hard to explain all at once.

I would suggest you to do what I did the first time:

Open one of the vp's and extract some of the nebula images, then check those out in gimp or photoshop.. whatever you use, you'll get the idea about how a background bitmap should look like with that.

For the skybox you can try checking the starfield.pof file and it's textures... though I would suggest to go first over the background bitmaps, they are easier to understand, and require fewer programs to edit those.

Also...check the wiki, there you'll find instructions on how to make skyboxes and background bitmaps as well IIRC.
Title: Re: How to use a .jpg file for a background?
Post by: Getter Robo G on June 13, 2010, 12:07:27 pm
You can probably turn a .jpg into a .pof much in the same way you turn a .jpg into an .mp3.

Oh God that's good!

 :lol:
Title: Re: How to use a .jpg file for a background?
Post by: Scourge of Ages on June 13, 2010, 03:12:41 pm
All these changes happen in your mission/mod folder, NOT the root data folder.

Put your .jpg in your /data/effects folder.
Then, extract to data/tables stars.tbl and add a line somewhere that says $Bitmap: yourimagename (where yourimagename is the name of your image, without the extension).
Then, open FRED, making sure that it's using your mod. In the background editor you should be able to add your image the same way that you would a nebula.

Check the wiki for various details that you'll need to know if you want it to be transparant/not transparant, square edges/no square edges, etc.
Title: Re: How to use a .jpg file for a background?
Post by: Herra Tohtori on June 13, 2010, 03:19:36 pm
Quote from: The GIMP Thread (http://www.hard-light.net/forums/index.php?topic=69905)
FS2_Open can use the following image formats:

(...)

*JPG (technically)
 -Don't ask me why this format is supported. It's lossy compression-wise and uses the same amount of memory as uncompressed TGA, so there is no advantage whatsoever in using it.
 -If you use this for FS2_Open, Admiral Petrarch is going to demote you to a freighter pilot. Seriously, don't use this.


If your source image is in JPG format, you should save it as DDS for use in FS2_Open.

As to how to use it, depends on what exactly you want to do with it... background bitmaps are assigned with stars.tbl and modular table named filename-str.tbm, and then you can select the background in FRED2's background editor.
Title: Re: How to use a .jpg file for a background?
Post by: Marcov on June 14, 2010, 03:55:46 am
Where are the background images located (in which .vp)?

Also, where can I find background topics in FSwiki?
Title: Re: How to use a .jpg file for a background?
Post by: Herra Tohtori on June 14, 2010, 05:20:55 am
Where are the background images located (in which .vp)?

There must be limits to what we are willing to feed you readily chewed.

Why don't you look for yourself?

Quote
Also, where can I find background topics in FSwiki?

It would be logical to start from here:

http://www.hard-light.net/wiki/index.php/Backgrounds (http://www.hard-light.net/wiki/index.php/Backgrounds)
Title: Re: How to use a .jpg file for a background?
Post by: captain-custard on June 14, 2010, 05:41:31 am
clicks on the link for Marcov..... :D