Skip to content

Unclamp restrictions on outputted resolution of photos generated from photobooth #1584

@BlackDog86

Description

@BlackDog86

The outputted resolution of photobooth posters is goverened by a couple of things:

  1. m_iPosterSizeX and m_iPosterSizeY on X2Photobooth (with default properties of 800 x 1200)
  2. GetFinalPosterSize native function on X2Photobooth
  3. A weirdly hardcoded resize on XComPresentationLayerBase
if(`XENGINE.m_kPhotoboothUITexture != none)
{
class'TextureRenderTarget2D'.static.Resize(`XENGINE.m_kPhotoboothUITexture, 800, 1200);
}

Insofar as I can tell from my observations and testing, GetFinalPosterSize is responsible for clamping the maximum resolution of the posters to the height of the viewport (i.e. the in-game resolution) and the game then uses the viewport height, or 800 x 1200 pixels, whichever is lower. 'Denativising' this function and forcing it to output X and Y sizes larger than the viewport size just causes a blank image to be generated (at the correct size, admittedly!) so clearly there are underlying engine limitations on generating posters larger than the height of the current screen.

I was unable to find any other ways in unrealscript to get around this limitation, but there is an opportunity to make some low-key changes, allowing users of higher resolution monitors to output higher resolution photos. The resolutions will still be capped at viewport height, but at least the script cap of 800 x 1200 is removed which seems a reasonable thing to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions