Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

FPS Mesh Tool

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

  1. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Thanks for the info. I'll check with Opsive and see what they have to say.
     
  2. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Thanks for the info. I'll check with @opsive and see what they have to say.
     
  3. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    I had a chat with Opsive and have uploaded a new version of FPS Mesh Tool that should resolve your issue. If you don't want to wait for the asset store approval process to complete, you can send your FPS Mesh Tool invoice number to support@codebison.ca and I'll be happy to send you the updated version.

    Cheers!
     
    hengeworks likes this.
  4. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Yeah I really should do something about that. Thanks for bringing this to my attention.
     
  5. hengeworks

    hengeworks

    Joined:
    Oct 3, 2016
    Posts:
    11
    Awesome, this works for me! Thanks so much!
     
    CodeBison likes this.
  6. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Awesome, glad it sorted things out for you!
     
  7. Elton9996

    Elton9996

    Joined:
    Oct 29, 2013
    Posts:
    1
    the InvisibleMaterial is pink for me in my URP project. the InvisibleMaterialNoShadows works fine and the InvisibleMaterial in a standard project works fine. I upgraded my project materials to URP materials and its still pink. how can i fix this?
     
  8. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Hi Elton,

    Thanks for your question. I sent you an invisible URP material I whipped up in Shader Graph. It should do the trick for you while I work on a properly optimized version to include in the package.

    (I've also attached the material here in case it's useful to anyone else in the short term.)

    Cheers!
     

    Attached Files:

  9. andrew_unity628

    andrew_unity628

    Joined:
    Apr 1, 2020
    Posts:
    9
  10. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    FPS Mesh Tool isn't compatible with UMA's runtime components. UMA characters saved to prefabs via Power Tools should work though. If you try it and find out it doesn't work for your use case, I'm happy to refund your purchase.

    As for the exception you mentioned in your email, I'll check with Opsive to see if there's an API change on their end that will require changes.

    Cheers!
     
  11. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    That's an odd one. I don't see anything in there that's obviously related to FPS Mesh Tool, but you might find it helpful to reset your layout via Window -> Layouts.

    If that doesn't work to resolve things, you might find useful information here or here, though as always be careful when following advice you get on the Internet. ;)
     
  12. corb555

    corb555

    Joined:
    Apr 27, 2013
    Posts:
    13
    Issue resolved by switching to an LTS version of Unity.
     
  13. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Cool, glad you got it sorted! :)
     
  14. Steinvorth

    Steinvorth

    Joined:
    Feb 1, 2021
    Posts:
    3
    Hey, I was wondering if someone knew how to fix this error with the FPS mesh integration with the Opsive UFPS asset. I am getting this error, when I import the integration, and also when I try to attach the script to the Character. Any ideas of what may be causing it? OPSIVE.png opsive2.png
     
  15. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    The UCCFPSMaterialController component doesn't need to be put in any of those slots. It just needs to be on your character (generally on the root transform). It listens for first/third person perspective switch messages UCC sends when you switch between first and third person. You'll want to follow the standard UCC item setup procedures, with the only difference being you don't add the head and arms as third person objects. UCCFPSMaterialController handles that part for you.

    The overall process is:
    • Get the weapon set up in UCC without the UCCFPSMaterialController at all. Following standard UCC procedures should get you to the point where your weapon is toggling visibility properly but you still have your third person head/arms visible in first person. Once you get to this point, you're ready for the integration:
    • Add UCCFPSMaterialController to the root of your character, and make sure it has the correct body parts selected (so it knows which parts are hands/arms/etc - see the documentation for details). Your head/arms should now turn on and off properly.
     
  16. Steinvorth

    Steinvorth

    Joined:
    Feb 1, 2021
    Posts:
    3
    I have been going crazy because of this, thank you so much!
     
  17. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    :)
     
  18. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    @CodeBison I've imported the UCC integration package with UFPS and I receive the following compiler error:

    Assets\CBG\FPSMeshTool_Integrations\Scripts\UCC\UCCFPSMaterialController.cs(27,108): error CS0234: The type or namespace name 'Character' does not exist in the namespace 'Opsive.UltimateCharacterController.ThirdPersonController' (are you missing an assembly reference?)

    I have the latest FPS Mesh Tool 1.2.12 and UFPS 2.3.1 and Unity 2019.4.20f1
     
  19. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    You don't need UCC integration if you're only using UFPS. You only need runtime material changing if you have both first and third person. So you can just delete the integration files and you'll be good to go.
     
    magique likes this.
  20. Mancu37

    Mancu37

    Joined:
    Nov 17, 2015
    Posts:
    7
    Hello, It seems that the integration (UCCFPSMaterialController) with Opsive UCC is not working with a mirror. See the image below. It works fine in a game without a mirror. In the last version of Opsive UCC, they added mirror compatibility for both view First and Third Person. Could you add that compatibility with your component?. Or do you know if there is a workaround for this?

    This a model that I've created with FPS Mesh Tool

    upload_2021-4-26_22-52-36.png

    I've tried with Nolan (Opsive Character) in my scene and the mirror compatibility works as expected see the image below

    upload_2021-4-26_22-59-7.png


    Thanks in advance,
    Martin
     
  21. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    I'm not sure how they're handling mirror support in UCC. A quick glance at their documentation here gives me the impression they're using a second camera and swapping materials out between cameras. I can take a look at it this weekend and see if there's a sensible way to tie into their systems. I'll let you know how it goes.
     
    Mancu37 likes this.
  22. Mancu37

    Mancu37

    Joined:
    Nov 17, 2015
    Posts:
    7
    Yes, they are using another camera that it has a script called Mirror.cs, also the first person and third person cameras have other script called MaterialSwapper.cs, I believe they are working together. If you can find a way to make it works that would be awesome!. I'll be wait your response.

    Thanks!,
    Martin
     
  23. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Hi Martin,

    I've been in touch with Justin at Opsive, and I hacked together a quick version of FPS Mesh Tool support for mirrors etc. The good news is that it will work. It's just going to take a little bit to get a solid solution instead of a dirty hack - I want to make sure the implementation I go with doesn't cause problems for anyone down the line. I'm working with Justin to make sure it's implemented in a way that's well-aligned with the overall architecture of UCC. I'll keep you updated.

    Cheers!
     
  24. Mancu37

    Mancu37

    Joined:
    Nov 17, 2015
    Posts:
    7
    Awesome!, thanks so much for your help on this. I'll be waiting that solution.

    Cheers!
     
  25. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    326
    Hi i need some help getting my mesh to split correctly
    . the mesh im using had lods and it seems to split the parts correctly in scene but when i process the mesh its still only one mesh and not split into parts any ideas
     

    Attached Files:

  26. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    326
    I have quickly ran a test witch a different model (robot kyle) that is shown seperated correctly in the Asset store screenshots and still it does not seperate after building fps mesh, still only a single mesh.
     

    Attached Files:

  27. Aaron2348

    Aaron2348

    Joined:
    Dec 12, 2016
    Posts:
    326
    I reimported the asset and realized there ware these warnings, so maybe that could be the issue?
    bandicam 2021-05-08 01-59-00-551.png
     
  28. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Hi,

    By default, FPS Mesh tool splits your mesh into multiple submeshes based on body parts. You'll see this reflected as multiple material slots in the inspector, which will allow you to selectively turn different parts of your model invisible. It will still all be one model, however. Here's what this looks like:


    If you're aiming to completely separate your mesh into different pieces (IE, a mesh that is only arms or something similar), you can do that by unticking "include all" in the FPS Mesh Tool window. That will give you the ability to choose which body parts to keep. You can find more details about this in the FPS Mesh Tool documentation, under "Choose What To Include In Final Mesh"

    Hopefully this gives you the info you need to get the results you want with your character. If not, or if there's anything else I can do to help, please let me know.

    Oh, and those warnings are safe to ignore.

    Cheers!
     
  29. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Just wanted to give you a quick update. Support for this feature will require an update on the UCC side, as well as an update on the FPS Mesh Tool side. When the next version of UCC comes out with the required changes, I'll be releasing an updated version of FPS Mesh Tool as well, and you'll have full mirror support at that point.

    Cheers!
     
  30. Mancu37

    Mancu37

    Joined:
    Nov 17, 2015
    Posts:
    7
    Great!, thanks so much!, I'm making an horror game and mirrors are really needed.

    Thanks again for your help!
    Martin
     
  31. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    If I use the invisible material that casts shadow my character's parts are still kind visible, how do I fix this?

     
  32. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    I'm not sure exactly what you mean. If you're talking about the orange outline in the left pane, that looks a lot like Unity's object selection outline. You should only see that in scene view, for selected objects. If you select something else in your scene hierarchy, that should go away.

    If you're talking about something else, or if deselecting your player character doesn't clear this up, please let me know so I can help you out.

    Cheers!
     
  33. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    After another look I think I know what you're talking about. There's definitely some weird stuff going on with the shadows there. I've been able to duplicate this locally. I never noticed it before because it's only visible when there's a solid object directly behind the invisible part of the character. I'll investigate and let you know what I find.
     
  34. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Okay, I figured out what happened. It looks like the InvisibleMaterial is using the wrong shader. It's using the URP version of the invisible shadowcasting shader, which doesn't work properly with forward rendering. I'll be pushing an update to the package to fix this going forward, but you should be able to resolve this issue in the meantime by following these steps:
    • Select the InvisibleMaterial asset in the project hierarchy
    • At the top of the inspector for the material, select the shader dropdown and select Transparent -> Invisible Shadow Caster
    The invisible material should stop misbehaving as soon as you've made this change. Please let me know if not, or if there's anything else I can do to help.

    Thanks for letting me know about this so I could fix it.

    Cheers!
     
    Last edited: Jun 10, 2021
    Setmaster likes this.
  35. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    Just wanted to notify of this warning in Unity 2021.1.2f1

    Assets\CBG\FPSMeshTool\Editor\FPSMeshToolWindow.cs(594,117): warning CS0618: 'ReplacePrefabOptions' is obsolete: 'This has turned into the more explicit APIs, SavePrefabAsset, SaveAsPrefabAsset, SaveAsPrefabAssetAndConnect'

     
    CodeBison likes this.
  36. Mancu37

    Mancu37

    Joined:
    Nov 17, 2015
    Posts:
    7
    Hey there!, Opsive released the new version of UCC (https://opsive.com/news/ultimate-character-controller-2-3-3-released/) let me know when you are going to release the new version with full mirror support.

    Thanks in advance,
    Martin
     
  37. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
  38. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    I've submitted v1.2.15 to the Asset Store, which adds support for the UCC mirror system. Approval can take a few days, but if you don't want to wait for that you can send your FPS Mesh Tool invoice number to support@codebison.ca and I'll be happy to send you the updated version.

    Cheers!
     
  39. Thanatos_Psychopomp

    Thanatos_Psychopomp

    Joined:
    Mar 16, 2018
    Posts:
    8
    Hello @CodeBison! Loving the tool so far! However in UCC 2.3.4 (latest) and Unity 2020.3.11f1 I am getting the errors below after importing the UCC integration. Any help to get past this would be appreciated.

    Assets\CBG\FPSMeshTool_Integrations\Scripts\UCC\UCCFPSMaterialController.cs(72,25): error CS1061: 'MaterialSwapper' does not contain a definition for 'OnEnableFirstPersonMaterials' and no accessible extension method 'OnEnableFirstPersonMaterials' accepting a first argument of type 'MaterialSwapper' could be found (are you missing a using directive or an assembly reference?)

    Assets\CBG\FPSMeshTool_Integrations\Scripts\UCC\UCCFPSMaterialController.cs(73,25): error CS1061: 'MaterialSwapper' does not contain a definition for 'OnEnableThirdPersonMaterials' and no accessible extension method 'OnEnableThirdPersonMaterials' accepting a first argument of type 'MaterialSwapper' could be found (are you missing a using directive or an assembly reference?)
     
  40. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    I've just imported UCC 2.3.4 to check, and don't see any changes to MaterialSwapper. Both those properties are still there. Is there another class named MaterialSwapper in your project? Or did you maybe upgrade from an older version of UCC? Perhaps there's an old duplicate of UCC's MaterialSwapper somewhere? The version that comes with 2.3.4 should be in:
    Assets\Opsive\UltimateCharacterController\Scripts\FirstPersonController\Camera

    If you have a second copy elsewhere from an older version, you'll need to delete it. If in doubt, you can delete all copies of MaterialSwapper and then reimport UCC.

    If this isn't your issue, commenting out those two lines of UCCFPSMaterialController (72, 73) will get you up and running in the short term, though it will break mirror support until we figure out the problem.
     
    Thanatos_Psychopomp likes this.
  41. Thanatos_Psychopomp

    Thanatos_Psychopomp

    Joined:
    Mar 16, 2018
    Posts:
    8
    Sadly i do not have any conflicts and the only MaterialSwapper resides here -> Assets\Opsive\UltimateCharacterController\Scripts\FirstPersonController\Camera.

    I have commented out those lines of code for now. If you find anything out please let me know!
     
  42. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    That's really weird. After you updated to UCC 2.3.4 did you import the UltimateCharacterController2.3.4 asset by double-clicking on it? If you didn't do that step, I could see that causing these errors.

    If you've already imported the file, it'd be worth forcing it to reimport that one file. To do that, you can:
    • Make sure your project is backed up
    • Delete MaterialSwapper
    • Reimport the UltimateCharacterController2.3.4 asset by double clicking on it
      • The MaterialSwapper.cs file should should as New in the import wizard
    Can you give that a try and let me know how it goes?
     
    Thanatos_Psychopomp likes this.
  43. Thanatos_Psychopomp

    Thanatos_Psychopomp

    Joined:
    Mar 16, 2018
    Posts:
    8
    Thank you! Re-Importing the 2.3.4 package resolved that issue for me and I was able to uncomment the code again. Introduced about 180 new opsive issues but that shouldnt be a problem lol. Thanks again for your help with that!
     
  44. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Glad that worked for you! Good luck sorting out your remaining errors. :)
     
  45. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    139
    Hi. I just updated FPS Mesh Tool and it throws me 2 compile errors:

    Code (CSharp):
    1. Assets\CBG\FPSMeshTool\Scripts\Runtime Components\BodyPartHider.cs(41,28): error CS1061: 'FPSMaterialController' does not contain a definition for 'ShowBodyPart' and no accessible extension method 'ShowBodyPart' accepting a first argument of type 'FPSMaterialController' could be found (are you missing a using directive or an assembly reference?)
    Code (CSharp):
    1. Assets\CBG\FPSMeshTool\Scripts\Runtime Components\BodyPartHider.cs(48,28): error CS1061: 'FPSMaterialController' does not contain a definition for 'HideBodyPart' and no accessible extension method 'HideBodyPart' accepting a first argument of type 'FPSMaterialController' could be found (are you missing a using directive or an assembly reference?)
     
  46. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Hi,

    That file isn't part of the latest version of FPS Mesh Tool. You can delete BodyPartHider without causing any problems, or alternately just delete the CBG folder and reimport FPS Mesh Tool. Either will do the trick.

    Cheers!
     
  47. ciathyza

    ciathyza

    Joined:
    Aug 16, 2015
    Posts:
    108
    Hello, are there any HDRP shaders for this tool? My character is fully magenta after clicking Preview and I cannot see where the groups are divided.
     
  48. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    287
    Hi,

    You can convert the preview materials to be compatible with HDRP using the standard Unity material conversion workflow:
    • Select the FPS Mesh Tool preview materials (in CBG/FPSMeshTool/Resources/FPSMeshMaterials)
    • Click Edit -> Rendering -> Materials -> Convert Selected Built-in Materials to HDRP
    Alternately, you could just convert all project materials by choosing Convert All Built-in Materials instead, but that would affect more than just the FPS Mesh Tool materials, so it's not necessary in this case.

    Please let me know if there's anything else I can do to help!

    Cheers
     
    DrMeatball likes this.
  49. ciathyza

    ciathyza

    Joined:
    Aug 16, 2015
    Posts:
    108
    Alright, thanks! I had the impression the asset used custom shaders.
     
    CodeBison likes this.
  50. JMab

    JMab

    Joined:
    Nov 29, 2013
    Posts:
    24
    I know UMA constantly brought up in this thread, but I was wondering if anyone had tried the FPS Mesh Tool with the newer versions of UMA that now build the avatars at edit time, so you have a skinned mesh renderer/visible avatar now prior to hitting play?