Mission screen images

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
Ragged
Above Average
Above Average
Posts: 28
Joined: Mon Jun 29, 2009 10:55 am

Mission screen images

Post 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?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Mission screen images

Post 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).
Ragged
Above Average
Above Average
Posts: 28
Joined: Mon Jun 29, 2009 10:55 am

Post 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.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post 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.
Ragged
Above Average
Above Average
Posts: 28
Joined: Mon Jun 29, 2009 10:55 am

Post by Ragged »

This is excellent stuff and the sort of thing that should be in the wiki. Thank you
Ragged
Above Average
Above Average
Posts: 28
Joined: Mon Jun 29, 2009 10:55 am

Post 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
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post 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.-)
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post 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... ;)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post 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)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post 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!
Post Reply