Dynamic custom shape rendering
by Merfy · in Torque Game Engine · 11/11/2005 (9:22 pm) · 3 replies
Is there a built in way to custom render part of a shape?
If you wanted to be able to customize a character head, you would need to custom position/skin/hide/show some smaller meshes.
Some examples for clarity:
* Coloring an eye a certain color, only the color is only known at run time, not when modeling
* Position the nose higher or lower, scale it up or down, or switch it for completely different nose mesh
* A wizard or dwarf's beard could be selected from different meshes
Obviously it's not going to have all of these features, I'm just trying to feel out the extent which you can actually do this with built in stuff.
I'm wondering if there is maybe a specific class for that. Maybe your charcter model could be entirely custom rendered where you can control everything about it. You would need access to all of the possible meshes in the same place in code so you can swap them in and out.
Maybe your character hit a land mine and blew off his legs; in that case it would be cool to swap the legs and feet meshes to ones that are shorter and bloody and let him crawl around a bit. You could have a separate animation for the crawling.
If you wanted to be able to customize a character head, you would need to custom position/skin/hide/show some smaller meshes.
Some examples for clarity:
* Coloring an eye a certain color, only the color is only known at run time, not when modeling
* Position the nose higher or lower, scale it up or down, or switch it for completely different nose mesh
* A wizard or dwarf's beard could be selected from different meshes
Obviously it's not going to have all of these features, I'm just trying to feel out the extent which you can actually do this with built in stuff.
I'm wondering if there is maybe a specific class for that. Maybe your charcter model could be entirely custom rendered where you can control everything about it. You would need access to all of the possible meshes in the same place in code so you can swap them in and out.
Maybe your character hit a land mine and blew off his legs; in that case it would be cool to swap the legs and feet meshes to ones that are shorter and bloody and let him crawl around a bit. You could have a separate animation for the crawling.
About the author
#2
The harder part is rendering and tracking all that info efficiently, which has been what's gotten people in the past. Also, doing your different states efficiently, ie, so you don't have a hundred different textures or have to have custom meshes/textures for each model.
11/12/2005 (3:13 am)
In fact, this is exactly what the TS classes are all about; TSShape, TSShapeInstance, etc. exist to make it possible to control rendering behavior. The details are a bit tricky to master but once you get your head around it you can do pretty much anything.The harder part is rendering and tracking all that info efficiently, which has been what's gotten people in the past. Also, doing your different states efficiently, ie, so you don't have a hundred different textures or have to have custom meshes/textures for each model.
#3
1) This ressource allow you to change texture and layer textures, so you can add scars, change eye color, cloth etc...
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7650
2) This ressource allow you to change character bone size. By setting some bone to 0 size you can like cut off part of the character, (hand, feet, leg, arm )
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7368
There are other ressources around that could help but you should do some research.
11/12/2005 (7:46 am)
Using these 2 ressource you may solve part of your problem. 1) This ressource allow you to change texture and layer textures, so you can add scars, change eye color, cloth etc...
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7650
2) This ressource allow you to change character bone size. By setting some bone to 0 size you can like cut off part of the character, (hand, feet, leg, arm )
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7368
There are other ressources around that could help but you should do some research.
Torque Owner Cinder Games