Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: bomb3rman on January 03, 2017, 02:33:48 am
-
Hi. Is there a tutorial somewhere where I can learn to integrate my "own" planets as a jpeg/bmp into the game to have them as backgrounds? I'd need the planets of the solar system for my missions :)
-
Hello, you can use a tbm file to add the list of desired bitmaps to add in the form of yourname-str.tbm
Inside the file put these lines:
;======>======>======>======>>BACKGROUND IMAGES<<=======<=======<=======<=======
$BitmapX: bitmap name no extension)
#end
You can add more lines if you need of course.
Then inside your effect folder you can put your bitmaps here, they will now appear in FRED.
Edit: if it's for image editing, I'm not very good at it but when I needed new planets I downloaded them from the net then edited in photoshop (save as *.tga and added alpha layer for transparency).
-
The complete documentation of stars.tbl the -str.tbm can be found here (http://www.hard-light.net/wiki/index.php/Stars.tbl).
When it comes to file formats, the best format to use for these graphics is png. Other formats are basically not relevant to this, and while you can use jpgs or tgas, they are both inferior to png in all aspects (jpg because of its inherent lossiness, tga because of the filesizes that a decent looking planet requires).
-
1: Prepare your planet: I recommend your bitmaps to be at least 1024x1024 pixels large. I prefer 2048x2048 for better quality. At least, planets are cool! Nobody wants to see them blurry :P.
2: Cut off everything, but the planet. No black background or anything but planet. Background should be alpha.
3: No jpg and bmps! Why? No transparency, huge file sizes [bmp] or crappy quality [jpeg]... Instead, get familiar with some better file format like .dds or .png. I prefer the first one. GIMP has .dds plugin, but I personally recommend Paint.NET. Save your planets in DXT5 format of DDS file... Or png.
4: Place file of your planet in data/effects table.
5: Create table. Create file in notepad and name it "whatever-str" and change file extension to ".tbm". Name of the file doesn't matter as long as it has "-tbm" at the end.
6: Make table! Krevett62 already posted entry example, but instead of $BitmapX: use $Bitmap:. Your bitmap already have alpha channel so engine know what to do with it. If you use BitmapX, you may encounter stars on darkened side of your planet, as BitmapX makes black transparent.
-
Hey thank you all for your feedback!
I will try it now and report back if there are more problems :)
-
One more question: When I "cut" the planet out of the original picture, it works and appears in FRED as intented.
But there's always a small "line" on the side. Don't know how to describe it well. Like some points are brighter than the black background. Is there a good way to avoid this?
-
One more question: When I "cut" the planet out of the original picture, it works and appears in FRED as intented.
But there's always a small "line" on the side. Don't know how to describe it well. Like some points are brighter than the black background. Is there a good way to avoid this?
Show meh... [on screenshot :P]
-
Sounds like the background isn't a pure black (RGB 0,0,0) color. I've run into this a bunch of times with certain textures in the Unreal engine. Cleaning them up in Photoshop is usually pretty easy once you know which ones need the treatment, though.
-
The part within the red line is what I'm talking about. Hope you see what I see :)
[attachment deleted by admin]
-
OK that makes more sense than black levels being off, which I figured wouldn't really be a thing with a proper alpha channel.
That looks more like blending needs some work, but shouldn't be hard to fix. You can probably just paint over it with a black/eraser brush with very low opacity, making several passes until you manage to fade it out.
-
Thanks for the hint, I'll try that :)