Sign in to follow this  
Codewarrior Congrejo

Ways to fix a problematic Avatar Rig

Recommended Posts

I am continuing here for the original Thread of WhiteShark Zadark from this link:

http://community.secondlife.com/t5/Mesh/Major-mesh-problem/td-p/1944861

WhiteShark asked for help with his rig and sent me and Gaia the files. Gaia gave him already some good tips in the former thread about obvious problems with the whole armature. 

I have taken the time to check it out, after recieving his file, and fix it (to a certain usable extend - you gotta do something on your own too Sharky ^.- in order to learn it =) (and it can be pretty time intense)

And decided to document here what i did. To help him understand what was wrong and maybe also show others how to fix some problems many might run into.

- NOTE: no shaking heads allowed for none of you - it's his first attempt to rig something. So things can go wrong =)
               And we are here to learn ^^


Here the problems he had with his rig:

Shark-Fixes_00.png

Now to inspect the file and find what's wrong:

1. ) Rotation and Scale and Origin problems:


Shark-Fixes_01.png

- As Gaia already found by inspecting his file the rotation was on 90° X and needed to be applied by using CTRL + A >
  ApplyRotation for the Meshmodel / in Object mode
- Also i found that the Scale was not on plain 1.000 so i applied this too with Ctrl+A > Apply Scale.
  To make this it's 100% size. (also in Object Mode)
- Next to it the model's origin was not on Location Center (0,0,0)  so i made sure the model's origin was moved to it.
  SHIFT+S > Snap cursor to Center, and then Object > Transform > Origin to cursor
- Note: Allways make sure your object has the same origin as the armature has - which is exact at 'center' (0,0,0)

2. ) Problems with the whole Armature:

Shark-Fixes_02.png

- Even though when comparing his first screenie of the former rig with the file i got, the bones had been different in the
   former  version (still out of place like the hands, or shoulders being used as upper arm etc) but in the final file it was 
   worse.
- I have marked in the above image all the problems i found on the bones already
- The bones have been in wrong places, not conform with the anatomy of the model at all.
  And in some cases again just stretched over several body areas.
- There also have been misnamed bones in the armature, weird bonerolls and much more.



2. ) Problems with the weights:


Shark-Fixes_03.png

- i checked through all bones and there was a lot wrong weighting going on:
- Major issues: Some bones had influences only towards one side of the body,
- lots vertices had influences from wrong  bodyparts (i.e. Vertices on the tail being influenced by the foot and so on)
- And many vertices with more then just 4 weight influences causing them to be pulled all over the place when posed.
- And various other problems.

3.) Problems with the Topology and certain bodyparts: 

Shark-Fixes_04.png

- Even though he already listened to my former advide and moved the model into more of a T-Pose fitting to the skeleton
  i found the hands still needed to be fixed.
- The hand was modeled into a forwards position, this is generally not a good idea for a 'relaxed t-pose' and 
   problematic when working with existing rig-systems that are rather made to be straight.
- To keep it unproblematic and avoid the need for deformation animations i straightened the hand out and fixed the
  adjacent topology of the whole forearm to connect correctly to the new position.

Note: the model has 14.000 tris, thats pretty intense. I can understand if you don't want to redo it on this model.
          But for future models try to keep it lower. (as reference: the default avatar has ca. 7.000 tris) There are defenitally
          areas that wouldn't need such a density and where you could have spared surely 3-5 k.

Shark-Fixes_04_2.png

- The topology of the fin on the backside of the ellebow was also problematic.
- Around 6 Vertices had been sunken into the model. And with very extreme angles causing the faces / normals to
  stretch, faces to intersect, and cause troubles when animating, and for texturing purposes as well.
- So i went on and fixed most of it, by merging vertices and keeping the 'quads' intact.
- Corrected the surrounding topology, and the steep face angles and stretches too.

PS: i don't know if you did it on purpose, if so you might want to change this again. But i found it needs to be fixed.

Shark-Fixes_04_1.png

- To not have to repeat those steps for both bodyparts and with keeping in mind i need to do the whole parenting and
  weighting new, i decided to delete the opposite half of the model and work with a mirror modifier in the Y axis.

- I removed and deleted consequently all Vertrex Groups (thereby the weights), and also deleted the armature
  modifier to get a plain and fresh model again.

Shark-Fixes_05.png

- Since i figured in the former post and by talking with him that this is meant for a male avatar i grabbed a default male
   armature.
- The old one was too messed up and i find it allways faster to start from scratch than going through tonns of wrong
   values, trying to fix them, with the risk of overseeing things and repeating it over and over. Plus the weights had to be
   redone too, so best here just all fresh from the beginning. And start right with a correct armature and new weights.
- Then positioned the bones in editmode (in plain orthographic views: top, side, front to avoid fancy bone rolls) to fit
   the whole anatomy of the model.

Personal Note: In general, never be afraid to start over on your models. Don't cling onto the weights you have
                            created, or topology, even if it took you days. If it's too messy, just start over. 
                            And you will see the more often you do that the better you will become at it - 'practive' is the
                            magic word =)



Shark-Fixes_06.png

- Now parented the Mesh with automatic weights to the armature.
- I generally never copy / paste weights from the default avatar, i am used to make my own from my daily work. But that's
  up to all of you of course (and for beginners surely easier). But for this certain case  and something that has such a
  different topology and anatomy it doesn't make sense to copy the weights at all.

- Began to tweak weights roughly to get a working model.

- The tail needed the most attention here the automatic weighting assigned it to many unwated bones. I removed those
  influences completely from it.

- Now exported the Model along with the Armature, into a Collada DAE file. By using the operator preset for Second
  Life 
 Rigged in Blender (2.65 and above)

4. ) Now on to see if all the fixes worked : 

- since i basically 'redid' the whole armature and the weighting from scratch it should èé lol


Shark-Fixes_07.png

- created a new 'default shape'
- choose "edit shape" and switched it to male. (no further sliders or values touched)
- The model has absolutely no LODs (thats something you will have to do later WhiteShark - it's gonna be in the
  afterwards following to-do-list)
- So had to upload it with some of the generic options for the LOD levels.
- Included Skin and weight / and Bonepositions and imported the model.
- Then wearing the shape and the rigged model.

And there you go ! your model worn, fixed and working. 

BUT - and here comes what 'you' have to do now on your own:

- Get Blender 2.65 a ) so you can work with the file which i will send you back now.
- You also need it to have the new inbuilt DAE Exporter with the Secondlife Operator Presets.
  To apply the mirror and other modifiers (except armature - but no worries the exporter skips this one)
  And to create a fitting export for SL purposes.
- You will still have to refine the weights, the shark's face needs to be fixed: remove the eye influences and
   shoulder, and other unwanted influences. (set them to Weight Zero, so they are applied but have no influence)
-  Rule: Every vertex must have at least 1 influence and every main bonegroup must be apparent in the Collada file.
- The tip of the fin of his back has a few vertices that respond to unwated influences, remove those too.
- The upper legs and the behind need more tweaking too.
- Tweak the rest of the weights to your likes until it behaves like you feel it's right.
- Use Posemode in Blender to check how it behaves in certain poses.
- Upload the model in between to the testgrid to see how it behaves and if it maybe has missing groups and thus
  invisible faces all of a sudden. Check as much with testuploads as you can.
  Note: do it on the betagrid - i had posted you a full how-to about the betagrid as answer in the former thread.
- Create 3 further LOD levels of your Model once you are happy with the weights.
  And important : 'after' applying seams and UVs and Material faces. So faces amount and UV stay the same.
- Possibly refine the UVs and weights on your 3 Lower LOD models to behave / look correctly.
- Create a lowpoly physics shape for it.
  If it would be more humanoid you could skip that and rely on the collisionbones the avatar has, but with his long tail
  and way longer arms and the different head it needs a physic shape or it won't behave realistically when bumping into
  other avatars and objects and with physics in general.
- Export all 4 LODs each along with the armature (and UVs, and Material- Groups) as single DAE files.
- Export The lowpoly physics shape also as DAE. (make sure it has the same origin as the model and armature)
- Create some custom Poses and Animations for him, to upload these to SL as well. He won't work good with most 
  human animations, and thus needs a set of custom ones made exactly for him. And in best case stick those into a AO
  (animation overrider)

- Now you can start testing your final uploads, and add the 3 additional LOD models and the Physics shape to the  
   upload / import procedure.
- Once it works good enough for your taste you can start creating the textures (based on the former created UVs)

- And last but not least let us know how it works out for you ! : )

Cheers, Code.


  • Like 5

Share this post


Link to post
Share on other sites

In agreement to what Rahkis said - and many thanks once again for making so many wonderful and informative posts here in the forums, Code. Your knowledge shared in here is superbly helpful, not just to me but no doubt to countless others. Although I'm proficient enough with mesh, I am always welcoming of new methods, ideas and avenues to approach things by, so to me your postings are gold.

Thanks muchly for all your hard work (I know how time consuming informative posts and tutorials are to make). Hence my many kudos I've been throwing your way - my little "thanks" to you in the background without me cluttering up your threads!

(And many thanks to the other regulars who post around here too - I've learned a lot from all of you).

:matte-motes-smile:

Share this post


Link to post
Share on other sites

I'll copy paste this to here too, to have them combined under this thread since this is another fix for a forum members' rig of a dress:

 (original thread here: http://community.secondlife.com/t5/Mesh/Problems-with-Vertex-groups-on-Blender-2-6/m-p/1953805#M20284)

I received your file and was checking out it's problems and fixed these things to a certain extend. (the final work and tweaks you will have to do on your own =))

 

Let me show you the issues I have found:

- Rotation / Location / and Scale issues:

Dress_Rig-Fix_01.png
- All objects like armature, avatar and the dress mesh had different scales and rotations and locations.
- you can first have these while working, but you need to 'apply' those (CTRL+A > location / rotation / scale) at the
  end, or your mesh will drill and flip in all directions when being worn in the game.

- And the armature and parented objects should have also while working in best case the same rotations to avoid
  computational errors with certain methods when being applied.
- Since I finished everything so far I applied and corrected all these wrong locations, scales and rotations for them and
  brought them all to ROT 0,0,0, SCALE 1,1,1, LOC 0,0,0.

- In addition I made sure all objects origins where snapped to perfect center. And thus for everything the same position.

- The weights on the dress' mesh:

Dress_Rig-Fix_02.png
- the weights had been only assigned at arms and chest and have been (as you recognized by yourself already very
  messy)
- After fixing the above problems (rot,loc,scale etc)
- I don't know 'how' you put those weights on. Means: if by painting - then the brush settings might have been wrong. (too
   small brushtip, and / or too much /or not enough strength ). If they have been copied from the avatar it would also be no
   wonder if they appear wrong because the topology of the dress is very different from the avatar. (we will come to that a
   few points later *)

- I did a Test-Stroke to see if the mesh is now okay and responding orderly to adding weights:

Dress_Rig-Fix_07.png

- with the above shown brush-weight settings I could clearly draw / add a straight weight line (red)
- just to assure it's taking the weights now correctly.

- The dress' Topology and weighting-methods:
Dress_Rig-Fix_08.png
- * As mentioned above the topology of your mesh is very different from the avatar's. So copying weights from this leads
   to very disadvantageous results. And is no option at all. Unless you are up for a lot fixing and know where to put what.
- But in those cases I start with fresh weights, the following way:

- Deleted all vertex groups, unparented the dress, and freshly parented it with automatic weights:
Dress_Rig-Fix_09.png
- this gives you way cleaner results in such a case to start with and then do your tweaks  from there, by painting add  or
  subtract weights from certain parts to refine the results.
- Did some rough manual tweaks to it already.

- Quick test to see if everything responds correctly to posing now:
Dress_Rig-Fix_10.png
- Everything works fine now for a start.
- You will have to do the final refinements though : ) can't do it all for you.
- I have pointed you out above a few of the things that need retouching.

- Additionally found issues: 
 The UVs and Troubles in the mesh:
Dress_Rig-Fix_03.png
- When I looked at the UVs I found some major issues as well:
- both armparts had different texture space (one side smaller then the other) which will result in stretched texturing and
   other problems.
- The armparts had even more issues (right side): overlapping faces, holes, and a lot stretching. Which would prevent
   textures from even being applied correctly in those spots. 

- Seeing all this it was clear to me that there must be inconclusive seams and possibly doubled edges and vertices
  in
  those spots. Which appeared a correct assumption when I looked at the mesh on those areas:
Dress_Rig-Fix_04.png
- The seam was not going through (left)
- faces and edges have been overlapping (top- middle)
- there have been numerous spots with doubled edges and vertices (middle - bottom)
- Some parts of some of the edgeloops had up to 3 duplicates.
- and the seamline here was inconclusive (right)

- this did not only make a correct UV unwrapping impossible.
- It also was yet another issue which lead to your troubles when doing the weightpainting:

Because when you would paint on one of the overlying vertices those would be contracted towards the bone, but the former hidden ones you could not reach while painting would all sudden stick out. (regarding your screenshots of the armparts when you tried to paint weights on it) And the half visible half hidden vertices of course got all sorts of different
weights this way.

- So I removed consequently all of these faces and loops and redid them;
- And additionally I redid the whole UV for you as well:
Dress_Rig-Fix_06.png
- fixed the seams after fixing the topology and faces, and then unwrapped the whole model again.
- now with equal shoulderparts, better texture space, and undistorted armparts.
- To give you even better texture space I decided to rotate one of the dress parts on 180 degree so I could scale them
   both more up.
- After all this I redid the weighting on the arms. To assign weights to the newly created vertices.

- Another thing:
Dress_Rig-Fix_05.png
- Also the faces across the upper legs had been proportionally much bigger then the rest of the skirts topology. And thus
  uneven.
- For better weighting / posing behavior, and also better texturing (avoid extreme stretching etc) I decided to add one 
  additional loop in there to even things out.

- Another thing you will have to do:
Dress_Rig-Fix_11.png
- as written above you will nee inwards facing polygons. To cover those ingame invisible / transparent backsides of the
  faces.
- Due to SL's backface-culling those are unrendered and transparent and you will need a few inward faces / loops to
  cover these.
- The earlier you do it, the better. Because: you have to weight those too, and need to include them into your UVs as
  well.

- The corrected model in your file: ( I have used Blender 2.65a - so you might need to switch to that version if
  working with the edited file gives you problems)
Dress_Rig-Fix_12.png

- Hope that helped you to get an overview over your mistakes and how to fix those in future. And helped you getting
  started on doing the final steps on it =)

- Don't forget you will need 3 more LOD versions of the model later on (and of course the physics model). And the better
  you prepare it now, the easier you will have it to tweak and retouch the 3 other LODs.

Cheers, Code.

Share this post


Link to post
Share on other sites

Awesome tutorial! Could you please help me? I had a mesh body that was twisted like that, and fixed it using your tutorial. However, it still looks swirly but only in the arms. what am I missing?? Thanks in advance

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this