• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
EternityZA

Bodyfit armor

7 posts in this topic

Hi.

In my current project I want to implement clothes and armor that can fit to different body sizes and shapes. I have an rough idea of how i might achive it but I want to know what the best way is incase im way off.

Lets take chest armor as an example.
[list]
[*]Im asuming il need to define a set of points on all character models chest, back and shoulder area and then a matching set of points on all pieces of chest armor.
[*]When moddeling the chest armor every one of these points could be a bone and the vertices will be weight painted to these bones.
[*]When moddeling the characters il create extra bones (one for each of these "points") that extend from the existing bones in the character. These bones will likely end on the surface of the characters skin.
[/list]

[u]for rendering[/u][list]
[*]If a character then has a piece of chest armor equiped il connect the bones of the chest armor to the special armor connecting bones of the character.
[*]Il then transform the bones in the chest armor by the difference between them and the ones in the character. Il define a "center" bone on both the charcter model and the chest armor. the armors center point will be placed on the characters "chest armor center point".
[*]Might make sense to make an simple algorithm that first scales the armor as a whole to the extent where as little as possible transformation needs to take place in the above mentioned point.
[/list]

Does this sound about right? if not what should I be doing.

Thnx in Advance!
0

Share this post


Link to post
Share on other sites
Why not use [url="http://en.wikipedia.org/wiki/Morph_target_animation"]vertex morphs[/url]? That way you don't need any extra bones and you could give more detail to your clothing/armor.

Basically you could have a vertex morph for the skinniest character body and one for the heaviest, and interpolate in between, you could have morphs between male and female, musculature, etc, then you assign a weight for each morph per character to be applied to the armor.
0

Share this post


Link to post
Share on other sites
Might end up needing quite a bit of morphs. Especially if my game contains multiple humanoid races each with slightly different body shapes. And if I add a new humanoid race it will mean id have to go back to all existing items and create more morphs. Would my approach be inherently bad or limiting?
0

Share this post


Link to post
Share on other sites

IMO, Its not bad per se, but it is limiting.

 

For example, the amount/size of uniforms in a vertex shader is somewhat limited, if you want to do skeletal animation on the GPU, you'll find out that you will be constrained to use between 50 and ~64 bones, a humanoid character can easily take that amount depending on how many fingers it has, nodes for the spine, etc. if you have to add bones for armor the amount of bones goes up, which means either do the animation on the CPU or adjust the skeleton (removing non escencial bones from the body) to fit the uniform limitation.

 

Also, what you'll be doing is pretty much the same as a morph, but using a bone to move several vertices at once instead of one at a time, this could limit how well the clothing would envelope the body, whereas with a morph, you'd have a finer control on how the armor envelops and folds on each character type. I may be wrong, but it would seem to me that about the same amount of work would go into tweaking bone values as it would go toward scaling and stretching the armor for a morph, I don't see where you would be getting something for free (IE: done with one piece of armour, done with all of them kind of thing).

1

Share this post


Link to post
Share on other sites

About the bones. I would probably draw the naked character model in one call and all pieces of armor in their own calls (using only the bones applicable to the armor) so I dont see why uniform limit would be an issue. The "connection bones" in the character model wont be sent to shaders for rendering the naked body since no vertices are connected to them.

 

The reason I think going the bone route would be less work in my case is because when I have alot of different items (possibly 100's) and I decide to add another slightly differently shaped humanoid model to the game the morph approach should (in my mind) force me to create extra morphs for all existing items whereas with the bone approach I would not need to modify existing item models when a new humanoid model gets created. 

 

With the morph approach i need to modify potentionaly 100's of items each time i make a new humanoid model

With the bone approach i need to only define the extra bones in each character model. no need to modify any existing models.

 

Is my logic flawed somewhere?

 

Il find it an acceptable tradeoff to loose some flexibility if I can save alot of time moddeling. The game is cell shaded and models dont have a terrible amount of detail so as long as it works and it actualy saves time il be happy. I have allready thought of a couple of ways to hide small pieces of the characters body that will inevitably stick through the armor using the bones approach :D

0

Share this post


Link to post
Share on other sites

Well, why not generate the morphs from the bones offline? you add a new character, adjust the armor bones in your favorite 3d modeling package, and then run some script over the existing armor library to generate the morphs for the new guy offline.

 

I guess the way you're thinking it is fine if you don't mind about the extra runtime computations and the state changes when switching from body skeleton to armor skeleton.

Its not the way I'll do it, but I am the guy who tries to do as much as posible offline to squeze the most performance during runtime, I am the type of guy who sets the compiler for speed rather than size smile.png, your approach won't bring the computer to its knees, and aside from the limitations I mentioned I can't think of any other that stands out, usually you are in the middle of the implementation when they come out, so you'll never know until you start programming.

1

Share this post


Link to post
Share on other sites

Ah. I didnt think about generating the morphs like that offline. Im going to go ahead and implement it like I was thinking and then when (and if) I get an acceptable implementation Il consider (depending on how it preforms) to generate the morphs offline instead with a script. 

 

If some unforseen reason why this wont work crops up Il just have to revert to moddeling all the morphs by hand.. wont be terrible I might just severly lessen the amount of races in my game or elves humans and orcs will all use the same base mesh :D

 

Thnx a lot!

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0