Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mount Points

Discussion in 'Assets and Asset Store' started by Tryz, Mar 22, 2014.

  1. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    Hi,
    I try to use MP with MCS Female 1.6 but the body mask is not working any more. Can you confirm this?

    I try to change the shader to Unity standard shader and other shader that support cutout rendering mode, still not working.
     
  2. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I spent about 6 hours playing with this and it seems like the Morph3D LOD0 aren't supplying the UVs correctly at run-time.

    I can confirm that Mount Points is modifying the body texture correctly. It even shows in the editor right:



    The odd thing is that the UVs don't seem to be reading the material correctly.



    It's either an error with Unity's RenderTexture or an issue with the Morph3D model. The fact that the Mixamo model works makes me think there's something with the latest Morph3D models.

    I'm not really sure what to do next.

    [EDIT]
    I had an MCS Male from Sept 2016 and I confirmed that it worked with no issue. So, I'm sure it's something with the latest version of the MCS characters. I'll add it to my list to keep digging, but it's not something I've found in the last 6 hours.

    [EDIT]
    One thing I've noticed is that they moved the "body" material to the 3rd material in the list of LOD0 compared to the other LODs (and even the old character). You can see that in the first image above. I'm wondering if that is causing an issue with UVs that I'm seeing in the second picture. This seems to be an issue with RenderTextures.
     
    Last edited: Jul 16, 2017
  3. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42

    Thanks for your quick digging , Tim.

    Before I update MCS to 1.6,MP worked with MCS figure very well. I also notice Mount Points is modifying the body texture correctly. Maybe it's something wrong with MCS models 1.6?

    I also tested in Unity 5.6.2 and 5.3.8, both the same result.
     
    Tryz likes this.
  4. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Yeah, I found the same thing.

    My gut tells me it has something to do with the order of the materials and how Unity's RenderTexture gets the UVs. I'm not 100% sure on this, but I'm not sure why Morph3D would change the order of the materials list for only LOD0.

    This one has me stumped. :(
     
    nirvanajie likes this.
  5. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    I haven't updated Mount Points in a while because I added in custom changes to be able to add a skinnable object at runtime without it having to be defined in the editor. I was wondering if you've added in support for that?
     
  6. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Mount Points has always supported that. :)

    In the web demo for example, you can press the run-time button to add pants, shirt, boots, etc.
    http://www.ootii.com/Unity/MountPoints/Demo_01/index.html

    In the user's guide (page 13) and the demo above, I show you the code:
    http://www.ootii.com/Unity/MountPoints/MPUserGuide.pdf

    Code (CSharp):
    1. mMountPoints.AddSkinnedItem("Prefabs/Armor/Shirts/Shirt_02", "Prefabs/Armor/Shirts/Shirt_02_mask");
    No editor required.


    Unless I totally misunderstand the question... :eek:
     
  7. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    That requires you to define a list of models that can be equipped on the player object though, and pass in a string path to the object. What I did was allow it to just pass in the prefab/instantiated object instead.
     
  8. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    You don't have to "define a list of models that can be equipped". For example, that line of code that I showed above is simply the the path to the prefab. It's not pre-defined at all.

    However, you're right about a pre-instantiated object. I don't have a way for a pair of pants that are already in the scene to have the Game Object get directly assigned to a different character's skeleton. Instead, I instantiate a new Game Object from the path and the pre-existing version of the pants would be destroyed.

    How often are skinned meshes pre-instantiated in the scene and that specific instance needs to be put on a character? I'm curious about an example and the use case... just so I can figure out if it's worth making that a feature. I don't think anyone else has asked for it.
     
  9. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Ah okay, my bad on that. Even from a prefab though, you gotta have the path to the prefab, and require it to be in the resources folder. For my case, I just have a prefab serialized field on my item template files, so doesn't work for my case. That's why I had to change it to accept prefabs instead of file path.

    Using instantiated objects already, probably not needed at all.
     
    Tryz likes this.
  10. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Hi,@Tryz.
    My mask texture does not work.
    Please teach me how to paint correct mask texture.
     

    Attached Files:

    • mask.png
      mask.png
      File size:
      25.4 KB
      Views:
      812
  11. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey @Piahouka ,

    In the guide (page 9) I take you through how to create the mask. It's just a matter of creating a black and white texture like you have. Some things to check:

    1. Is the correct "Body Skin Renderer" set on Mount Points?
    2. Is "Use Body Mask" checked and the right "Material Index" set for your skinned mesh renderer?
    3. Are you using a material/shader that is set to transparent or cut-out?
    4. Have you blacked-out the correct area on the mask texture?
    5. Is there only one skin texture used by the renderer?

    Double check these and it should work.
     
    Piahouka likes this.
  12. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    thanks for your reply.

    I checked these things but not work.
    So, I tried ootii's sample mask texture it works.
     
    Last edited: Nov 7, 2017
  13. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    What character are you using (Mixamo, Morph3D, etc). If I had to guess, the shader isn't supporting transparencies.

    You can send your character to tim@ootii.com and I'll look tomorrow.
     
  14. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Sorry,
    My description was not enough.
    I tried sample mask texture with my character and it is working.
    I think my mask texture is bad. (same size with diffuse)
     
    Last edited: Nov 7, 2017
    Tryz likes this.
  15. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Make sure your texture isn't just black and white. It should still be RGB.
     
    Piahouka likes this.
  16. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Hi again,Trys.
    I have a question about Mount Point with unity's cloth script.
    There is no conflict to use cloth component but body collider associated with cloth will be lost in runtime.
    Is there way to keep collider?
     
    Last edited: Nov 28, 2017
  17. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Are the colliders part of the prefab?

    I won't do anything to reassign colliders, but that's an interesting idea.

    Unfortunately, at this time, you would have to reassign or create them yourself through code. If you have an example scene and prefab, I might be able to help. I haven't worked with Unity's cloth script yet.
     
  18. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    I create sample test scene. (need to import Mount Point)
    I sent you mail download link to support@ootii.com
     
    hopeful and Tryz like this.
  19. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Cool. I'll look at it as soon as I get the chance (maybe tonight or tomorrow).
     
    Piahouka likes this.
  20. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    If you get any error with cloth, try Unity2017.3.b10
    Because unity cloth has been big changed.
    And I sent model is humanoid, you can try any humanoid animation for collision check.
    but it does not need, if you shake the model to the left and right in scene view.


    I recreate sample because of, using ootii's character.
    I sent you mail again. please open with new project.
    I created with Unity 2017.3b10
     
    Last edited: Nov 29, 2017
    Tryz likes this.
  21. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Thank you ootii!
    I am looking forward it to implement resign cloth collider function.
     
    Tryz likes this.
  22. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    Hey i am looking at your assets for quite some time now :D

    one question that bugs me:
    I use a lot of models from the asset store (all humanoid but probably different skeletons)

    if i now want to create new items (clothing ect) for this different characters
    can I just export the fbx to e.g. maya lt
    add the newly created items (created e.g. in 3dcoat)
    then skin them to the skeleton (is it contained in the fbx???)

    then i would use this new item + character + mount points in unity

    so basically the question: where do i get the skeleton information from?
    (my animation knowledge is rather limited ^^)
     
  23. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Right. The way Skinned Meshes work is that they change shape as the underlying bones change. It does this because the mesh understands the skeletal bind pose and vertex weights. The clothing has be to be built from the same skeleton as the body or the clothing would bend in odd ways with the unexpected skeleton.

    In order for me to remap the skinned mesh from a piece of clothing to a character, the bone names need to be the same.

    Typically you can just extract the skeleton from the FBX. So, if you open a Mixamo character in Maya, you've got the mesh and the bones. If you delete the mesh, you've got a good skeleton to build from. Then, you can use that to bind to when creating your clothes. When you export the clothing it will have the same skeletal structure and bone names and I can swap bones at run-time.

    Hopefully that all makes sense.
     
  24. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    Thank you very much :)
    I only ever did the whole modeling - texturing - rigging process this way round
    with exported fbx in 3dcoat i had some problems

    but yeah time to use maya lt subscription for this (and your asset of course :D ) :)
     
    Tryz likes this.
  25. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Update Day!

    Mount Points now supports Unity Cloth. So, if you attach a skinned mesh that has a Unity Cloth component, I'll correctly migrate it and the capsule colliders it uses.




    Calling the RemoveSkinnedItem() function will remove the cloth and colliders as well.

    The cloth and collider information will come from the Unity Cloth component that you setup on your prefab.
     
  26. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,674
    Just a thought - really more like half a thought, lol - but I'm thinking this might also potentially have positive implications for dynamic hair ... whether it is cloth-based hair or particle-based.
     
    BackwoodsGaming and Tryz like this.
  27. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Interesting. I haven't thought much about hairs systems, but I think you're onto something. I need to noodle on it some, but that's interesting.
     
    BackwoodsGaming likes this.
  28. GamePowerNetwork

    GamePowerNetwork

    Joined:
    Sep 23, 2012
    Posts:
    257
    Hi @Tryz sorry if this has been asked before (I tried to scan through the thread for an answer).

    Does this work well with UMA 2? I know UMA bakes it's meshes. Will that be an issue with Mount Points?
     
  29. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I believe it would work, but I haven't tried it.

    I think that once the character is created you could use it like any other skeleton.

    The big problem is that since UMA creates the skeleton on the fly you'd have to set everything up through code. Doable, but it could be a pain.
     
  30. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    Mount Points works with UMA 2.6 and its new Bone Builder tool. With that tool, you create the skeleton at design time and thus MP has what it needs.
     
  31. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,674
    The bone builder is in 2.7 though, currently only available on GitHub, right? This version is expected to be published to the store soon (tm), to replace 2.6.
     
  32. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    Oops, I guess I got my version numbers mixed up. :oops:

    I've been using the bone builder for a while (I tend to use snapshots from the GitHub rather than the official release), so I must have thought that it was a 2.6 feature.

    At any rate, the bone builder feature addresses many of the problems that people have had with UMA and various advanced character controllers, IK solutions, etc.
     
    BackwoodsGaming likes this.
  33. greene_tea92

    greene_tea92

    Joined:
    Jun 26, 2017
    Posts:
    22
    Can this tool switch the skin of another character model? If not, how would I go about implementing such a task (switching, or swapping skin meshes).
     
  34. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376
    Nearly 4 years since my first post regarding Mount Points.. time to dust off the asset and take it for a whirl.

    Are there any tuts regarding setting mount points in conjunstion with Motion Controller. I have the archery pack.. The bow's rotated wrong in the hand )
     
    Last edited: Mar 25, 2018
    Tryz likes this.
  35. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Welcome back. :)

    I talk about it in the Archery Motion Pack guide (page 34).
    http://www.ootii.com/Unity/MotionControllerPacks/Archery/ArcheryUsersGuide.pdf

    With Archery Motion Pack and Mount Points, make sure you're using the bow prefab called "RecurveBow_MP". The mount point is setup like this:



    Make sure the mount point in your hand is setup to match that orientation (or change the bow).
     
  36. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376
    Hi ya Tim... thanks for the speedy reply that fixed it

    Q. Can mount points click into position at run time ? In my game I'd like players to assemble objects snapping pieces together.. preferably pieces can rotate after snapping eg. a car wheel.

    p.s - just purchased Easy Input. ( hope mapping user inputs will be easier for me )



    Tip for other users: when updating archery pack - If who have a problem with avatar freezing when you equip a weapon. I noticed I had 2 x Archery controllers ( humanoid is probably your default on setup) Having two I selected the wrong one & the avatar froze when equipping a weapon.
     
    Last edited: Mar 25, 2018
    Tryz likes this.
  37. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Yes. I include a simple road pieces demo to show how you can click into position at run-time. It's called "demo_Puzzle" and it's in the "Scenes" folder.
     
  38. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376
    Running the puzzle demo .. it won't let me select a road piece... hhmm ?

    Other demos work well.

    [Edit] I managed to add mount points to a couple of cubes in my scene.

    I added rigid bodies to each & then ran the game to see if the cubes would connect. They only connect if there's no rigid body attached... which makes it difficult to manipulate the cube with no rigid body.

    thoughts ?
     
    Last edited: Mar 26, 2018
  39. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    That's odd. I just did a new download and import and it worked for me. When you hold down the mouse on a piece it should center to your mouse.

    You have to drag the center of the road against the center of the other road. Then they are close enough to snap when you release the mouse.




    The rigidbody shouldn't matter, but if you don't have the rigidbody set to Is Kinematic you probably can't move it freely.

    As a test, I added a rigidbody to the road pieces in the puzzle demo and set them to Is Kinematic and unchecked Use Gravity. I was able to move and snap them together.
     
  40. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376
    I'm at work.... just tried it on a workstation here & it works fine... guess I need to update Unity.
     
    Tryz likes this.
  41. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376
    Am considering purchasing Node Canvas.. Is there any advantage over Behavior designer. I have B.D already but there's been no update since Oct. 17 which means I will have to fall back to Unity 17.0
     
  42. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I think NC and BD are pretty much the same. The approach NC takes just connects with me more.
     
  43. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376
    Appreciate the non-biased reply.
     
  44. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    I too prefer the UI and general workflow of NodeCanvas. Simply having the inspector and variables panels always visible and not having to constantly switch between Tasks, Variables, and Inspector tabs is a major plus.

    Behavior Designer's conditional aborts are more flexible than NodeCanvas' Dynamic setting, which is the functional equivalent of a Self conditional abort. To achieve the equivalent of a Lower Priority abort, you need to nest Dynamic nodes (which should technically be a "Both" I suppose). On the other hand, NC has some nice composites like the Probably Selector and decorators like the Filter (cooldown) which don't do anything you can't do in BD, but are faster to build and help keep your graph less cluttered. You can also stack actions on a single node in NC, which helps reduce the clutter of trivial tasks.

    NC displays info about what the current node is doing (which variable it's using, which operation it's performing) based on the parameters you've selected, without having to write and maintain comments.

    BD handles variables a little better, as variables used by external BT references are added to the component on the character. NC doesn't add those to the Blackboard (shared variables) component. However, NC does have dynamic variables which are created at run-time and are intended for short term use within a single BT.

    NC's behaviour trees and FSMs are seamlessly integrated; it's much nicer than BD + Playmaker (in terms of how a BT and FSM work together). Also, while BD has significantly more 3rd party support, any NodeCanvas task can be used in both BTs and FSMs (and dialogue trees, for that matter). And probably 90% of the tasks in 3rd party support packages are basically just wrappers around a function call or two, so it's fairly trivial to convert most BD tasks into NC.

    BD has substantially better documentation and examples, which make it a better tool for learning how BTs work.

    Sorry, Tim, I'll stay on topic next time. :)
     
    Tryz likes this.
  45. Banksy

    Banksy

    Joined:
    Mar 31, 2013
    Posts:
    376
    @ TeagansDad - Appreciate your thoughts on NC vs BD am still very much intrigued with NC


    Back to MP - Regarding the Road pieces in the Puzzle Demo - Is it possible to have an NPC navigate the pieces once pieces are snapped together as NPCs require a navmesh, I'm thinking a dynamic nav-mesh.
     
    Last edited: Mar 27, 2018
  46. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'm not sure. I haven't played with the dynamic nav-mesh, but even if that doesn't work you might be able to create off-mesh links on the fly.

    It's just something you'd have to try.
     
  47. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @Tryz ,

    Just got my head around occlusion masks but not sure about skinned mesh clothing.

    I'm using Fuse. If I have a clothed then unclothed Fuse model and I want to take a piece of clothing 'skinned mesh' 'bottom' from the clothed Fuse model -say the Ranger's Trousers. Make them then an add-on skinned mesh piece of armour for the core unclothed Fuse model.

    My questions are:-

    1. How best to do that?;
    2. What bits of the hierarchy do I need to have still with the copied-out Ranger's Trousers? Do the trousers still need the original Animator or is it enough for them to still have the original bone/hip structure thing? Aside from the Trouser ('bottom') mesh what components do the Ranger's Trousers need to work as skinned mesh clothes with Mount Points with the original Fuse character unclothed model?

    I hope the above questions make sense and you or someone on this forum can guide me here - maybe with some screen captures...

    Thanks in advance! ;)
     
  48. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey @Duffer123 ,

    Check out my documentation on Skinned Meshes. I think that will answer a lot of your questions (with pictures). :)

    For a skinned mesh, you really need two things:
    1. The trouser mesh
    2. The skeleton that the trousers are bound to

    During that binding processes (usually in something like Maya), each mesh vertex is weighted to the different bones in the skeleton. This way, as the skeleton animates, the vertices do too.

    For trousers, your skeleton may just be the hips and legs. You don't really need the shoulders, head, etc.

    What Mount Point does is take the trouser's skeleton and pairs that with the naked skeleton. This way the naked character's animator actually drives the trousers.

    I hope that helps.
     
    Duffer123 likes this.
  49. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @Tryz ,

    Excellent. Thanks v much.
     
    Tryz likes this.
  50. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @Tryz,

    [edit] I thought the below was the best way to ask the right question, so to speak... ;)

    OK so imagine if you will I have imported a Female Knight from Fuse. On her are skinned meshes of things like hair, boots, upper armour, lower armour. I have imported the character in to Unity as an FBX. I have rigged the character then as Humanoid. I have sorted the textures and materials. The Female Knight is based on a consistent single skinned mesh (Female Fit A) in Fuse.

    I want to break something (the torso armor only) off from this character FBX and associated bits in its hierarchy - I just want say the Torso_Armor and to make that its own skinned mesh (I've read your pdf on Skinned Meshes) that I can use on any female characters using that same Female Fit A underlying skinned mesh.

    My question is what must I take from the original to have a skinned mesh "Female_Torso_Armor" say. What from the original hierarchy goes? What stays?

    I've put a screenie below and would be grateful if you could perhaps post back one showing what is needed just for the Torso-Armor skinned mesh for re-use. I hope that makes sense...? Anyway, here is the screenie. Ignore the first two items in the Asset New Folder - I'm just talking of course about the Knight_Female_2 hierarchy:-



    BTW - I got this sweet 3D character from Arteria3D to give credit where credit is due...
     
    Last edited: May 5, 2018