In-engine skin building
by Nate "Nateholio" Watson · in Torque Game Engine · 02/13/2004 (1:37 pm) · 2 replies
Would it be much of a hassle to implement a on-the-fly skin building ability for Torque? The following is from an email I sent a team member explaining what I mean:
"What I mean about skin layers is this:
Each model would have a set of skin layers that were
uv mapped to fit onto it. One layer would be a texture
layer, giving the skin a smooth (peacekeeper) or bumpy
(herc) look, or any other texture that needed to be
simulated. Another layer would be the camo layer,
defining what the camo pattern (curvy, zig-zaggy,
etc.) is and where colors go. Yet another layer is the
camo color layer (forest, desert, etc.). And finally,
there would be a "decal" layer for things such as
writing, numbers, etc. These will be combined by the
level loading code into a skin for the model, and then
every skin layer except for the actual compiled skin
would be dumped from RAM. The engine would pretty much
be combining existing skin layers just like you do in
Photoshop to produce a final skin. Of course the
engine can't currently do things this way. My hopes
are to get a programmer who knows how to implement
this scheme. I think the upside to this is that we
can have a lot of skin variation with relatively
little data.
An example: Say we have three different skin textures
(smooth, slightly bumpy, and really bumpy), three camo
patterns (zig-zag, generic forest type, and desert
type with splotches), and three camo colors (forest,
desert, and snow). To make all of the possible camo
patterns using pre-compiled skins, you would need 27
different skins (assuming they're 512 x 512, thats
7,077,888 bytes of skin data for one model). If we use
the method I'm suggesting, only nine skin layers will
be needed - 2,359,296 bytes of skin data at 512 x 512.
I feel this is needed because a lot of people will
want to download the game (hopefully) and we should
make it as small of a download as possible."
So, is this an relatively easy addition to the code, or would it be a pain?
"What I mean about skin layers is this:
Each model would have a set of skin layers that were
uv mapped to fit onto it. One layer would be a texture
layer, giving the skin a smooth (peacekeeper) or bumpy
(herc) look, or any other texture that needed to be
simulated. Another layer would be the camo layer,
defining what the camo pattern (curvy, zig-zaggy,
etc.) is and where colors go. Yet another layer is the
camo color layer (forest, desert, etc.). And finally,
there would be a "decal" layer for things such as
writing, numbers, etc. These will be combined by the
level loading code into a skin for the model, and then
every skin layer except for the actual compiled skin
would be dumped from RAM. The engine would pretty much
be combining existing skin layers just like you do in
Photoshop to produce a final skin. Of course the
engine can't currently do things this way. My hopes
are to get a programmer who knows how to implement
this scheme. I think the upside to this is that we
can have a lot of skin variation with relatively
little data.
An example: Say we have three different skin textures
(smooth, slightly bumpy, and really bumpy), three camo
patterns (zig-zag, generic forest type, and desert
type with splotches), and three camo colors (forest,
desert, and snow). To make all of the possible camo
patterns using pre-compiled skins, you would need 27
different skins (assuming they're 512 x 512, thats
7,077,888 bytes of skin data for one model). If we use
the method I'm suggesting, only nine skin layers will
be needed - 2,359,296 bytes of skin data at 512 x 512.
I feel this is needed because a lot of people will
want to download the game (hopefully) and we should
make it as small of a download as possible."
So, is this an relatively easy addition to the code, or would it be a pain?
#2
02/17/2004 (9:56 am)
Hehe, sounds like a kewl idea. Thumbs up to anyone who wants to attempt this.
Torque Owner Mark Storer
Damage decals. It would be quite a bit of work, but you could get some really cool/gruesome effects.
Create two or three layers of 'ouch' textures. One could just be a flat 'blood colored' layer, and may not actually need to be a texture. The next layer would be a "meat" layer, with some sort of details... ligaments and such. Next would be an internal organs/bones layer, where things start to really get gross.
One of the resources floating around out there allows for accurate decal placement on player models.
So depending on how 'deep' the wound would be, you'd layer the various damage skins together and slap it on the player, showing (for example) some exposed skull around a ruined eye with a bloody mess around the edges.
"House of the Dead" only better.
Armored/artifical (robots, golems) models could use the same techniques... An armored human would need a real "blood" level textrue to show damaged/removed armor, with the person showing underneath.