Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Hamesh81 · Jan 06, 2013 at 08:57 AM · bonesrigcustomizationmorphmorphing

How to handle high heel footwear in Unity characters/rigs?

I am in the process of designing my female base character, the male is already done. I've come to a point where I need to decide how different types of footwear chosen by a player will effect the in game character rig. At the moment I am using a morph which changes the lower legs from a flat-footed to heel-up position. The good thing about this is that I can apply the same animations to both since the rig itself is not changed at all. The bad thing is that the character is the same height whether wearing heels or not, and if you look close enough you can notice that the lower legs (from the knee down) are shorter when heels are being worn.

The only other way of doing this I can think of is having two separate rigs; a flat-footed rig and a heel-up rig. This seems a little overkill though since the rig would have to be changed out whenever the player decides to change footwear. I am also guessing that both rigs would need to use different sets of animations because the heel-up rig would have extra ankle and toe rotation on the x axis. It also isn't very flexible since two rigs would only allow for two height variations of the feet, when in fact there may be many variations in heel size/height.

Is there a better way to do this? I must be missing something.

High Heeled Foot vs Flat Shoe Foot:

alt text

heels1.png (193.3 kB)
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image whydoidoit · Jan 08, 2013 at 12:48 PM 0
Share

Can you not just displace the rig knee transforms upwards (the animation should just be changing the rotations) ?

avatar image Hamesh81 · Jan 09, 2013 at 05:06 AM 0
Share

Do you mean offset upwards all the bones/transforms above the foot? If so that's a good idea, but wouldn't I need to anchor the toe transforms/bones somehow? Because otherwise the entire rig would simply float of the ground by the offset with the feet still in the "flat-footed" position. Is it possible to anchor specific bones in Unity in this way?

avatar image whydoidoit · Jan 09, 2013 at 05:39 AM 0
Share

Yes that's what I mean - the only bone you cannot offset is the root bone - in my mixamo rig that is the hips (which does make this slightly tricky - the idea for a taller character is that you would offset the actual transform of the character upwards and then move the elements below that down to compensate for footwear. This works with the animations because animations only move the root bone, everything else is rotations).

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Hamesh81 · Jan 30, 2013 at 03:32 PM

Ok, after some further discussion with others and studying of my own I think I've found a solution for this.

This first part involves creating a separate animation with only the required foot bones being rotated into the "high heel position". Using Body Masks this animation can then be applied over the top of all existing animations (walk, run, jump etc) to add the extra foot rotation of a foot in high heels. The next step is to to adjust the rig position, and collider size and height to ensure that the rig's feet now are not going through the ground with their extra rotation. This creates a flexible solution which allows the same animations to be used. Let me know if you would like more details about this.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dchakrabarty · Jul 02, 2019 at 07:50 AM 0
Share

Hi, I am doing a similar thing. However, I am not able to mask just the foot and toe bones while using a Humanoid rig. Were you able to make this work? It would be very helpful if you could share some details.

avatar image dchakrabarty · Jul 02, 2019 at 04:47 PM 1
Share

Okay, so I have found a solution to this and it is working pretty fine as of now. 1. I am using a blend shape to raise the heel as you have done. However, ins$$anonymous$$d of making the lower leg shorter incase of a raised heel, I am allowing the toe to dip down below ground level. I am not doing any height compensation now. 2. Then in Unity, I am using Animator.bodyPosition to raise the character up and recover the lost height.

 var heelHeightWeight = (heelHeight / maxHeelHeight) * 100f;
 smr.SetBlendShapeWeight(heelHeightBlendShapeIndex, heelHeightWeight);
 
 animator.bodyPosition += transform.up * heelHeight;
avatar image
1

Answer by whydoidoit · Jan 09, 2013 at 05:43 AM

You can move the transforms within the rig with the exception of the root - this is the only thing the animation actually changes the position of - everything else is rotations (at least presuming the animation is that of a skeleton where bones do not stretch)

So here is an example using a mixamo rig where I've just extended the spine by moving just the spine transform in my rig upwards - all of the animations are playing fine on this character:

alt text

Obviously if the root bone is the hips then you might have to compensate by moving the character itself physically upwards to accommodate the height of the footwear -> apply your morph mod and offset the ankle transform downwards by the same amount as you moved the character upwards


screen shot 2013-01-09 at 05.39.28.png (152.8 kB)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Hamesh81 · Jan 09, 2013 at 12:45 PM 0
Share

Sure I understand what you mean, the problem though is that it's not only a case of changing the transform position, there are changes in the foot bone rotation as well. I've added a screen grab to my answer, please have a look to see what I mean. The left character has one foot and toe bone rotated as an example of a possible high heel position; the entire character has also been lifted higher otherwise the foot would go through the ground. Note that I am rotating the bones/transforms because changing their position with the move tool stretches the mesh.

The main problem here is that when an animation is played the new rotation of the foot is ignored, so for a walk cycle for example the character walks as if they were wearing flat shoes. The animations for the flat shoes would need to have some rotation added to them when wearing non-flat footwear. The only way I can think of doing this is via mecanim's new animation layer system, but I have little knowledge of how to use this yet.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Help with morphing between meshes? 1 Answer

Skinned Mesh Renderer / Morph 2 Answers

Model's wrist bending looks terrible in unity. 0 Answers

Weightless bones don't get added to SkinnedMeshRenderer bone array?!? 2 Answers

Problem with humanoid rig 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges