Search Unity

FPS Mesh Tool

Discussion in 'Assets and Asset Store' started by CodeBison, Jan 11, 2015.

  1. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    628
    Thanks for your reply, that's a real shame, the issue is not really Morph3D specific, its simply a SkinnedMeshRenderer can have Blendshapes, and your Asset just needs to retain them when it creates submeshes for the materials.
     
  2. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Ahh, gotcha. Thanks for the clarification.

    From the bit of searching I've done, there doesn't seem to be any way to access BlendShape vertex data from code, though there is a feature request to expose this data. There might be way to work around this, but it's not certain to be effective and would require a complete rewrite of FPS Mesh Tool. The potential interests me though, so I'll look into it.
     
  3. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Good news @Greg Bassett ! Unity exposed blend shape data to code staring with Unity 5.3. FPS Mesh Tool Version 1.1, which I've just submitted to the asset store, has full blend shape support, and thus full Morph 3D support. (Requires Unity 5.3+).
     
    julianr likes this.
  4. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Question for you guys. Would you get any benefit from having runtime access to this? It would be nontrivial, and I'd have to find a faster way to handle BlendShapes, but it should be doable and I'd be happy to take a crack at it if there's sufficient interest.
     
    errandfox and JBR-games like this.
  5. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Would that make it easier to get UMA working?
     
  6. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    I was thinking about that. It might. It would have to be run after every UMA change (clothing swap, slider movement etc). But I think that as long as you weren't trying to run it every frame or anything it might work okay.

    I take it that means one vote in favour?
     
    Arkade likes this.
  7. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    possible to slice both leegs and arms ?? So im become 2 leegs and arms ??
     
  8. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Yes, you can do any combination of limbs you want. You can also choose to keep the arms/legs together or separate.
     
    MrGky93 likes this.
  9. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    It could be useful, but the only issue is all the runtime type characters seem to take up way too much memory. Morph3d is very, very heavy.
     
  10. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    i don't currently 'Need' that feature , but that would be a nice extra feature to have for future projects, sorry i just now replied, haven't been getting consistent updates of thread posts.
     
  11. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    Uma how to :
    - At runtime, export UMA as a prefab with uma powertools (it makes it a hardcoded character) - I disable everything I can before doing the export ( eyes, face, head .. ) and keep only the mesh (uma slot) that contains the arms ( arms and torso together in my case)
    - Open the hardcoded version of the character with FPS mesh tool
    - cut arms and torso from the mesh
    - make 2 new uma slots with 1 - just the arms and 2 - just the torso.
    - Discard the old uma slot / fbx that had (arms + body) together

    Ideally uma characters should be authored with separate arms / torso for an FPS, but if you want to customize some existing assets it works.
     
  12. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Good to know. Thanks!
     
  13. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Got a notification about a reply to this thread re: blend shapes not working, but don't see any new posts. Hopefully this means whoever was having trouble is all good now. If not, please repost so I can help.
     
  14. usupator

    usupator

    Joined:
    Oct 16, 2016
    Posts:
    31
    Greg, sorry to barge in: I want to be sure I understand: you ve lost the possibility of changing the look of your character once you used pfs mesh tool - but did you get the look of the charater you created? I mean: you took the male basis and created an weird alien from it - once you fps meshed it, bib it look still like your alien of was it back to the "normal" guy? I'm desperately trying to find a way to make my morph 3D weird characters lighter (they are 400 megs each when exported as an asset package - arrrg! and fps mesh might help me, any idea info advice would be most most welcomed by this newbie who is nearing nervous breakdown (I have my characters I dont want to ever change them again, but they are too heavy to use in anything! :-c many thanks for your patience guys
     
  15. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    @usupator you should be able to use FPS Mesh Tool to do what you want without issue. If you try it and it doesn't work for you, I'll happily refund your purchase.
     
    usupator likes this.
  16. usupator

    usupator

    Joined:
    Oct 16, 2016
    Posts:
    31
    many thanks Bison! I'm going to try that then!! cheers and thanks
     
  17. usupator

    usupator

    Joined:
    Oct 16, 2016
    Posts:
    31
    Bison, I bought your soft, great clean very nice, but alas it did not work: I tried all possible combinations and either I ended up (instead of the kid) with the adult cut roughly, or emptiness. I used a script to see the bones of my kid, they are still at the level they were in the adult he is based from.
    I'm glad thanks to your offer I could try with FPS, it was worth trying but alas, I'm as stuck as before.
    I'm sorry to have to take you on your refund offer, my name in the store is usurpator, I bought it earlier today (Europe time). Many many thanks for your generosity and to others: it's really a clean nice and easy to use script and the fact it did not work for me has nothing to do with Bison's work but with the mess in my character. Many thanks! A.
     
  18. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    usupator likes this.
  19. usupator

    usupator

    Joined:
    Oct 16, 2016
    Posts:
    31
    many thanks bison I do that now
     
  20. Grandoran

    Grandoran

    Joined:
    Nov 13, 2015
    Posts:
    1
    Has anyone had any luck getting Morph 3d to character to work with this? I'm Using Morph 3d Version: 1.0r5 with UFPS version 1.7.

    I can't get the arms and head to disappear. I was thinking it might have something to do with all the LOD's. Anyone else get this to work?

    Thanks.
     
  21. gsus725

    gsus725

    Joined:
    Aug 23, 2010
    Posts:
    250
    Can you please make the option to close off the "caps" of the limbs? This way I can use FPS Mesh tool for decapitations and the neck hole will be covered when I make the head invisible

    And the ability to use a custom material for the "caps" (for example a bloody material)
     
  22. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    While I think that would be pretty neat, it's not something I'd likely do given the amount of work involved and the fact that it doesn't really do anything for the FPS Mesh Tool's primary use case. I'll let you know if that changes, though.

    I remember there being a (somewhat costly) limb slicing system on the asset store, but for some reason I can't find it at the moment. This looks like it might help you out, assuming it works on skinned meshes: https://www.assetstore.unity3d.com/en/#!/content/59618
     
  23. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    I've tested it with Morph3D and didn't see any problems with the standard male character I tested with (though I understand there can be problems with some Morph3D customizations). In general it should work just like slicing up any other character (no special steps required). If you can send a copy of your character model to support@codebison.ca, I can take a look for you.
     
  24. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Have you tried finding that location and setting the scale to zero for that point. for instance, set the wrist scale to zero.
     
  25. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    305
    Hey, I have been looking for a solution to split skinned meshes at runtime, so far it is not possible but with this solution it seems that I can pre-split my skinned mesh and then on runtime just hide some meshes, Is this correct?

    Will my character still animate after splitting it?
    Can I completely unattach the mesh from the bone on run time?

    The common use case is for character dismemberment. Will this asset help me achieve that?

    Thanks for your help.
     
  26. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hey there, I'm very interested in FPS Mesh Tool since I see it can support Morph Character System.
    But I got some doubts before purchasing:
    1. How far does it support MCS? If I let players edit their avatar through changing the morph bars provided by MCS in runtime, can FPS mesh tool work properly? Or after the mesh processed, will the MCS bars still be able to shape the avatar?

    2. Dose this support Motion Controller and Camera Controller by ootii? Since I'm using them for the motion and camera solutions, is there an integration tutorial on youtube or in documentation?

    thanks for your time :)
     
  27. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Hi,

    In my testing, runtime slider changes with Morph3D worked fine on a model processed by FPS Mesh Tool. That said, I've heard one or two people have troubles using FPS Mesh Tool with Morph3D models. I think the only way to find out if it will work for your use case will be to try it. If it doesn't work out, I'll gladly refund your purchase.

    As for Ootii's motion and camera controllers, everything will work just fine. The only thing you'll need to do is make the appropriate mesh renderer swap materials for the provided transparent ones when you want body parts to become invisible. If you need any help with that part, just let me know.
     
  28. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Hi,

    I'm sorry, I could've sworn I answered this a few weeks ago, but I don't see any sign of my reply now. Hopefully this information will still help you, even though it's later than it should've been:

    Yes you understand correctly. You can presplit meshes and hide parts of them at runtime. Your character will still animate after splitting.

    You can't unattach the mesh from the bone at runtime. You can, however, accomplish something very similar. With FPS Mesh Tool, you can create meshes that only contain individual limbs. You could use an extra spawned copy of your character that only contains the left arm, for example, and switch that arm-only mesh to ragdoll when it gets severed.

    You can use this asset for dismemberment. It should be noted that you'll have to find a suitable way to cap off the edges of limbs, however, as FPS Mesh Tool doesn't do that.
     
  29. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Thanks, I'll try it out :)
     
  30. closetgeekshow

    closetgeekshow

    Joined:
    Jun 6, 2014
    Posts:
    125
    Has anyone used this with RFPS? Can I use the tool to generate arms that are compatible with it?
     
  31. ooni

    ooni

    Joined:
    Mar 22, 2017
    Posts:
    4
    Hi CodeBison,

    I've been struggling for a couple of months trying to get shadows to render on the processed FPS mesh for a Morph3d character. The unprocessed model casts fine but the processed mesh only casts shadows from the clothes. I've made sure the shaders are all setup all the same and the cast shadows is on.


    Do you have any suggestions for getting shadows to cast from the FPS processed skinned mesh?

    I love the simplicity of your tool, but not being able to get resulting shadows is hampering my ability to utilize it. I'm using unity 5.4.4.

    Thanks
     

    Attached Files:

  32. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    That's bizarre. I could see the "missing" head not casting a shadow if you'd accidentally selected the Unity4 shadowcaster material instead of the Unity5 one, but the hands not casting shadows when they're visible is definitely strange.

    Other than the custom materials that are used when you want a body part hidden, FPS Mesh Tool doesn't do anything that should affect shadow casting. Can you double check the materials being used on the mesh you're having trouble with, and see if they work properly with other objects (even if you slap then on a standard cube that should be enough of a test). Additionally, you'll want to make sure all your mesh renderers are set to cast shadows, and that the invisible shadow casting material you're using is correct (has Unity5 in its name).

    If that doesn't sort everything out, let me know. I can take a look at your model and possibly find what's up.

    Cheers,

    Cameron
     
  33. ooni

    ooni

    Joined:
    Mar 22, 2017
    Posts:
    4
    I sent this too soon. I was able to get it working by resetting the shader. After further investigation one of the shaders had a rendering mode that was set to AlphaTest. Changing this to Opaque was what was needed.

    Anyhow, thanks for providing such a useful tool!
     
  34. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Excellent, glad it's working for you!
     
  35. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Hi im using this with
    https://www.assetstore.unity3d.com/en/#!/content/60016

    and although i can separate the arms and legs it wont let me do the body.

    when i pick a preview it throws this error.
    IndexOutOfRangeException: Array index is out of range.
    CBG.FPSMeshTool.FPSMeshToolWindow.ConvertToFPSMesh (UnityEngine.SkinnedMeshRenderer sourceRenderer, UnityEngine.SkinnedMeshRenderer targetRenderer, UnityEngine.Transform head, UnityEngine.Transform leftArm, UnityEngine.Transform rightArm, Boolean processLegs, UnityEngine.Transform leftLeg, UnityEngine.Transform rightLeg) (at Assets/CBG/FPSMeshTool/Editor/FPSMeshToolWindow.cs:699)

    Thanks
     
  36. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Hi!

    From the error you're seeing, it sounds like the character you're using is improperly configured, and has a renderer with more submeshes than materials. You should be able to work around the issue by adding an extra material to the appropriate skinned mesh renderer. I don't have the asset you're using, so I don't know how many mesh renderers are involved. If there are a lot, it might be inconvenient to use this workaround, as there's no easy way I know of to see which one needs a material added, or if one is enough. You can give that a try though, if you're comfortable with it and want to just get it working right away.

    I'm working on an update that should make FPS Mesh Tool resilient to this kind of misconfiguration. I'll have it ready by the end of the weekend, though it will likely be a bit before the update is approved on the asset store. If you email me your invoice number at support@codebison.ca, I can send you the updated package as soon as I've made the fix.

    Thanks for letting me know about the problem.

    Cheers,

    Cameron

    Update: I've successfully tested a fix for the issue I described, and I'm uploading it to the asset store now. As mentioned above, I'm happy to email it to anyone who sends me their invoice number.
     
    Last edited: May 14, 2017
    JBR-games likes this.
  37. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Wow what a quick response, i emailed you the invoice #, thanks again
     
  38. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Sent. Let me know how it goes. :)
     
  39. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    RPG_Female_UFPS_Setup.PNG Worked Great... Thanks again..!
    Should be all setup to add to UFPS now.
    Also maybe one other small feature request but no rush on my part, Under the "choose renderers" section, maybe a deselect all [ button ]. For example the models from SF bay. studios in the image/from the package i linked in my original post,
    have a bunch of armor attached to the character 50+ renderers, and all but 1 need to be unchecked.
     
    Last edited: May 14, 2017
  40. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Oh holy crap that sounds painful. I'll see what I can do.
     
  41. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    This should do the trick:
    upload_2017-5-14_17-7-59.png

    Pushing to Asset Store now.
     
    nxrighthere and JBR-games like this.
  42. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    Wow. I must have watched this guy about 600 times and I just can not get this to work properly with a Fuse character. Can somebody do a tutorial for getting this asset working with UFPS and a Fuse character, so the 3rd person and "full body awareness" are functional? It's driving me crazy. o_O
     
  43. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    What part of the process are you having an issue with ?
     
  44. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    @JBR-games Okay, you see in the video how there is no problem when switching between first and third person? I can't get my head around how to configure it, for example, where to apply the transparent materials (that come with this asset). I either have no arms and head - good for first person. Or, I keep the arms and head, which looks good in third person but they are still there in first. I can't get them to "co-exist" peacefully. Also in the video, there is the FPS prefab as a child of the main parent object, but also still the original unseparated mesh, just disabled. Surely it can't be wise to have two fully rigged characters and then arms as well?

    Anyway, I think it's because Fuse characters have a lot of meshes - tops, bottoms, body etc, whereas all the examples have only one main mesh with the materials derived from that, like on the HD Hero character. So, if somebody could show me one example of a perfectly configured Fuse character with full-body awareness and third person, that would be great. I feel so dumb honestly I've tried like a dozen times, lol.
     
  45. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    If I remember right (it's been a while, so please correct me if I'm wrong), UFPS may not support toggling multiple renderers for each body part out of the box. If this is the case, you can either mod the code (minor tweak if you know how), or request help from the UFPS dev (his support is excellent). I'll double check now and let you know what I find.
     
  46. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    I've just checked, and UFPS does indeed only support switching materials on a single renderer out of the box. If you're comfortable with code, here's a basic process for fixing this:
    • Crack open vp_FPBodyAnimator.cs
    • On about lines 174-183, change m_Renderer and Renderer from single component references to an array of references (renaming them m_Renderers and Renderers, naturally). Find your renderers with GetComponentsInChildren instead of GetComponentInChildren.
    • Throughout the rest of the file, replace any references to Renderer.materials with loops through your Renderers array.
    • Note that you will also need to change m_ThirdPersonMaterials, m_FirstPersonWithArmsMaterials, m_FirstPersonMaterials, and m_InvisiblePersonMaterials to iterate through material sets for each renderer as well.
    If this seems daunting to you, I'd recommend contacting Opsive support (https://opsive.com/assets/UFPS/help/) and requesting assistance with this. Justin's very responsive, and since making these changes would improve UFPS I imagine he'd be happy to help you out.
     
    Deckard_89 likes this.
  47. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Im actually having a similar issue with all the added armor meshes. I was planning on making a small piece of code that would change each active mesh's material also. Ill post it here and maybe ufps forum when i get around to working on it. And too my knowledge you should have arms and a complete model thats been seperated (arms body and head ) only no need for two complete bodies.
     
    Deckard_89 likes this.
  48. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    I managed to find a solution for Fuse generated characters:

    • Export as an Obj, and bake maps into 1 texture (probably need a large size, like 4096)
    • Do not rig in Mixamo straight away - import into 3ds Max (or whatever you use) & combine all meshes into 1
    • Now rig your model
    • Import this into unity & assign the baked version of the material
    • Override the max size for PC to 4096
    That should be it, this is working okay so far. The only thing is when play begins, there's a split second where the camera transitions to first person, and you see inside the characters head from the 3rd person version. I think this is more of a UFPS issue though.
     
  49. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    289
    Thanks for the workaround details!
     
  50. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello! This is a great asset and im so happy now, but then I got sad in the eye because I dont have any create preview or build fps mesh buttons :(:(:(... why?
     

    Attached Files: