Author Topic: Xpiratez High resolution for Cutscenes and most of Ufopaedia  (Read 13545 times)

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #15 on: June 08, 2021, 04:51:09 am »
@Drago i commend your optimism ...

Offline Drago888

  • Captain
  • ***
  • Posts: 68
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #16 on: June 08, 2021, 05:35:59 am »
@Drago i commend your optimism ...

Hi Kevl,

I had not looked into the codes for geoscape/battlescape yet. But I always believe that with perseverance (except when chasing after lady), most things can be resolved. However, my concern is with compatibility with Openxcom-extended. Hopefully will not raise any conflict when merging with new version of the source code.

But I agree that it will not be an easy task.

Also, personally I see no need (as what made me change the resolution is due to cutscenes and Bootypedia images blurry on my laptop). I'm okay with Geoscape and Battlescape images. But if there are request, then will consider taking up this project

PS: Also I believe I will need to extract out those images from XCOM format into normal images to be upsized.
« Last Edit: June 08, 2021, 05:52:20 am by Drago888 »

Offline Barleyman

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #17 on: June 11, 2021, 01:49:08 am »
OXCE supports only 320x200.
Unless you make your own fork of OXCE, 640x400 is not possible.

Xpiratez is already a TC with bazillions of man-hours sunk on it, so fork is not that much of a stretch.

But to reiterate, even if someone would modify the whole thing to run on 640x400 (fairy straightforward to 2x2), redoing all of bootypedia would be a hell of a job.

Offline Barleyman

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #18 on: June 11, 2021, 02:04:50 am »
Hi Kevl,

I had not looked into the codes for geoscape/battlescape yet. But I always believe that with perseverance (except when chasing after lady), most things can be resolved. However, my concern is with compatibility with Openxcom-extended. Hopefully will not raise any conflict when merging with new version of the source code.

But I agree that it will not be an easy task.

Also, personally I see no need (as what made me change the resolution is due to cutscenes and Bootypedia images blurry on my laptop). I'm okay with Geoscape and Battlescape images. But if there are request, then will consider taking up this project

PS: Also I believe I will need to extract out those images from XCOM format into normal images to be upsized.

I don't think you benefit that much on geoscape, most obvious visual improvement would be on boobypedia. Running battlescape at 640x400 would give you option to zoom out, though.

Obviously 1280x800 is another easy target for scaling but probably won't add that much visually over 640x400 as far as boobypedia is concerned. But if someone takes on the herculean task of reprocessing artwork.. And if Dioxine has the originals. And if he doesn't mind sharing them.. If if.

Offline Drago888

  • Captain
  • ***
  • Posts: 68
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #19 on: June 11, 2021, 03:04:54 am »
But to reiterate, even if someone would modify the whole thing to run on 640x400 (fairy straightforward to 2x2)

I beg to differ. It is not that straightforward to convert it to 2x2. When I convert the cutscenes and boobypedia to 4x4, there are some obstacles to overcome.
Eg. To modify the algorithm for drawing the cursor on 4x4, to modify the codes for the scrolllist (probably my codes break it), to modify the codes to upsize existing images without remodeled images, to set the correct/acceptable colors (as no longer using palettes which the current version is using - palettes are only usable by 8 bits images) etc.
« Last Edit: June 11, 2021, 03:24:59 am by Drago888 »

Offline Drago888

  • Captain
  • ***
  • Posts: 68
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #20 on: June 11, 2021, 03:07:30 am »
I don't think you benefit that much on geoscape, most obvious visual improvement would be on boobypedia. Running battlescape at 640x400 would give you option to zoom out, though.

Obviously 1280x800 is another easy target for scaling but probably won't add that much visually over 640x400 as far as boobypedia is concerned. But if someone takes on the herculean task of reprocessing artwork.. And if Dioxine has the originals. And if he doesn't mind sharing them.. If if.

I agree that upscaling geoscape will not have any benefits. Thus I guess I will leave it at status quo.

To add on, I use 1280x800 not because that there is much benefit over 640x400 but rather due to the below reason
1. The ESRGAN model that give acceptable results (for cutscenes) to me are all 4x scaling
2. Delay resizing in the future (maybe 2 decades down the line) where the norm resolution is so much higher than 640x400. (such as XCOM 320x200 is acceptable so many decades ago but now we cannot accept that resolution). Downside is the download size which to me,  for modern game, 1 - 2GB is nothing. Eg sometimes patching our modern game, the patch size might already be more than 1GB
« Last Edit: June 11, 2021, 03:19:10 am by Drago888 »

Offline Barleyman

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #21 on: June 11, 2021, 03:57:28 am »
I beg to differ. It is not that straightforward to convert it to 2x2. When I convert the cutscenes and boobypedia to 4x4, there are some obstacles to overcome.
Eg. To modify the algorithm for drawing the cursor on 4x4, to modify the codes for the scrolllist (probably my codes break it), to modify the codes to upsize existing images without remodeled images, to set the correct/acceptable colors (as no longer using palettes which the current version is using - palettes are only usable by 8 bits images) etc.

It's extremely simple as far as upscaling bitmaps goes, UI is obviously a different animal. It's not like some relatively new commercial titles don't struggle with e.g. 4k UI being unusably small and so on.

Fair point re: palettes, albeit dithering obviously works better the more pixels you've got and it's not like you have to manually assign the palette unless you're a pixel artist..

Offline Barleyman

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #22 on: June 11, 2021, 03:58:59 am »
I agree that upscaling geoscape will not have any benefits. Thus I guess I will leave it at status quo.

To add on, I use 1280x800 not because that there is much benefit over 640x400 but rather due to the below reason
1. The ESRGAN model that give acceptable results (for cutscenes) to me are all 4x scaling
2. Delay resizing in the future (maybe 2 decades down the line) where the norm resolution is so much higher than 640x400. (such as XCOM 320x200 is acceptable so many decades ago but now we cannot accept that resolution). Downside is the download size which to me,  for modern game, 1 - 2GB is nothing. Eg sometimes patching our modern game, the patch size might already be more than 1GB

Yeah, I agree with you, if you go to a lot of trouble to reprocess/postprocess all of boobypedia, you might as well as go for 1280x800..

Offline Drago888

  • Captain
  • ***
  • Posts: 68
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #23 on: June 11, 2021, 04:06:17 am »
It's extremely simple as far as upscaling bitmaps goes, UI is obviously a different animal. It's not like some relatively new commercial titles don't struggle with e.g. 4k UI being unusably small and so on.

Fair point re: palettes, albeit dithering obviously works better the more pixels you've got and it's not like you have to manually assign the palette unless you're a pixel artist..

Hi Barleyman, thanks for sharing your knowledge. My limited knowledge on images is unsurprisingly obvious here. Thus I depends a lot on models that other people create for ESRGAN to upscale and patch(smoothen) the blurry part. Sadly, there is no model for XCOM - old version not the recent version.). Although I found models for Fallout 4.

Or maybe some ML experts can help train some models for openxcom-extended and xpiratez? Will really appreciate it
« Last Edit: June 11, 2021, 04:13:26 am by Drago888 »

Offline Barleyman

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #24 on: June 12, 2021, 04:30:26 am »
Hi Barleyman, thanks for sharing your knowledge. My limited knowledge on images is unsurprisingly obvious here. Thus I depends a lot on models that other people create for ESRGAN to upscale and patch(smoothen) the blurry part. Sadly, there is no model for XCOM - old version not the recent version.). Although I found models for Fallout 4.

Or maybe some ML experts can help train some models for openxcom-extended and xpiratez? Will really appreciate it

2x2 upscale just means that you take 1 pixel and copy it 4 times. Hence 320x200 => 640x400 looks exactly the same and so does 320x200 => 1280x800. It'd be probably reasonably (*) straightforward to tweak the game engine that way if someone felt very dedicated to it. That way you could have boobypedia bitmaps in "native" hi-rez and battlescape in upscaled 320x200 without having to change resolutions or such.

But someone would have to go and bang the C code and so on. Meridian's not volunteering, I've got a day job and don't feel that strongly about it. Plus last time I looked into graphics processing I was trying to co-opt FFMPEG into capturing Linux "desktop" so I can feed it into a local dimming algorithm. You don't want to go there unless you want to spend a year on it, believe me.

I could put in some grunt-work on processing the boobypedia images to higher rez if someone actually had the original bitmaps etc.

(*) to some values of "reasonable"

Offline Drago888

  • Captain
  • ***
  • Posts: 68
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #25 on: June 12, 2021, 04:53:47 am »
2x2 upscale just means that you take 1 pixel and copy it 4 times. Hence 320x200 => 640x400 looks exactly the same and so does 320x200 => 1280x800. It'd be probably reasonably (*) straightforward to tweak the game engine that way if someone felt very dedicated to it. That way you could have boobypedia bitmaps in "native" hi-rez and battlescape in upscaled 320x200 without having to change resolutions or such.

But someone would have to go and bang the C code and so on. Meridian's not volunteering, I've got a day job and don't feel that strongly about it. Plus last time I looked into graphics processing I was trying to co-opt FFMPEG into capturing Linux "desktop" so I can feed it into a local dimming algorithm. You don't want to go there unless you want to spend a year on it, believe me.

I could put in some grunt-work on processing the boobypedia images to higher rez if someone actually had the original bitmaps etc.

(*) to some values of "reasonable"

Thanks for the clarification. Although i don't see the benefits of doing that. Do you mind enlightening me?

Fyi, sdl 1.2 have a upsize function. I used it to upscale images without remodelling  (eg look at clothing and bases in boobypaedia)

Thanks Meridian, Yankees, Dioxine and others contributors for adding to the project amidst your freetime in your full time employment

Offline Barleyman

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #26 on: June 14, 2021, 05:07:08 pm »
Thanks for the clarification. Although i don't see the benefits of doing that. Do you mind enlightening me?

Fyi, sdl 1.2 have a upsize function. I used it to upscale images without remodelling  (eg look at clothing and bases in boobypaedia)

Thanks Meridian, Yankees, Dioxine and others contributors for adding to the project amidst your freetime in your full time employment

The benefit is that you don't get blur. If you just plop 320x200 @ full screen, it'll get stretched by 5.4 on 1920x1080 display which makes your big blocky pixels fuzzy. Which was your problem! Multiplying by 5 would be 1600x1000, add a bit of black borders and you got crispy sharp pixels.

Anyways, we're talking of two different things, I was speculating on recreating boobypedia at 640x400 or 1280x800 which would make the anime girls look nicer but thinking about just how many entries there are.. If one takes 5 min to process it'd be like 8.3 hours to do a hundred entries. Whoops. And if you need to go look online for originals..

Makes you think just how much time Dioxine has put into this!

Offline Drago888

  • Captain
  • ***
  • Posts: 68
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #27 on: June 14, 2021, 06:49:38 pm »
Anyways, we're talking of two different things, I was speculating on recreating boobypedia at 640x400 or 1280x800 which would make the anime girls look nicer but thinking about just how many entries there are.. If one takes 5 min to process it'd be like 8.3 hours to do a hundred entries. Whoops. And if you need to go look online for originals..

Makes you think just how much time Dioxine has put into this!

When i use esrganresizer (although there is cupscale which seems much better - will try it for the next version ), it takes about 5s per images. If including those weapons images in resources folder, have a few thousands.

Offline Barleyman

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #28 on: June 22, 2021, 02:26:40 am »
When i use esrganresizer (although there is cupscale which seems much better - will try it for the next version ), it takes about 5s per images. If including those weapons images in resources folder, have a few thousands.

Sure, that's fairly sensible. My line of thought of taking original images and using them with higher resolution instead of 320x200 maybe not so much. Even if the original artwork was nicely organized as separate images ready to go it'd take a good long while to resize + cut + paste everything one at a time.. Weapon images have obviously been painted pixel by pixel by a quite a few guys as you can see in the credits, post processing those and looking good would be quite the trick.

Offline Drago888

  • Captain
  • ***
  • Posts: 68
    • View Profile
Re: Xpiratez High resolution for Cutscenes and most of Ufopaedia
« Reply #29 on: July 25, 2021, 10:02:03 am »
When i use esrganresizer (although there is cupscale which seems much better - will try it for the next version ), it takes about 5s per images. If including those weapons images in resources folder, have a few thousands.

Just for people who are interested to upscale the images themselves using ESRGAN. You can't find ESRGANResizer on the web anymore. Cupscale works very well (It even supports transparent background unlike ESRGANResizer) The images looks much better now when using Cupscale. However, all my images are still png files (and renamed to .gif if source is gif) (As formerly ESRGANResizer don't allow other than PNG)