Skin compositing

Post your suggestions here
Post Reply
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Skin compositing

Post by jlv »

If you don't understand, I would add a new texture format that would go something like this:

@bottomlayer.png
blend @translucentstuff.png
multiply @shadows.png
add @lights.png

When the game is given a file like this it would read the listed textures and blend them according to the instructions specified. That would let you create skins that use existing textures without actually duplicating them. I'm not sure if skinners would love this or hate it though. Let me know what you think.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Skin compositing

Post by DJ99X »

Thats an intriguing idea. That would allow people to add whatever parts they like to bikes, or leatt braces to gear etc.

So, with multiplayer, would this file be sent to all the clients if they did not have the file? If the extra components weren't available, it would just load the base skin?

The only problem I can see with this, is that everyone is going to run slightly different skins, adding up to even more texture usage.
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Skin compositing

Post by jlv »

It would be like any other texture, except instead of being a png file it would be a composite of other images. If the file isn't there it would be the same as any other missing skin.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
JohnnyMac
Posts: 150
Joined: Mon Feb 02, 2009 6:22 pm
Team: Privateer
Location: California - central coast
Contact:

Re: Skin compositing

Post by JohnnyMac »

YES WE WANT THIS. If I understand what you saying isnt this like the holy grail of customiztion for the player?! Base Gear, then customized team logo, boots, gloves. Base Helmet with logos, customized goggle? Base bike skin with customized team/logos.

Seems like this would also SOLVE the problem of performance going down for having to deal with too many textures in memory for a single model, since your idea blends all into 1 texture!

Of all people, DJ should find this one exciting considering his post in general inquiry. He makes his skin for the bike, then instead of dealing with all this BS saf crackers modifying his skin, they just ADD the graphics over it.
ddmx
Posts: 5374
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Skin compositing

Post by ddmx »

This would def. be a solution a great addition to the game. There of course would be an option for a straight overlay wouldn't there? Not just multiple and add? Or is that what blend is?
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: Skin compositing

Post by DJ99X »

JohnnyMac wrote:YES WE WANT THIS. If I understand what you saying isnt this like the holy grail of customiztion for the player?! Base Gear, then customized team logo, boots, gloves. Base Helmet with logos, customized goggle? Base bike skin with customized team/logos.

Seems like this would also SOLVE the problem of performance going down for having to deal with too many textures in memory for a single model, since your idea blends all into 1 texture!

Of all people, DJ should find this one exciting considering his post in general inquiry. He makes his skin for the bike, then instead of dealing with all this BS saf crackers modifying his skin, they just ADD the graphics over it.

Actually, it would increase the texture usage. All of those parts are 'baked' onto a new skin. Normally, if 2 people run the same skin, its going to use half the texture memory than those same two people, running the same skin but with slight differences to one another.

I'm a little pessemistic to this idea tbh. As I said, it will only increase texture usage, and we are going to have an even greater problem with people missing skins. The only thing it is solving is download size and customization.
ddmx
Posts: 5374
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Skin compositing

Post by ddmx »

people won't be missing skins, from what i can understand. it's gonna benefit the single player person the most, because they can customize their own skins. online, it only looks for the base skin, and that's what everyone else sees. no different than it is now. this would also be nice for decals.

depending on how hard it is, you could actually rewrite the system, and make it apply to decals, along with bike/rider skins. maybe just have a text tile that applies to the baseskin.

baseskin.png
baseskin.ddmx :lol:

@baseskin.png
norm @skin.png
spec @skin.png
occl @skin.png
add @skin.png
multiply @skin.png
blend @skin.png
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Skin compositing

Post by jlv »

ddmx wrote:This would def. be a solution a great addition to the game. There of course would be an option for a straight overlay wouldn't there? Not just multiple and add? Or is that what blend is?
By blend I mean regular alpha blending -

dstcolor * (1 - srcalpha) + srccolor * srcalpha

Since the compositing would be done in software I'd be able to put in any mode you want though.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
ddmx
Posts: 5374
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Skin compositing

Post by ddmx »

gotcha. could it/will it be used for decal purposes as well? would be super sick to have a rut overlay that could be multiplied onto the layers underneath it, instead of just regular blended! or, better yet, applied like a normal map to the layers underneath it.
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Skin compositing

Post by jlv »

It would work for decals, but it wouldn't be any different than if you just did the compositing in photoshop.

It would be possible to add a multiply mode for decals, but I don't think we'd need it once the terrain is normal/spec mapped.

If you just need grayscale multiply, the alpha channel in a completely black image is the same thing if you invert it. (dstcolor*(1-srcalpha))
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
ddmx
Posts: 5374
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Skin compositing

Post by ddmx »

jlv wrote:If you just need grayscale multiply, the alpha channel in a completely black image is the same thing if you invert it. (dstcolor*(1-srcalpha))
grayscale multiply i need yes, for a rut texture. you kinda lost me their though, how would i apply this in game?
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Skin compositing

Post by jlv »

The decals are blended using the standard blending function:

dstcolor * (1-srcalpha) + srccolor * srcalpha

So if you want to do a grayscale multiply, you need to set the color to 0 to cancel out the addition and invert the alpha channel. Then you get this:

dstcolor * (1-(1-srcalpha)) + 0 * srcalpha = dstcolor * srcalpha

So take your grayscale image, invert it and then create a black image of the same size and replace its alpha channel with the inverted grayscale image. The result should blend the same as the original grayscale image in multiply mode.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
ddmx
Posts: 5374
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Skin compositing

Post by ddmx »

niiiiice
Post Reply