City building colours

Post Reply
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

City building colours

Post by Luomu »

A recent patch added pattern & variable colour support on building models. The effect can be quite colourful, even with a conservative pattern like this:

Image

That's why I only enabled it for some buildings. Sometimes it looks OK, sometimes you get some pink horrors. What we'd ideally want is some colour selection based on presets (and the existing models don't work that well with more creative patterns). Would be nice if someone can implement that. We've been also wishing for smarter building selection code for ages (AKA no skyscrapers on the moon).
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: City building colours

Post by FluffyFreak »

I found this recently about picking colours procedurally: http://devmag.org.za/2012/07/29/how-to- ... lgorithms/
robn
Posts: 302
Joined: Mon Jul 01, 2013 1:11 am
Location: Melbourne, Australia

Re: City building colours

Post by robn »

Ooh, that's interesting. I made up something pretty naive for ModelSkin::SetRandomColors to try and avoid anything too garish, but with this we could do much better. Might also be useful for the UI for selecting good text colours that stand out appropriately against the background without having to hardcode "this text is red" or whatever (which breaks skinning/theming).

*bookmarked for later digestion*
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

Re: City building colours

Post by Luomu »

robn wrote:I made up something pretty naive for ModelSkin::SetRandomColors to try and avoid anything too garish
I don't know what colours you feel are offensive, I want (some) brightly coloured spaceships but on the buildings it can be too much. So I don't think they should use the same random function.
Ideally we'd use only presets for ship and building colours.
robn
Posts: 302
Joined: Mon Jul 01, 2013 1:11 am
Location: Melbourne, Australia

Re: City building colours

Post by robn »

It wasn't specific colours - I don't mind bright colours. But if you choose three colours completely at random then they tend to not look good together, so I tried to make it select three colours that were reasonably complementary to each other. See the code, its short and commented.

But yeah, we can have some options - no need for everything to use the same method.
Post Reply