Art request: Unit Higlight background (solved)

Make art for user-made content.

Moderator: Forum Moderators

Forum rules
Before posting critique in this forum, you must read the following thread:
Post Reply
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Art request: Unit Higlight background (solved)

Post by tekelili »

Hello, I am using Khalifate units for a campaign in BfW 1.11 - 1.12
My problem is this faction lacks portraits and default behavior of show unit image is a really bad solution in the context of first menu players see at start campaign every game:
Spoiler:
My idea is that this problem could be partially solved if I had some kind of visual background mark image where I could blit unit.image. It looks a simple task but is too subtle for my poor graphic skills.

If someone could provide me such image (or any better idea) would be nice :D
Last edited by tekelili on October 22nd, 2014, 9:53 pm, edited 1 time in total.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Art request: Unit Higlight background

Post by GunChleoc »

Have you seen the Sprite Scaler thread?
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Art request: Unit Higlight background

Post by tekelili »

GunChleoc wrote:Have you seen the Sprite Scaler thread?
Yea, I thought was something in development, but if I can already use it that looks a good candidate for temporal solution for missing portraits.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Art request: Unit Higlight background

Post by Iris »

You can’t use it yet because it will be first introduced in version 1.13.0.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Art request: Unit Higlight background

Post by iceiceice »

tekelili:

If you thought that the xBRZ scaler would help you, then in the mean time you could at least get some results by putting "~SCALE(216,216)", this should scale a sprite to 3x using default algorithm, so it should be recognizable for sure. I guess if you want it to work for all units, you could make some code to see if portrait is missing, and put that modifier on unit.image if it is... ?
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Art request: Unit Higlight background

Post by tekelili »

Btw sorry for kinda duplicate thread, my bad :oops:

iceiceice: scale to fixed size looks dangerous as in 1.12 not all unit images are at 72x72. I think is safer scale them myself and add them as custom images.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Art request: Unit Higlight background

Post by Iris »

There is a way to get the original dimensions of any image file in Lua, using wesnoth.get_image_size. You could then use the obtained values to generate proportional SCALE() transforms.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Art request: Unit Higlight background

Post by iceiceice »

tekelili:

I think you shouldn't worry too much about the original size of the image, just SCALE to whatever size you think fits your message dialog best. Because, bilinear interpolation is going to give about the same results either way. That's it's main advantage over other techniques, which may sometimes make many more artifacts if you change output dimension slightly.
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Art request: Unit Higlight background

Post by Iris »

I assumed he was referring specifically to the few non-square sprites we have, for example the Fire Dragon’s baseframe (160x200). No matter what scaling algorithm you use, it will look distorted if you scale it non-proportionally.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Art request: Unit Higlight background

Post by iceiceice »

shadowm: Oh, in that case of course you are right, your approach would work a lot better.
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Art request: Unit Higlight background

Post by tekelili »

I apologize for disturb too much for an issue turned easier than I expected. I scaled unit images x3 for missing profiles (filtering by unit type, didnt find a way better) and outcome is far from perfect but I find it good enougth as temporal solution until units get portrait or better scaling function is added ^_^
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
Post Reply