The 1024x768 Project
Moderator: thunderchero
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
Oh now I get it. My bad
Thanks Peter.
Actually I'm just about to test the new WDFs, as I modified my wdf tool to resize the WDFs. I'm just extracting thunderchero's resized TGA's now. Fingers crossed. We could be finished the 1024x768 very soon.
And since the process is automated, we'll be able to perfectly resize all the mods too
Thanks Peter.
Actually I'm just about to test the new WDFs, as I modified my wdf tool to resize the WDFs. I'm just extracting thunderchero's resized TGA's now. Fingers crossed. We could be finished the 1024x768 very soon.
And since the process is automated, we'll be able to perfectly resize all the mods too
- Tethys
- Past Administrator
- Posts: 2404
- Joined: Fri Jul 18, 2008 2:00 am
- Location: Your mom's bed ;)
- Contact:
Re: The 1024x768 Project
Good luck, cant wait for the results!
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
Seems like it's not going to be as easy as I'd hoped. I've been getting lots of division by zero errors when using the new WDFs. I know I missed a few references to 800 and 600 in my first analysis so I'm searching for all occurrences now. Hopefully patching all the relevant constants in Trek.exe should fix things.
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
I've had no end of trouble trying to get this to work. Aside from the crashes, UE doesn't seem to like importing more than a few hundred files. I got some of the files to import, but there seems to be a problem with the TGAs' color transparency.
See the TGA's use a solid color as the transparent background. If you resample the images, the background color will change slightly, screwing up the transparency. I'll set up a script using ImageMagick to convert the images to 32-bit PNG with an alpha-channel. Then we can resample, and convert back to 16-bit TGA with magenta background.
I tried using 7zip on STBOF.RES, but then Trek.exe wouldn't run. Does anyone know of any programs known to work with STBOF.RES?
See the TGA's use a solid color as the transparent background. If you resample the images, the background color will change slightly, screwing up the transparency. I'll set up a script using ImageMagick to convert the images to 32-bit PNG with an alpha-channel. Then we can resample, and convert back to 16-bit TGA with magenta background.
I tried using 7zip on STBOF.RES, but then Trek.exe wouldn't run. Does anyone know of any programs known to work with STBOF.RES?
- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7949
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: The 1024x768 Project
winrar will work
thunderchero
thunderchero
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
Thanks, I got 7zip to work in the end. I had messed up stbof.res, so I started with the vanilla version again it's fine.
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
Good news, after many hurdles, I finally got this to work. I ended up patching 98 locations in Trek.exe, so I'll post a patchtool for that soon. I've also modified the wdftool to allow scaling of WDFs, but it's not quite perfect yet. Some things are not scaling, like the widths of the columns in the ListBoxes.
I'll get everything wrapped up soon so we'll have a first release ASAP.
There are still a few other things to look at. Peter1981 was right about the galaxy constants needing to be patched, the galaxy map doesn't fill up the area it should. Also, the fonts and GIFs are not resized yet, so they come out small.
I'll get everything wrapped up soon so we'll have a first release ASAP.
There are still a few other things to look at. Peter1981 was right about the galaxy constants needing to be patched, the galaxy map doesn't fill up the area it should. Also, the fonts and GIFs are not resized yet, so they come out small.
- Tethys
- Past Administrator
- Posts: 2404
- Joined: Fri Jul 18, 2008 2:00 am
- Location: Your mom's bed ;)
- Contact:
Re: The 1024x768 Project
When I played around with the galaxy screen widths in the *maingal.wdf, I was able to extend the amount of viewable area to a certain extent, there is probably a limiter or another reference to maingal view screen somewhere, sorry I cant be of more help.
Also IIRC after I extended the galactic window by maybe a total of 2 sectors, any larger and the entire galaxy disappeared. Hope this helps.
Also IIRC after I extended the galactic window by maybe a total of 2 sectors, any larger and the entire galaxy disappeared. Hope this helps.
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
I think you can do it with UE. Under galaxy generation, we can edit the sector size in pixels to blow them up. Also there is a heading called "alignment multipliers". I think I read something about it before in one of Gowron's old posts.
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
I fixed up my patchtool to patch the galaxy variables and it works fine now. Also my wdftool correctly resizes listbox columns and sliders now too.
I spent a few hours converting tga's, but they're still not perfect - namely slight pink outlines around a lot of objects, and the buttons on the opening screen disappear when you hover over them. I think with a bit of tweaking, I get the graphics into an acceptable state.
Main galactic screen @ 1024x768:
image no longer available
Here you can see artifacts in the slider images (ignore the overlapping windows):
Note my patches scale the variables within Trek.exe, so just for funzies you could patch to 640x480.
I spent a few hours converting tga's, but they're still not perfect - namely slight pink outlines around a lot of objects, and the buttons on the opening screen disappear when you hover over them. I think with a bit of tweaking, I get the graphics into an acceptable state.
Main galactic screen @ 1024x768:
image no longer available
Here you can see artifacts in the slider images (ignore the overlapping windows):
Note my patches scale the variables within Trek.exe, so just for funzies you could patch to 640x480.
- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7949
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: The 1024x768 Project
great news,
so did you try the images I sent yet? even the small images like sliders have smooth pink lines (no fuzzy edges).
thunderchero
so did you try the images I sent yet? even the small images like sliders have smooth pink lines (no fuzzy edges).
thunderchero
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
No I wrote my own conversion script, expecting the images to come out perfect. It took me like over an hour to write the damn script
I'll test out your images now.
I'll test out your images now.
- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7949
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Re: The 1024x768 Project
just a couple suggestions for your scriptQuasarDonkey wrote:No I wrote my own conversion script, expecting the images to come out perfect. It took me like over an hour to write the damn script
1. if possible before re-size do color change on "ff00ff" (pink) to "000000" (black) BOTF black will work too.
2. to get the smooth areas I had to use re-size method of "nearest neighbor" but maybe with black it might look better using different methods?
thunderchero
- QuasarDonkey
- Code Analyst
- Posts: 433
- Joined: Tue Jul 26, 2011 8:29 pm
- Location: Ireland
Re: The 1024x768 Project
I don't think using black is a good idea because
1. many of the images already use black
2. the magenta #FF00FF is hard-coded into Trek.exe, so I don't think it would work anyway.
Edit: I just checked, and #2 is wrong, black does indeed work, but other parts of the image become transparent.
Actually I've solved the problem by converting to 32-bit PNG, replacing magenta with an alpha channel, resampling / sharpening, extracting the smooth alpha channel, applying a threshold filter to the alpha to make it jagged/solid again, and applying the new alpha image as a mask over the resized image, setting the background colour back to magenta. This results in a nice 24-bit image with no magenta outline.
It's perfect for many images, but some images now have a solid magenta background when you load up BotF. I think it's a result of converting the final 24-bit PNG to 16-bit TGA. The magenta color is being altered slightly.
I'm working on a fix now, by lowering the bitdepth before converting to TGA with UE.
1. many of the images already use black
2. the magenta #FF00FF is hard-coded into Trek.exe, so I don't think it would work anyway.
Edit: I just checked, and #2 is wrong, black does indeed work, but other parts of the image become transparent.
Actually I've solved the problem by converting to 32-bit PNG, replacing magenta with an alpha channel, resampling / sharpening, extracting the smooth alpha channel, applying a threshold filter to the alpha to make it jagged/solid again, and applying the new alpha image as a mask over the resized image, setting the background colour back to magenta. This results in a nice 24-bit image with no magenta outline.
It's perfect for many images, but some images now have a solid magenta background when you load up BotF. I think it's a result of converting the final 24-bit PNG to 16-bit TGA. The magenta color is being altered slightly.
I'm working on a fix now, by lowering the bitdepth before converting to TGA with UE.
Last edited by QuasarDonkey on Thu Sep 22, 2011 3:26 pm, edited 1 time in total.
- Tethys
- Past Administrator
- Posts: 2404
- Joined: Fri Jul 18, 2008 2:00 am
- Location: Your mom's bed ;)
- Contact:
Re: The 1024x768 Project
The black looks just as good as the pink since BOTF has a dark theme for all races (since usually space is dark). I used black alot in my mod and saw no ill effects, the background color is unique to each picture. But also keep in mind that anything else in the tga that is black, will become transparent. Not good for dark objects (like maybe where you would want a pic of something black)
EDIT: QD beat me to posting
EDIT: QD beat me to posting