Page 1 of 1

Mission screen images

Posted: Wed Sep 15, 2010 7:32 am
by Ragged
Does anyone know the difference between an 'overlay' image and a 'background' image on a mission screen?

Also, how does the game treat such images - does it try to scale them in any way?

Re: Mission screen images

Posted: Wed Sep 15, 2010 1:06 pm
by Commander McLane
Ragged wrote:
Does anyone know the difference between an 'overlay' image and a 'background' image on a mission screen?
Well, background is in the back of any text, and overlay is displayed over any text.
Ragged wrote:
Also, how does the game treat such images - does it try to scale them in any way?
Yes, it will fit and centre the image on the screen. Oh, and it expects power-of-two sizes (like 256 x 256 or 512 x 512).

Posted: Wed Sep 15, 2010 1:48 pm
by Ragged
Well, background is in the back of any text, and overlay is displayed over any text.
Well that is what I would have expected, but I cannot replicate this. The text always appears over whatever image I use.

Posted: Wed Sep 15, 2010 4:28 pm
by Svengali
Ragged wrote:
The text always appears over whatever image I use.
Yep. Would be really bad if the text wouldn't be visible.

For missionscreens there are different layers - a black layer is the bottom layer, then background, then the model, then overlay, then the text (top layer). So if you're using overlay and model, the pic has to use transparent areas for the model. background and overlay are mutal exclusive. If overlay is used, it overrides other screen overlays (as in entries from screenbackgrounds.plist), but via setScreenOverlay() it can be overriden again.

The scaling behaviour has been changed a few times between v1.72 and v1.74
- if a user has switched on REDUCED_MODE Oolite does not scale down bigger pics anymore (maybe different with max-texture-size <512 set, haven't checked it).
- if non-power-of-2 pics - v1.72 has scaled them, v1.74 doesn't do it anymore. Some gfx-cards may fail to display it properly.

- 256x256 - centered, looks as if there's a bit upscaling, but I'm not sure.
- 512x512 - centered, y-axis fills screen, x-axis does not fill the whole screen.
- 1024x512 - centered, y-axis fills screen, x-axis isn't display fully, but fills the whole screen.
- 256x1280 - centered, y-axis isn't displayed fully, x-axis does not fill the screen.

So it's up to oxpers to work out the needs of their creations. Usually I'm using 512x512 and 1024x512.

Hope this helps a bit.

Posted: Wed Sep 15, 2010 4:35 pm
by Ragged
This is excellent stuff and the sort of thing that should be in the wiki. Thank you

Posted: Wed Sep 15, 2010 8:08 pm
by Ragged
Hmm, on my system at least, it scales up 512x512 images to the full screen height.

See here

https://bb.oolite.space/viewtopic.php?p=118410#118410

Posted: Wed Sep 15, 2010 8:59 pm
by Svengali
Ragged wrote:
Hmm, on my system at least, it scales up 512x512 images to the full screen height.
Yep. Your pics are showing what I've said. Y fills, X does not.

Surely Oolite scales it up to match your screen resolution (or window size) on Y and there's no other way as users are running pretty different resolutions/window sizes. And it should look the same under different resolutions (at least if they are not too weird).

He, you could try to set your screen resolution/window size to 200x1000 - this would be weird enough.-)

Posted: Thu Sep 16, 2010 7:03 am
by Kaks
One other thing: overlay and background are not totally mutually exclusive: if you have a partially transparent image as overlay, you can see through its transparent bits to the model & backround image 'below'. You could get some interesting effects that way... ;)

Posted: Thu Sep 16, 2010 8:33 am
by Eric Walch
Kaks wrote:
One other thing: overlay and background are not totally mutually exclusive: if you have a partially transparent image as overlay, you can see through its transparent bits to the model & backround image 'below'. You could get some interesting effects that way... ;)
That means that "overlay" is the situation of the old mission screen were any picture did hide a spinning model. When you did want to use both, you had to make the picture partly transparent to let the spinning ship peek through. (Like in militaryFiasco.oxp)

Posted: Thu Sep 16, 2010 10:59 am
by Svengali
Kaks wrote:
One other thing: overlay and background are not totally mutually exclusive: if you have a partially transparent image as overlay, you can see through its transparent bits to the model & backround image 'below'. You could get some interesting effects that way... ;)
Yep, just tried it. Seems it has been changed - before mission.runScreen() has only used one of them (if I remember right). Cool! Muchas gracias!