Hiding/Showing meshes. Need Help.
by Marcin Zygmunt · in Torque Game Engine · 12/05/2004 (9:19 am) · 4 replies
Hi
I have a character mesh in 3dsmax divided into separate objects (see picture)
I've rigged everything, exported and everything works fine.
Now i want to modify the Model Viewer from SDK. I need to have a new window with list of meshes ex:
(torso, left upper arm, head, right lower leg, etc.) and OPTION to show/hide them separatly.
Does anybody know how to write sth like this?
can i use Torque Script or i must write in engine code?
I need something like this to develop the damage system for my game
If this is posible how can I keep diifrent parts of character body in separate .dst files and load/unload them to mentioned list?
Thanks for answers
Picture:
I have a character mesh in 3dsmax divided into separate objects (see picture)
I've rigged everything, exported and everything works fine.
Now i want to modify the Model Viewer from SDK. I need to have a new window with list of meshes ex:
(torso, left upper arm, head, right lower leg, etc.) and OPTION to show/hide them separatly.
Does anybody know how to write sth like this?
can i use Torque Script or i must write in engine code?
I need something like this to develop the damage system for my game
If this is posible how can I keep diifrent parts of character body in separate .dst files and load/unload them to mentioned list?
Thanks for answers
Picture:

About the author
#2
But i have errors when compiling...
Can someone tell me how can i fix that ?
Or maybe someone have changed shapeBase.cc and tsAnimate.cc to work with the resource - i will be gratefull for send me some...
12/06/2004 (9:45 am)
I am using Hiding Meshes Resource (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5421)But i have errors when compiling...
Quote:And:
D:\Torque\SDK\engine\game\shapeBase.cc(3188) : error C2601: 'updateHiddenMeshes' : local function definitions are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3206) : error C2601: 'isHiddenMesh' : local function definitions are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3215) : error C2267: 'cShapeBaseModelDump' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3215) : error C2267: 'cShapeBaseModelDumpcaster' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3215) : error C2601: 'cShapeBaseModelDumpcaster' : local function definitions are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3217) : error C2267: 'cShapeBaseModelDump' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3217) : error C2601: 'cShapeBaseModelDump' : local function definitions are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3224) : error C2601: 'ModelDump' : local function definitions are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3239) : error C2267: 'cShapeBaseSkinOffList' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3239) : error C2267: 'cShapeBaseSkinOffListcaster' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3274) : error C2267: 'cShapeBaseSkinOnList' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3274) : error C2267: 'cShapeBaseSkinOnListcaster' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3274) : error C2601: 'cShapeBaseSkinOnListcaster' : local function definitions are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3276) : error C2267: 'cShapeBaseSkinOnList' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3307) : error C2267: 'cShapeBaseSkinOff' : static functions with block scope are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3307) : error C2601: 'cShapeBaseSkinOff' : local function definitions are illegal
D:\Torque\SDK\engine\game\shapeBase.cc(3310) : error C2014: preprocessor command must start as first nonwhite space
D:\Torque\SDK\engine\game\shapeBase.cc(3311) : error C2958: the left parenthesis '(' found at 'D:\Torque\SDK\engine\game\shapeBase.cc(3310)' was not matched correctly
D:\Torque\SDK\engine\game\shapeBase.cc(3352) : error C2014: preprocessor command must start as first nonwhite space
D:\Torque\SDK\engine\game\shapeBase.cc(3356) : error C2958: the left parenthesis '(' found at 'D:\Torque\SDK\engine\game\shapeBase.cc(3352)' was not matched correctly
D:\Torque\SDK\engine\game\shapeBase.cc(3409) : error C2143: syntax error : missing ';' before 'if'
D:\Torque\SDK\engine\game\shapeBase.cc(3430) : error C2447: missing function header (old-style formal list?)
Quote:
D:\Torque\SDK\engine\ts\tsAnimate.cc(620) : error C2181: illegal else without matching if
D:\Torque\SDK\engine\ts\tsAnimate.cc(621) : error C2146: syntax error : missing ';' before identifier 'mMeshObjects'
Can someone tell me how can i fix that ?
Or maybe someone have changed shapeBase.cc and tsAnimate.cc to work with the resource - i will be gratefull for send me some...
#3
12/06/2004 (10:00 am)
That approach works if the body parts are in one dts file. I was working on a custom player creator, similar to what you are thinking www.garagegames.com/mg/snapshot/view.php?qid=416 but the animtions were clunky, the max for mounted objects not high enough in stock toque, finally I found things got mounted to wierd locations. I eventually scrapped the project. If you make any headway let me know I would love to finish it up some time.
#4
And i think that Hiding Meshes resource will be great for that... but i have those problems... :(
making system like yours is challenging...
I's impossilbe that no one have make Character Animation like that... will be great if someone will give it as resource or something...
If someone know how can i fix those errors... please post.
I am working on Torque 1_1_3.
Best Regards.
12/06/2004 (10:53 am)
Quote:But i want to make all object in ONE dfs file.
That approach works if the body parts are in one dts file. I was working on a custom player creator, similar to what you are thinking
And i think that Hiding Meshes resource will be great for that... but i have those problems... :(
making system like yours is challenging...
I's impossilbe that no one have make Character Animation like that... will be great if someone will give it as resource or something...
If someone know how can i fix those errors... please post.
I am working on Torque 1_1_3.
Best Regards.
Torque 3D Owner Michael Cozzolino
Big Monk Games