HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Skin weights for animation, rapid rig and maya question:  (Read 5080 times)

Valion310

  • World Owner
  • ****
  • Posts: 42
    • View Profile
    • Expansion:  Rise of Humanity

Hi all

Skin weights, rapid rig and maya.

So I'm in the process of applying skin weights to static characters as I am getting into animating them prior to pipelining into the game. 

With the fingers I'm just having a terrible time getting proper finger bending and a lot of deformation of the fingers.  While using rapid rig, some of the hand / finger joints are rotating properly and some are not.

I'm not planning on having complex hand movements at this time.  More just relaxed hand poses while standing or sitting, as well as fingers posed for gripping items.  So I'm keeping it fairly simple on that front.

Has anyone experienced this and if so can you recommend any good solutions?


Im manually painting my skin weights and adjusting them on an as needed basis and for most of the body I'm coming up with general weights that are working out fine. 


When they get uploaded into game, I assume those skin weight maps will hold in game?  Do I need to create special UV maps with the skin weights on them and apply as a heroshader?  (would prefer not to).  Or will those weights hold once in game animations are running?

Thank you for your time.   :)
« Last Edit: Sep 26, 12, 07:42:10 AM by HE-Cooper »
Logged
Valion
Game Manager & Director
Prowler Art Studio

"Failure is not an option......"

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Skin weights for animation, rapid rig and maya question:
« Reply #1 on: Aug 20, 12, 10:10:21 AM »

With the fingers, are you having an issue with the last joint in some situations?  I noticed that on at least one rig in the past...  ALSO, if you haven't already, download the latest version of the RapidRig script, there have been a TON of changes and updates in the last year and many of the issues I would occasionally see (including the finger thing... I think) have been ironed out.

Yes, the weights that you paint in Maya "hold up" in HeroEngine (and there is no other way to add them later).  A tripping point to look out for:  you can influence any one vertex with more than four bones in Maya.  DON'T.  This will result in truncation of all weighting after the first four bones on a vertex and the mesh will not deform as you expect.

In getting the weights painted properly for fingers, I am first assuming that the edges on the fingers will support good deforming.  Aside from that though, some tips:

* make a short animation where each finger is moved individually to make it easier to test the weighting as you do it.

*(for Maya) you don't have to use black & white!  I much prefer using a rainbow, with black at 0 influence and a blue just barely above that to make it extremely obvious when there are errant weights.

*try normalizing the skin weights (save first, just in case) if you are having trouble removing the influence of certain bones

*look at your hand.  when the fingers bend, they should maintain volume and have distinct joints.
Logged

Valion310

  • World Owner
  • ****
  • Posts: 42
    • View Profile
    • Expansion:  Rise of Humanity
Re: Skin weights for animation, rapid rig and maya question:
« Reply #2 on: Aug 22, 12, 04:05:41 PM »

Hi Bennett, great to hear from you.  Awesome advice all around on and I'm sitting here working on it.

For the latest scripts on the RapidRig ... Is there a different place to DL updates then the purchaseable version on creative crash?  Im running the 1.5.5 version, is there a newer one?

Have you tried the Rapid Rig Poser script? 

Yes the finger tips are mostly what are giving me a heck of a time.  Either they aren't bending when I am rotating the joint, or else I'll move say the knuckle, and either the finger mesh will move and the bones wont, or the bones move and the fingers dont.  Its really a hit or miss type of issue with no consistancy.

A tripping point to look out for:  you can influence any one vertex with more than four bones in Maya.  DON'T.  This will result in truncation of all weighting after the first four bones on a vertex and the mesh will not deform as you expect.
Lets see if I understand that.  If I have 4 joints, and I weight say joint 3 heavy enough that its influancing all 4 of them, then the series of joints is truncated and it wont deform as it moves through the animation as expect within the game?  Or within the maya animation?  When you say truncation, can you clarify what you mean?

In getting the weights painted properly for fingers, I am first assuming that the edges on the fingers will support good deforming. 
What would you recommend I look at on the fingers to ensure this?  Would this be indicated within the wireframe layout of even "lines" and fairly uniform polygons?



Also if you dont mind with a follow on question.  My goal is to set 1 rigged mesh for male and female static characters in the hopes of doing this one time the way I want and then applying the normal, diffuse and spec maps to that rigged model for the individual mass produced NPC's, and just renaming them and building appropriate folder structures for each NPC.
Have you found this to be an effective method? 
Or would you recommend rerigging, painting and animating for every specific NPC I have populating the world?


Awesome info though, very helpful and I'm applying it.

Thanks! 
Logged
Valion
Game Manager & Director
Prowler Art Studio

"Failure is not an option......"

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Skin weights for animation, rapid rig and maya question:
« Reply #3 on: Aug 23, 12, 10:30:45 AM »

Nope, you just re-download the script the same way you did when you originally purchased it; obviously, you have to be signed in to the account that originally purchased the script with.  I'm also running 1.5.5, so unless there has been an update since June 2nd, that is the newest version.

YES.  YES I HAVE.  :D  Rapid Rig Poser (or RapidPose) is an excellent companion to the rapid rig, it is not perfect, but I consider several of the features to be ESSENTIAL. Particularly, the ability to mirror poses to either the current frame or to any other arbitrary frame  is amazing!

 I have one gripe with it, there is a text entry box to specify which rapidRig in the scene to control.  DON'T use the text box.  It steals focus from the main Maya window, so if you click on the RapidPose GUI and select a control while that little textbox has the blinking cursor in it, you have to click back in the Maya window to return focus so you can manipulate the control you've selected.... which of course probably means you're clicking in empty space in the viewport and will have to hit undo to re-select the thing you just selected.......

BUT there is an easy workaround, to specify the rig, don't use the text box, just click any control on the rig and then click the "load selected rig" button.  I'm going to file a bug with the creator to see if he can fix that issue.

It was worth it in my book.  Hopefully the creator will eventually figure out and add the ability to save and load animation sequences, not just poses.  It is listed as a feature to be added in the future (if he can figure it out).


Hmmm, that IS very strange behavior for the fingers.  Email me the file, I'll take a look at lunch. 


Ok, truncation.  This is best explained with a math example:

      given some random decimal "3.1415926" that must have only 3 digits after the decimal point:

      Rounding = 3.142         Truncation = 3.141

Truncation means to cut off.  So, in the case of skinning, say you have a list of bones that influence a vertex.  In our exporter if that list is more than 4 bones long, all bones after the first four will not be included as influencing that vertex in the exported file. 

So, a skinned area that animates smoothly in Maya may end up looking jagged or distorted if too many bones were asigned to individual vertexes.  The AMOUNT of weighting a bone has does not matter, though I assume the weights are normalized (reduced to be between 0 and 1 and all weights on a vertex adding up to a total of 1) when exported.


Good layout for just about anything includes fairly even distribution of edges ("lines"), but the key idea here is "edge flow".  The edges must flow in a way that supports the deformation that you want.  In the case of fingers, it is rather simple, you must have enough edges at and near the joints to maintain volume when the fingers bend.  I would say an ideal is something like one edge loop in the middle of the joint and one on either side, for a total of three edge loops, but, with careful artistry, you can sometimes get away with only two edge loops.


Well, the first method you mention is better than the second, there is no reason why you couldn't rig a basic mesh once and then populate the game entirely with the same one with different textures, but I think there is a better way.

Dynamic Characters.  (Wait, don't run!  They don't bite! I promise! :D)

Here is why:  With ONE dynamic character you can create all of your npcs, have them all have different textures AND give them have varied and interesting meshes!

In the first method you mentioned, if you were VERY careful to keep each version of the skeleton and rig the same, you could animate one and use the same animations for each npc.  The second method would probably require you to animate every single npc individually.

By using the dynamic character system, all the npcs would actually share the exact same skeleton file, and all animations would only need to be made once.  This also means only one character spec has to be created in engine and it should make scripting for your npcs a great deal easier. I suspect using one shared spec instead of potentially hundreds will also translate to an increase in performance (or at least a reduction in bandwidth use)

It took me the better part of two weeks to figure out dynamic characters entirely the first time, but you all have the benefit of being able to ask me for help!  So I STRONGLY suggest you look into dynamic characters.  Do a super simple test, with two spheres for body parts and a skeleton with four bones in it, so you don't get caught up with creating the character first, it'll be much faster that way.  Read the wiki pages on dynamic characters and ask any questions or post any confusion (which will help you AND help me improve the wiki).

:D

« Last Edit: Aug 23, 12, 10:35:39 AM by HE-BENNETT »
Logged

Valion310

  • World Owner
  • ****
  • Posts: 42
    • View Profile
    • Expansion:  Rise of Humanity
Re: Skin weights for animation, rapid rig and maya question:
« Reply #4 on: Aug 24, 12, 07:49:07 AM »

Hey good stuff Bennett!  Sorry for the delayed response, we're out hunting the badguy down here and I wont have a day off again until Sunday.

Thats awesome stuff though!  Hmmm ... the dynamic character aspect is an interesting idea I had briefly considered, but wasn't experienced enough to really understand it. Hmm ... Im going to think on that.  It sure would make me face a the daunting challenge of dynamic characters though, which is next on my attack list of things to get knocked out and in place so I can replace the HJ default characters with my CCS.

I'll drop you a note when I come off rotation with that character file early this next week.

Thanks again for the response.  Made perfect sense and I've got some good gouge to think on for a few days.  Ohh rah!
Logged
Valion
Game Manager & Director
Prowler Art Studio

"Failure is not an option......"

Valion310

  • World Owner
  • ****
  • Posts: 42
    • View Profile
    • Expansion:  Rise of Humanity
Re: Skin weights for animation, rapid rig and maya question:
« Reply #5 on: Aug 28, 12, 03:00:22 PM »

Bennett, just wanted to drop a quick note.  Things on the dynamic character front are going really well.  I've found some amazing tutorials on skin weights and it makes perfect sense now.  After rereading your posts a few times along with the tutorials I found I'm pretty locked on and have a good plan in place for my dynamic characters. 

I spent the past couple days off with a bottle of rum, and got my first dynamic character models/variations a good long ways toward being done.  She's built, rigged, weighted and I last saved her off ready to animate and I've got 2 more varients of her in the pipe so I can have a good testable range of swapable items.  So good stuff! 

Anyway, wanted to thank you for your help on this one.  Well done good sir, and I toasted a late night rum and coke to you.  :)

I'll throw up some pictures when I get her loaded in hopefully in a week or so.
« Last Edit: Aug 28, 12, 03:02:22 PM by Valion310 »
Logged
Valion
Game Manager & Director
Prowler Art Studio

"Failure is not an option......"

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Skin weights for animation, rapid rig and maya question:
« Reply #6 on: Aug 29, 12, 09:33:06 AM »

Haha! Glad to hear it is going so well.  If you do run into any issues, don't hesitate to post, I'm sure we can work you through them quickly.

Cheers! :)
Logged