Automatic adding of player colours February 17, 2010, 10:13:04 pm Still working on this, but here is a preview of possible tool. It will process png files given as parameters and recolorize according to options.cfg in same folder as image.http://files.[ simutrans [dot] us (site down, do not visit) ]/files/get/Oxqw_T3Xnu/recolorer.7z Quote Selected
Re: Automatic adding of player colours Reply #1 – February 18, 2010, 08:34:07 am Sounds interesting. Have I understood this tool correctly, i.e. could be used as follows?1) render image in, say, black and pink2) use tool to convert pink to player colour, black stays the same?And does this work for 2 player colours?This may solve the long-standing request for pak128.Britain vehicles in player colours without too much fuss... Quote Selected
Re: Automatic adding of player colours Reply #2 – February 18, 2010, 12:57:04 pm Currently it works like this:For every pixel, store current colour as best result but with high metric for every candidate colour, find metric and if metric is bettter than best result, store this result as best finally, replace original colour with the best resultmetric is Euclidian distance in rgb spaceZeno has worked out a better (more automatic) workflow for Blender, so you might want to give that a test instead. It's based on taking the normal render (w. OSA) and masking with non-osa & shadeless render... Quote Selected
Re: Automatic adding of player colours Reply #3 – February 18, 2010, 01:10:53 pm I found that sqrt(r*r*2 + g*g*3 + b*b) often is closer to what human eye sees as "similar" colors than unbiased euclidean distance in rgb space. Quote Selected
Re: Automatic adding of player colours Reply #4 – February 18, 2010, 04:03:20 pm Quote from: VS – on February 18, 2010, 12:57:04 pmZeno has worked out a better (more automatic) workflow for Blender, so you might want to give that a test instead. It's based on taking the normal render (w. OSA) and masking with non-osa & shadeless render...Actually I have a small app that is strictly based in my working workflow, thus is only applicable to that way of working and it hasn't any flexibility at the moment.As VS explains, this way of doing things is based on mask and osa renders. If anyone wants more info on it contact me via PM or the IRC chat (or just post here). Quote Selected