Return of the M.A.C.K.
by BrokeAss Games · 11/05/2008 (4:36 pm) · 22 comments
Male Advanced Character Kit v1.2 released
The first revisions to the M.A.C.K. system are now live at Garagegames!
Purchase it here.
M.A.C.K. now comes TGEA-ready.
It took us 3 months to get this ready, we had problems with reskinning the player, as well as some trouble getting mountEquipment objects to reskin properly. As we are fairly new to TGEA, we had a few people look at our build and try to solve the issues we faced. We still could not re-create the functionality of the TGE version.
We finally found a developer capable of resolving the issues, although he had to take a long road to get there, using his own code and a great community resource, essentially rewriting how TGEA handles materials and render layers. The final result is a system that works side-by-side with the stock material system, but offers MANY enhancements. Best of all... his code is included in the M.A.C.K. TGEA build.
Thank you so much, Konrad Kiss. You sir, are the man!
Konrad has agreed to describe his approach to the fixes here, since I could barely describe them in laymen-speak. We have also included detailed documentation on the texture-layer and wrappers Konrad developed for the kit.
Following are the fixes and feature-adds that come with this update:
TGEA compatible
Fixed a script error in Boots3
Fixed a misspelling in the filename of map.uniformpants1.jpg and map.uniformshirt1.jpg
Fixed the broken fingers in the sequence taekwondostance1
Fixed hip/spine rotations in the run sequences
Renamed rKneeBlock1 and lKneeBlock1 they were reversed
Added specular power adjustments to the Male Race UI.
Added new Walk animations (8 anims)
Sword shadow fixed
1st person view fixed for sword and crossbow

The first revisions to the M.A.C.K. system are now live at Garagegames!
Purchase it here.
M.A.C.K. now comes TGEA-ready.
It took us 3 months to get this ready, we had problems with reskinning the player, as well as some trouble getting mountEquipment objects to reskin properly. As we are fairly new to TGEA, we had a few people look at our build and try to solve the issues we faced. We still could not re-create the functionality of the TGE version.
We finally found a developer capable of resolving the issues, although he had to take a long road to get there, using his own code and a great community resource, essentially rewriting how TGEA handles materials and render layers. The final result is a system that works side-by-side with the stock material system, but offers MANY enhancements. Best of all... his code is included in the M.A.C.K. TGEA build.
Thank you so much, Konrad Kiss. You sir, are the man!
Konrad has agreed to describe his approach to the fixes here, since I could barely describe them in laymen-speak. We have also included detailed documentation on the texture-layer and wrappers Konrad developed for the kit.
Following are the fixes and feature-adds that come with this update:
TGEA compatible
Fixed a script error in Boots3
Fixed a misspelling in the filename of map.uniformpants1.jpg and map.uniformshirt1.jpg
Fixed the broken fingers in the sequence taekwondostance1
Fixed hip/spine rotations in the run sequences
Renamed rKneeBlock1 and lKneeBlock1 they were reversed
Added specular power adjustments to the Male Race UI.
Added new Walk animations (8 anims)
Sword shadow fixed
1st person view fixed for sword and crossbow

About the author
http://www.youtube.com/user/BrokeAssGames
#2
11/05/2008 (5:20 pm)
My name is Jondo and I approve this blog.
#3
Just add more animations please!!!! I would pay for a compatible animation pack. Also... please fix the problem with translucency and zorder on the clothing.
11/05/2008 (8:42 pm)
Great pack. Has helped me a LOT!Just add more animations please!!!! I would pay for a compatible animation pack. Also... please fix the problem with translucency and zorder on the clothing.
#4
I'd like to show some of the scripting that is possible with this pack. It is important that you understand, that use of the script wrappers is not limited to the MACK. You can skin any shapebase object, + any mounted object that you put in your mission - and you can do that from TorqueScript even. However, it is a good practice to call your materials base. so you can swap without any changes to the code.
There are wrappers around this functionality that let you better get the most out of the pack. You define a skin by passing the base diffuse texture, and further details about normal and specular maps for that texture, and overlays.
The function createDynamicSkin lets you specify a skin for any object. Here, I'm working with the player character, but you can skin your vehicles, or any other shapebase derived objects. See the following functions and their explanations:
Changes the base.head material on the object to asian.head. The boolean parameters specify if there is a normal and a specular map defined in the parameters of the function. We do have a normal map here, but no specular, hence true and false are passed. The following parameters are further layers. The first one will be a normal map if a normal map is defined. The second is treated as a specular map, but here we have no speculars, so this is just a normal additional layer. My layers for "asian.head" and "facialHair3" look like this:
Blending the base diffuse and the facialHair3 layers
These layers are all blended onto the main diffuse base layer, so eventually, something like this is possible in relatively little time:
Faces generated through blending
Some other example code:
Creates a normal mapped african skin.
This does nothing noticable, since the eyes are of the base.eyes material by default on the MACK model.
Normal mapped caucasian mouth.
If you have the military pants on, this will change it's skin from the default one to the post-apocalyptic texture. It is really easy to add more variations of texture to every cloth and mountable. You could just create a gg.uniformpants1.jpg texture and call it this way to be equipped:
Let's see through a few examples what else is possible through the wrappers in the MACK:
Mounts the military helmet on your character. But! There's something better and easier to do the same:
Other useful functions are:
You probably get the idea. Another cool feature of the MACK pack is the way it uses specular maps. Specular maps do not have to be embedded in the diffuse texture's alpha anymore. They can be separate textures with color, so it is now possible to use different color speculars on a model. This can be very useful when a texture represents many materials in one that need to have different color and strength of specularity on them.
I'm glad, that MACK for TGEA is finally out! I hope that you will have as much fun using it as we had creating it. If you have any further questions, feel free to email me at the address found in my profile.
-- Konrad
Edit: fixed an example's function name and added compatibility note.
Note (shameless plug): Material swapping in the MACK and the Cliff Construction Kit was made to be compatible, so they do not collide.
11/06/2008 (12:41 am)
Jondo, thanks for the shout-outs. I'd like to say HUGE thanks to Gareth Fouche and his priceless TGEA Dynamic Skins & Material Swapping resource. This is where it all started from, and eventually became the system behind the MACK for TGEA. It was extended with a few things to be able to skin mounted images, and the shaders were further optimized. Bump mapping and specularity were added, and the whole thing requires shader model 2.0 - allowing for more blended textures.I'd like to show some of the scripting that is possible with this pack. It is important that you understand, that use of the script wrappers is not limited to the MACK. You can skin any shapebase object, + any mounted object that you put in your mission - and you can do that from TorqueScript even. However, it is a good practice to call your materials base.
There are wrappers around this functionality that let you better get the most out of the pack. You define a skin by passing the base diffuse texture, and further details about normal and specular maps for that texture, and overlays.
The function createDynamicSkin lets you specify a skin for any object. Here, I'm working with the player character, but you can skin your vehicles, or any other shapebase derived objects. See the following functions and their explanations:
%player.createDynamicSkin("asian", "head", true, false, "asian.head_nrm", "facialHair3", "scar1", "age1" );Changes the base.head material on the object to asian.head. The boolean parameters specify if there is a normal and a specular map defined in the parameters of the function. We do have a normal map here, but no specular, hence true and false are passed. The following parameters are further layers. The first one will be a normal map if a normal map is defined. The second is treated as a specular map, but here we have no speculars, so this is just a normal additional layer. My layers for "asian.head" and "facialHair3" look like this:
Blending the base diffuse and the facialHair3 layersThese layers are all blended onto the main diffuse base layer, so eventually, something like this is possible in relatively little time:
Faces generated through blendingSome other example code:
%player.createDynamicSkin("african", "body", true, false, "african.body_nrm" );Creates a normal mapped african skin.
%player.createDynamicSkin("base", "eyes" );This does nothing noticable, since the eyes are of the base.eyes material by default on the MACK model.
%player.createDynamicSkin("caucasian", "mouth", true, false, "caucasian.mouth_nrm" );Normal mapped caucasian mouth.
%player.createDynamicSkin("postapoc", "uniformpant1");If you have the military pants on, this will change it's skin from the default one to the post-apocalyptic texture. It is really easy to add more variations of texture to every cloth and mountable. You could just create a gg.uniformpants1.jpg texture and call it this way to be equipped:
%player.createDynamicSkin("gg", "uniformpant1");Let's see through a few examples what else is possible through the wrappers in the MACK:
%player.mountEquipment("mesh_MilitaryHelmet", "hat");Mounts the military helmet on your character. But! There's something better and easier to do the same:
%player.equip("MilitaryHelmet");Other useful functions are:
// take everything off
%player.undress();
// switch to african skin
%player.setBodySkin("african");
// wear a breastplate with a different texture
%player.wear("Breastplate3");
%player.createDynamicSkin("base", "breastplate3", true, false, "base.breastplate3_nrm" );
// take the belt off
%player.unWear("Belt");
// take the goatee and the wig off
%player.unEquip("Goatee1");
%player.unEquip("Hair2");You probably get the idea. Another cool feature of the MACK pack is the way it uses specular maps. Specular maps do not have to be embedded in the diffuse texture's alpha anymore. They can be separate textures with color, so it is now possible to use different color speculars on a model. This can be very useful when a texture represents many materials in one that need to have different color and strength of specularity on them.
I'm glad, that MACK for TGEA is finally out! I hope that you will have as much fun using it as we had creating it. If you have any further questions, feel free to email me at the address found in my profile.
-- Konrad
Edit: fixed an example's function name and added compatibility note.
Note (shameless plug): Material swapping in the MACK and the Cliff Construction Kit was made to be compatible, so they do not collide.
#5
11/06/2008 (8:22 am)
very cool, the pack has also helped me alot.
#6
Just wondering cause they have the same filenames. I didnt know if i got the update or not.
11/06/2008 (8:30 am)
Sorry probably stupid question, but are we just suppose to redownload from the myaccount page?Just wondering cause they have the same filenames. I didnt know if i got the update or not.
#7
11/06/2008 (9:18 am)
Hey Konrad, just wondering here if the modified C++ files are provided. Or will a code merge be necessary for this pack to work?
#8
11/06/2008 (9:23 am)
@Surge: The modified files are in the pack, but there's a merging guide provided as well.
#9
Yes re-download it from your "myaccount" page. It now has a TGE and TGEA option. The newest version is marked 1.2 on the zip file.
11/06/2008 (11:27 am)
@ JermaineYes re-download it from your "myaccount" page. It now has a TGE and TGEA option. The newest version is marked 1.2 on the zip file.
#10
Zsorting and translucency on the clothing (character+clothing stack) is something I would really like to see resolved too. Unfortunately, I think its an issue with the render order or sorting in the engine (not my strong point). All my tests of transparent textures for the clothing (on the player meshes, ie clothing) have resulted in in the same problem: pieces that should be 'behind' or underneath the clothing (like bodyparts) show as if they are on top of the clothing. I've tried some of the different export options, but with no success. However, mountEquipment pieces work fine with transparent textures, such as the bandoleer or the headset/goggles in the pack.
If anyone has luck resolving this, via code or perhaps tweaking the export settings, please let us know. This feature would expand the usefulness of the clothing stack quite a bit.
11/07/2008 (3:02 pm)
@ GuimoZsorting and translucency on the clothing (character+clothing stack) is something I would really like to see resolved too. Unfortunately, I think its an issue with the render order or sorting in the engine (not my strong point). All my tests of transparent textures for the clothing (on the player meshes, ie clothing) have resulted in in the same problem: pieces that should be 'behind' or underneath the clothing (like bodyparts) show as if they are on top of the clothing. I've tried some of the different export options, but with no success. However, mountEquipment pieces work fine with transparent textures, such as the bandoleer or the headset/goggles in the pack.
If anyone has luck resolving this, via code or perhaps tweaking the export settings, please let us know. This feature would expand the usefulness of the clothing stack quite a bit.
#11
I am having a lot of problems with MACK 1.2 and TGEA 1.7.1. I installed a vanilla 1.7.1 and copied the MACK 1.2 Stronghold folder over the stronghold folder in GameExamples. Things run fine, but quite a few of the features do not work.
1) Lots of console warnings about duplicate datablock names when swapping male mountables. They swap but the warnings are there.
2) The male clothing meshes are not loading. For example selecting robe hides the male body and he is invisible, and unselecting robe gives a MeshOff error 'unable to hide mesh base_robe1_one'
3) hitting enter gives the error 'unable to find function CursorOn'.
I hope you can help, this looks like it has great potential :)
Cheers,
Andy
11/08/2008 (1:18 am)
Hi there,I am having a lot of problems with MACK 1.2 and TGEA 1.7.1. I installed a vanilla 1.7.1 and copied the MACK 1.2 Stronghold folder over the stronghold folder in GameExamples. Things run fine, but quite a few of the features do not work.
1) Lots of console warnings about duplicate datablock names when swapping male mountables. They swap but the warnings are there.
2) The male clothing meshes are not loading. For example selecting robe hides the male body and he is invisible, and unselecting robe gives a MeshOff error 'unable to hide mesh base_robe1_one'
3) hitting enter gives the error 'unable to find function CursorOn'.
I hope you can help, this looks like it has great potential :)
Cheers,
Andy
#12
1. I get those errors too, I don't think they have a negative effect, but I will look into them.
2. To use the UIs properly, you must load the ADVANCED character. The others have been optimized for their theme, so they are missing any un-needed geometry. Choose ADVANCED and all the UI options work.
3. This is a new one to me, probably an easy fix in the binds.cs, I will check it out.
Jon
11/08/2008 (8:38 am)
@Andy1. I get those errors too, I don't think they have a negative effect, but I will look into them.
2. To use the UIs properly, you must load the ADVANCED character. The others have been optimized for their theme, so they are missing any un-needed geometry. Choose ADVANCED and all the UI options work.
3. This is a new one to me, probably an easy fix in the binds.cs, I will check it out.
Jon
#13
1. Thanks, console spam annoys me ;)
2. OK! Great tip, all works fantastically with the advanced character, thanks!
3. Cool :)
Many thanks,
Andy
11/08/2008 (9:13 am)
@Jondo1. Thanks, console spam annoys me ;)
2. OK! Great tip, all works fantastically with the advanced character, thanks!
3. Cool :)
Many thanks,
Andy
#14
Where is the best place to send support requests. It would appear that the supplied demo stronghold game doesn't support network play?
When connecting a standalone client to a server I get an error saying
"Missing Sequence scriptsAndAssets/data/shapes/ACK/male for scriptsAndAssets/data/shapes/ACK/male/advanced.dts"
Can anyone replicate that?
11/08/2008 (4:35 pm)
@MACK GuysWhere is the best place to send support requests. It would appear that the supplied demo stronghold game doesn't support network play?
When connecting a standalone client to a server I get an error saying
"Missing Sequence scriptsAndAssets/data/shapes/ACK/male for scriptsAndAssets/data/shapes/ACK/male/advanced.dts"
Can anyone replicate that?
#15
Question:
My version of the demo has the military player locked in the female walk (scary) and I can't get it to change to any other walk routines, can someone tell me the command to change walk anims?
11/10/2008 (4:40 pm)
@ Rob yes thats a pathing issue I moved all the files into "mynewplayer" directory including the dsq animations and removed all the ./path stuff and it works fine.Question:
My version of the demo has the military player locked in the female walk (scary) and I can't get it to change to any other walk routines, can someone tell me the command to change walk anims?
#16
11/11/2008 (3:36 pm)
Thanks, I was waiting for the TGEA version. Wondering how hard it would be to alter the thing for characters that don't follow the rigging of the kit. Don't have human characters in my game.
#17
Connection error: Missing sequence for game/data/shapes/character/male.dts
Anyone have a solution to this?
11/22/2008 (12:44 pm)
@Rob I got my stand alone version to work fine but when I try to connect I get the missing sequence error on the remote box.Connection error: Missing sequence for game/data/shapes/character/male.dts
Anyone have a solution to this?
#18
As I said in the email I sent you, it has to do with the number of animations... Torque bombs out if there is too many, with too long of names/path names.
There's a quick way to fix this, exec less animations on the player.cs files. (remove about 10 from the stock list of 101.) We're working on a permanent solution so we can exec more and still have them in a shared directory.
This thread discusses it in detail:
http://www.garagegames.com/mg/forums/result.thread.php?qt=80745
Jondo
11/22/2008 (2:00 pm)
@ HowardAs I said in the email I sent you, it has to do with the number of animations... Torque bombs out if there is too many, with too long of names/path names.
There's a quick way to fix this, exec less animations on the player.cs files. (remove about 10 from the stock list of 101.) We're working on a permanent solution so we can exec more and still have them in a shared directory.
This thread discusses it in detail:
http://www.garagegames.com/mg/forums/result.thread.php?qt=80745
Jondo
#19
Thanks for any help.
12/22/2008 (7:36 am)
I am trying to get a simple side step anim to work. When I load the dsq in ShowTool the legs just stick straight out to the side. Can someone show me how to do a simple side step or send me a dsq ?Thanks for any help.
#20
We really like MACK, yet its a mess to integrate in T3D... by which i mean we didnt succeed yet.
09/01/2009 (5:14 pm)
Do you plan on porting this to T3D?We really like MACK, yet its a mess to integrate in T3D... by which i mean we didnt succeed yet.

Torque Owner Surge
MDNAMEDIA