Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Full car coloring with skins
04-23-2010, 10:16 AM,
Full car coloring with skins
This is another thought I've been having for a while. I was thinking about a better system for coloring and skinning cars, which imo would be a nice feature too.

At the current time, each car has a number of skins you can choose one from, which is the only texture applied to the car by default. I was thinking about changing that a little, into an dynamically colored map which the skin is then applied onto.

In other words, each car would use a grayscale image for the initial body, which is colored dynamically. I was thinking of a color chooser in the menu for that. Then over it, you can choose a skin like you do currently to apply text and designs over cars, as well as the non-colorable parts like tail-lights (each skin would need alpha channels of course).

The purpose would be to allow coloring cars in any color, while still allowing detailed skinning otherwise. Here are some pictures showing what I mean better (second screenshot is a mockup):

[Image: newskinchooseridea.png]

[Image: newskinchooseridea2.png]
04-23-2010, 10:36 AM,
I see two options:
1. Pass base, skin texture + color to the shader and render the car.
2. Bake skin texture, color into the base map after the color/skin selection.

Both shouldn't be a big deal to implement. But who is going to update/create the skins?
04-23-2010, 11:02 AM,
I can do the skins for some cars for now. There are many of them in SVN, so there would be a lot of work overall.

The good side is that compatibility is kept with older skins, the way I see this. If we don't update the skins for some cars, the new color chooser would just not work for them, but the current skins would be applied like before. So we can do a few skins now so the new system works somewhere, and slowly convert more of the cars in time, if that would be alright and agreed on.

If so, how many cars would need new skins for a start? And how should I try to make the new skins (like how do I name the new color map, and do I make it a tga with alpha channel or a png with transparency)?
04-23-2010, 11:28 AM,
I think I should implement a color picker widget first. Then we'll see.
04-23-2010, 01:19 PM,
Ok. If it's of any help, I did the skins for the 360 so it can be tested with this car for now (transparent png's). Included 2 skins apart from the coloring. Here it is:

As for the widget, that would be a part of it. Just an idea... until that is ready the menu could go with 3 little fields for manually writing the RGB values, if the widget would take a longer while.
04-24-2010, 01:47 AM,
i could also help convert some car skins if this idea goes through.

i think it's a good idea
04-25-2010, 08:37 AM,
Hi guys,

there might be a small delay as have to change the way the textures are dealt with. Each car loads its texture. We should use a texture library here like we do for the track objects.

Here is a non-functional gui prototype. I am abusing the slider widget here. :lol:
[Image: skinq7c7t.jpg]
04-26-2010, 06:25 PM,
Looks very nice NaN Big Grin Can't wait.

Also, I can start working on the skins in the meantime, to help do this faster. I just need to know if I should use png with transparency or tga with alpha mask. Transparent png's already seem to work and are commonly used, so I guess I should go for that?
04-26-2010, 09:33 PM,
MirceaKitsune Wrote:Transparent png's already seem to work and are commonly used, so I guess I should go for that?

04-27-2010, 02:15 PM,
Ok, I finished the new skins for all cars. It was a bit of work but they're all done Smile Color uses a grayscale PNG and the skins a transparent PNG, generally containing what must remain non-colored like headlights / taillights.

This will probably be done either way but just in case: The coloring of the new color map should not change its brightness, because parts that are black need to remain black. It only needs to recolor it, so that pure white becomes the color you choose and pure black always remains pure black.

Hope the code implementation will be ready too so this can be added... can't wait Smile Download links for the skins:

Link 1:
Link 2:
04-27-2010, 02:19 PM,
MirceaKitsune you are too fast for me.

Hear this! Big Grin
04-27-2010, 02:28 PM,
Hehe nice song :lol: Yeah, Photoshop helped me finish them quicker than I thought.
04-27-2010, 04:51 PM,
V1.1 - Fix a minor issue with one of the skins. New links:

Link 1:
Link 2:
05-09-2010, 10:47 AM,
MirceaKitsune, We've Got a Problem!

I've got the color blending code running. But the results are wrong. I am using multiplicative blend to colorize the color.png. How did you create it? By converting to grayscale?

[Image: body007s18j.jpg]

color.png multiplicative blend with the yellow color of the original:
[Image: colortcyz8.jpg]

Lab colorspace Lightness channel multiplicative blend with original yellow:
[Image: body00-LAB800t.jpg]

The Lab lightness comes qute close to the original value but is still off a bit.

Any color space experts out there?
05-09-2010, 11:00 AM,
Lab colorspace Lightness + white balance produces the correct color but introduces ugly artifacts:
[Image: body00-LABme84.jpg]

Forum Jump:

Users browsing this thread: 1 Guest(s)