Dynamic Character/Vehicle/Shape Scaling Mod
by Duncan Gray · in Torque Game Engine · 01/05/2005 (12:57 pm) · 4 replies
This mod involves applying scaling factors to vertices according to the bone nodes to which they are attached. Basically you select a bone, select a scaling factor for x,y,z and those scaling factors get stored in a vector list which is instanced for each character/vehicle/shape. Additionally, the scaling is fully ghosted on the clients making it possible for each player to enter the game with his own unique character proportions, visible to all other players.
It's thus also possible to dynamically scale body proportions while mid game. So if a player bumps his head, you can make his head swell up etc.
The idea is to let the user scale his character proportions which then get saved in prefs. When he joins a game, his details get sent to the server which then ghosts the character settings to all the clients.
It's not only of use for characters. The mod is done mostly in shapebase.cc which is the base class for all shapes. Therefore, in theory, you can make trees, vehicles etc and scale sections of the shape as long as you place a "bone" in that area and assign a vertex group to the bone. You will then be able to select that bone and scale the participating verticies dynamically, at run time, from script which can add a whole new element to your game.
It's thus also possible to dynamically scale body proportions while mid game. So if a player bumps his head, you can make his head swell up etc.
The idea is to let the user scale his character proportions which then get saved in prefs. When he joins a game, his details get sent to the server which then ghosts the character settings to all the clients.
It's not only of use for characters. The mod is done mostly in shapebase.cc which is the base class for all shapes. Therefore, in theory, you can make trees, vehicles etc and scale sections of the shape as long as you place a "bone" in that area and assign a vertex group to the bone. You will then be able to select that bone and scale the participating verticies dynamically, at run time, from script which can add a whole new element to your game.
About the author
#2
01/05/2005 (1:42 pm)
Might have to look into this when Im further along in my project but it looks like a great thing to have.
#3
I'm looking at doing something similar, though what I would like to do is apply the scaling only to certain vertices in the group, and not the entire group of verts. Is it possible to do that out of the box, or would I have to mod the code to get that to work?
Thanks in advance :)
Edit: Waitaminute, why aren't you selling through GG? This would get a lot more sales that way. Go, email them... now! ;)
01/06/2005 (8:33 am)
Hmmm, you might just have another customer here(that's saying a lot since I'm close to broke... But I'll shell out for this). I do have a question about how this is implemented in order for me to take advantage of it for my project:I'm looking at doing something similar, though what I would like to do is apply the scaling only to certain vertices in the group, and not the entire group of verts. Is it possible to do that out of the box, or would I have to mod the code to get that to work?
Thanks in advance :)
Edit: Waitaminute, why aren't you selling through GG? This would get a lot more sales that way. Go, email them... now! ;)
#4
You can probably design you character/shape to achieve your specific requirements by adding extra bones/groups as needed.
The scaling itself can be x,y,z scaled individually if so desired, which means you can independently adjust length, height, width etc of the selected node group.
Regarding selling through GG, I did email the staff@garagegames.com address but have not had any response.
I have now submitted it as a resource
01/06/2005 (7:22 pm)
Ted, this mod selects vertices to scale according to the bone/node to which they are asigned. The bone is thus the "key" or index to the vertex selection. You can probably design you character/shape to achieve your specific requirements by adding extra bones/groups as needed.
The scaling itself can be x,y,z scaled individually if so desired, which means you can independently adjust length, height, width etc of the selected node group.
Regarding selling through GG, I did email the staff@garagegames.com address but have not had any response.
I have now submitted it as a resource
Torque 3D Owner Stephen Zepp
A demo functionality of some sort would most probably sell this for my project, because there is no way at all we could duplicate the work in, say, 2 hours per developer at minimum wage :)