Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Mantis LOD Editor Support

Discussion in 'Formats & External Tools' started by meshonline, Feb 10, 2014.

  1. M-alaham

    M-alaham

    Joined:
    Feb 13, 2018
    Posts:
    1
    I'm trying to use the online version, it works well with some models and does not work with each other!
    I was able to upload the mesh data successfully but when I move the slider appears this error
    can u help me please
     

    Attached Files:

  2. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    This error may be caused by several cases, for example, the 3d model has multiple sub-meshes, but a few sub-meshes have not been uploaded successfully, or of other unexpected cases.
    To locate the issue, you need to test with each sub-mesh separately, or use the standalone trial edition to test if it works.
     
  3. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    I have fixed the bug of 'Error with network: Generic/unknown HTTP error' in the online version.
    The latest update also brought new features: 'Protect Hard Edge' and 'Beautiful Triangles'.
     
  4. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    Just updated the product, and adjusted the price:
    The price of the subscription edition is $10 per month.
    The price of the standalone edition is $36-$42.
    The price of the standard edition is $54-$60.
    The price of the professional edition is $72-$80.
     
    schmosef likes this.
  5. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi there!

    I purchased the Pro version on the Asset Store a few days ago, and today I finally reached the part in the project where I can use it! :)

    Yet... something weird seems to be happening.
    I mean, I'm running the demo scene, and the result feels far from perfect (the bananas)

    I believe it may depends on the import settings of the mesh, because I've set an autoimporter for meshes.

    Looking at the demo you're shipping with the latest version of August, the model was imported using most of the legacy options unity has.

    Could you please have a look at the scene? I'm using these settings:



    which are pretty standard for me, but now I"m getting these errors:



    Is there a manual or some documentation?
    Or... some guidelines on which settings it's better to use?

    I'm using Unity 2019.2.5f1 targeting android, on Win10-64-pro.

    Did I miss the docs and they're already in the package?
     
  6. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    The demo project is outdated, I'll update the project, but you can re-generate the progressive mesh and override the old one, and assign it to the runtime script to fix the issue.
     
  7. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Thanks! :)

    Back to the original question:

    are there specific import settings which interfere (or, produce better results) when using Mantis Pro?
    Are there some settings which must be on, and others that have to stay switched off for it to work?

    I was looking for some documentation about it, but the only info I was able to infer was that the mesh has to be readable.

    I must surely be doing something wrong, because I was trying to decimate a curly curtain and... I'm getting weird results :oops:
     
  8. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    I don't know which import settings is the best, maybe the default settings is good enough; You need to do experiments with the settings in Mantis LOD Editor too, for there are no best settings either.
    To test the effect, you can combine the options, then drag the quality slider to observe the result in realtime.
     
  9. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    That's... an unexpected reply
    But thanks, I will keep experimenting ;)
     
  10. Xen0n

    Xen0n

    Joined:
    Feb 11, 2015
    Posts:
    2
    Hi, i love this asset but apparently there is some issue, for some reason (using pro latest version) Mantis LOD does change original mesh and i don't know why but changes are not good.
    Have a look at the video
    https://www.dropbox.com/s/ydrh5zdzjovlhsm/fVwSCESR8S.mp4?dl=0
    Just by adding LODMantis to the game object that model is changed for some reason and tree is darker which is not what we want. Why is affecting original model, any help?
     
  11. Xen0n

    Xen0n

    Joined:
    Feb 11, 2015
    Posts:
    2
    Damn developers, i updated this package and still have this problem, so this package is completely useless. It affects original mesh and breaks it, idk normals or whatever but it destroys it.
    Here is how it affects it and this stays on the original mesh even after LOD script is removed so it breaks it:


    Useless package, i am giving 1 star until is fixed. Cheers!!!
     

    Attached Files:

    Last edited: Oct 21, 2019
  12. Buka

    Buka

    Joined:
    Feb 22, 2013
    Posts:
    48
    I have the same problem and i don't know what to do, breaks the normals of original meshes when script is attached and slider is moved. Tried to recalculate normals with editor script but it doesn't fix it. Easy to reproduce, just drag mesh on the scene and use MantisLOD slider and you will see changes in the mesh. Save the scene and if you have source tree, fork or any version control you will see that original mesh is changed. Wonder why it affects original mesh, that is a big issue.
    Any solution anybody?
     
  13. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    The next version will add an option, let you select whether of no to touch the original normal, thanks for your report, please e-mail to me if you have any issues, for I can't receive notifications recently, sorry for the delay.
     
  14. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    If you want to fix it by yourself, open 'InnerMantisLODEditorStandard.cs' or 'InnerMantisLODEditorProfessional.cs' with any text editor, search all the three appearances of 'RecalculateNormals', comment the line and the next line, save the file, done.

    Like this:

    child.mesh.RecalculateNormals();
    child.mesh.RecalculateBounds();

    Change to:

    //child.mesh.RecalculateNormals();
    //child.mesh.RecalculateBounds();
     
  15. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Hi, I just purchased the standard edition and put it through a torture test right off the bat. It did great in terms of polygons on a 1.4 million poly model, which I got down to 315,000 without it looking much different in terms of detail. I bet I can get it lower by playing with the options some more, though it's really low enough already probably (it's the only mesh in the scene).

    But I ran into a problem. I wasn't getting the right lighting. Everything basically looked "unlit."

    I have the recent October 22 version with those RecalculateNormals and RecalculateBounds lines commented out as you just mentioned. I put them back in and regenerated the mesh, and now it looks perfect. So I wonder if that "fix" had an unintended consequence.
     
  16. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    I have confirmed that October 22 versions have introduced a new bug, if you generate LODs, the saved assets looks completely black in Unity 2017, but it is okay in Unity 2019, this is cause by no normals assigned, while Unity 2019 generates normals automatically, but Unity 2017 does not.

    Uncomment the two lines to recalculate normals by Unity is not a good solution, we prefer to use the original normals, it looks better than generated normals.

    I have fixed the bug, and submitted the new version.

    Please upgrade to std 5.0.4 and pro 4.0.3.

    Sorry for your inconvenience.
     
    Last edited: Nov 8, 2019
    Steve-Tack likes this.
  17. Pode

    Pode

    Joined:
    Nov 13, 2013
    Posts:
    145
    @meshonline : I have a quick question about the product. Is it possible to access the decimated mesh at runtime to pass it to a script that will export it (as a.glb, .fbx, .obj or whatever)? The exporter isn't supplied by you, of course, and is another tool/asset.
     
  18. noobynobody

    noobynobody

    Joined:
    May 9, 2019
    Posts:
    75
    Does progressive mesh work on skinned meshes?
     
  19. siberhecy

    siberhecy

    Joined:
    Aug 1, 2016
    Posts:
    21
    Hello I’d like to buy Mantis LOD Editor Professional asset from Asset Store after I try.

    I saw Trial Edition in website I just downloaded and simply opened my FBX file and here is the result.

    I only Open Mesh FBX file.
     

    Attached Files:

    • WTF.jpg
      WTF.jpg
      File size:
      169.8 KB
      Views:
      416
  20. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    Greetings... I have used mantis Pro previously with excellent results but only in a single player environment. I am now using a multiplayer environment using Mirror and whilst the progressive meshes work fine in testing when the system is set to run in Client/Server all in one environment, if you build a server and client seperately, it's a total fail :) None of the progresive meshes show up in the client. Is there a fix for multiplayer with mantis Pro as i would like to continue using it.
     
  21. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    I'm running across this error when trying to build the project for Android.

    Code (CSharp):
    1. Assets\MantisLODEditor\Runtime\ProgressiveMeshRuntime.cs(497,10): error CS0103: The name 'MeshUtility' does not exist in the current context
    2.  
    3. Assets\MantisLODEditor\Runtime\ProgressiveMeshRuntime.cs(527,10): error CS0103: The name 'MeshUtility' does not exist in the current context
    4.  
     
  22. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    It's a bug introduced into v6.2.1, I'll fix it as soon as possible.

    If you want to fix it manually, here are the steps:

    In Unity 2019 or newer version, you need to
    Replace:
    MeshUtility.Optimize(lod_meshes[lod].mesh);
    With:
    lod_meshes[lod].mesh.Optimize();

    In Unity 2018 or older version, you need to
    Delete:
    MeshUtility.Optimize(lod_meshes[lod].mesh);
     
    Last edited: May 18, 2020
  23. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    It's a bug introduced into v6.2.1, I'll fix it as soon as possible.

    If you want to fix it manually, here are the steps:

    In Unity 2019 or newer version, you need to
    Replace:
    MeshUtility.Optimize(lod_meshes[lod].mesh);
    With:
    lod_meshes[lod].mesh.Optimize();

    In Unity 2018 or older version, you need to
    Delete:
    MeshUtility.Optimize(lod_meshes[lod].mesh);
     
    schmosef likes this.
  24. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    Sorry for not mentioning which version of Unity I was using. I'm using Unity 2019 and that fix has corrected the problem. I can build the project now. Thank you.
     
  25. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    The final fix code:
    Code (CSharp):
    1. #if UNITY_EDITOR
    2.                                     MeshUtility.Optimize(lod_meshes[lod].mesh);
    3. #elif UNITY_2019_1_OR_NEWER
    4.                                     lod_meshes[lod].mesh.Optimize();
    5. #endif
    6.  
     
  26. draverik

    draverik

    Joined:
    Feb 17, 2019
    Posts:
    19
    Hello,

    I'm trying to use pro version with baked light and it dosn't work well. Here is how it looks now - pop up efect is very noticable.
     

    Attached Files:

  27. tyonicofficial

    tyonicofficial

    Joined:
    Jul 18, 2020
    Posts:
    2
    Hi i just boyght this, it says the payload is too large
     
  28. tyonicofficial

    tyonicofficial

    Joined:
    Jul 18, 2020
    Posts:
    2
    n
    and upgrade to version 5.5?
     
  29. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    The online version had retired last year.
     
  30. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    The standard edition and the professional edition are same now, you can buy either edition, you actually get the professional edition.
     
  31. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    What is the meaning of 'The payload is too large'? Thank you.
     
  32. Jimmythedog21

    Jimmythedog21

    Joined:
    Sep 1, 2020
    Posts:
    1
    I'm trying to add mantis as a component to my avatar, I have imported the free version but when I try to add mantis it doesn't appear in the list of components.
     
  33. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Does anybody have experience with using ProgressiveMeshRuntime instead of Unity's LOD groups in terms of performance? I've just started with Mantis and not sure what would be the right approach for me. Having about 50 characters on screen, few of them DAZ characters with 100 blendshapes on several meshes.
    To produce standalone LODs for Unity system I would need to write some automation script, so using ProgressiveMeshRuntime is tempting. However, I don't want to lose FPS or prolong loading times / introducing lags.
     
    Last edited: Nov 29, 2020
  34. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    If you want to get best performance, please use Unity LOD groups instead of progressive mesh runtime, the runtime will build LODs at runtime when starting the runtime, so it may cause time delay.
     
    Michal_Stangel likes this.
  35. Augis1980

    Augis1980

    Joined:
    Sep 23, 2014
    Posts:
    48
    Hi, progressive mesh runtime breaks UV's when decimating model, so it is not usable with baked lightmaps, is it possible to have UV's in place? Or lock UV boundaries while generating the Progressive Asset?
     
  36. PKillusion1

    PKillusion1

    Joined:
    Apr 30, 2020
    Posts:
    1
    I'm seeing a lot of posts mentioning a free online version, but I can't seem to find it. Anybody have a link?
     
  37. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    The free online version had retired, since the prices of the paid versions are much cheaper now.
     
  38. swProdBdk

    swProdBdk

    Joined:
    Apr 22, 2020
    Posts:
    10
    Is there some way I can and set the values of MantisLODEditorProfessional (like Quality, all the booleans etc.) in an editor script? I'm making a tool / automating for my model pipeline. I want to add Mantis Lod Editor Professional to my prefab --> Save Current Mesh, at 3 different Qualities levels.
    I figured to add the mantis lod component, but I don't see any access points or any methods I can reach.
     
  39. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    You can modify 'InnerMantisLODEditorProfessional.cs', the 'Quality', all the booleans etc. are private variables, you can change them to public variables, then you can set their values from outside.
     
  40. DiegoLg

    DiegoLg

    Joined:
    Jan 13, 2020
    Posts:
    1
    Hi! LOD Mantis is available on runtime??? There is an example anywhere?

    Thanks in advance!
     
  41. swProdBdk

    swProdBdk

    Joined:
    Apr 22, 2020
    Posts:
    10
    Sure, I can make them public, but from the MantisLODEditorProfessional component I'm am still not able to access those as they are not part of the MantisLODEditorProfessional component. They are located in the InnerMantisLODEditorProfessional" class.

    var mantisComp = myGameObject.AddComponent<MantisLODEditorProfessional >

    Then here is want to access the values and use the mantisLOD functions. But I can't. Making them public doesn't help me much further sorry :)
     
  42. swProdBdk

    swProdBdk

    Joined:
    Apr 22, 2020
    Posts:
    10
    Another thing/question: How come I get different decimation results from pasting in values and from dragging to a value?

    Here I add the MantisLODEditorProfessional component. Then I paste in a low value like 5 or 10.
    upload_2021-1-26_18-17-47.png

    Starting over; This time I drag to a value of 10 (10.2);
    upload_2021-1-26_18-22-39.png
    Now that i have dragged. It actually reach this amount of triangles already at 26% quality. Hence it has determined some kind of "Lowest limit"? Actually now if I paste in 10 after doing this I cannot get the result from above.

    I'm a little curious about what is going on. And I think it i would be nice to know in order to really use the tool to its full potential :). Can you elaborate a little on this?
     
  43. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Hi @meshonline
    First off thanks for the asset. Still the best mesh decimator on the store :)

    That problem with original meshes being affected by the Mantis LOD Editor component is still an issue (using the latest version from the asset store, v6.3 on Unity 2019.4.15). I highly recommend anyone using this asset to have version control in place. It will allow you to restore those originals after the decimated meshes have been generated.

    My main request is for a function to allow parts of a mesh to retain more polys than others. Your website mentions this in the FAQ:

    Q: How to keep more details of some body parts of the charactor?
    You can separate the body parts from the body as new meshes, optimize the body parts with different qualities.

    but that isn't an ideal solution (after decimation the separated parts may not line up properly when recombined. (and the process is laborious)

    Any chance of you using the same idea as your (inferior) competitor [another mesh simplifier by ultimate game tools] and use a 'sphere of influence' where you can place gizmos over the mesh that mark those vertices as being more or less important?
     
  44. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    If you want to restore the original state, you need to click on an empty space in the scene to make it lose focus of the current object.

    I had studied the tool by the ultimate game tools team, the best method is painting weight on vertices, but it's difficult to implement the weight painting in Unity, so I did not do anything before.

    I'll see if it is possible to implement it when I have time.
     
    jeromeWork likes this.
  45. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    If you uncheck 'Protect Boundary', you can simply the models more:)
     
  46. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Would be awesome and really would make a huge difference to the usability of this tool. Thanks
     
  47. swProdBdk

    swProdBdk

    Joined:
    Apr 22, 2020
    Posts:
    10
    Actually, it is because I made an editor script to batch process and produce LODs for all models in specific work folders in my project. I thought I could just set this quality value (as when you paste in a value), but then I get those weird results where boundaries are not protected, but when I in a coroutine slowly decrease the quality level, then the boundaries are protected, (simulating the dragging to a value). And I don't understand why?
     
  48. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    Credit where credit's due! Thanks for getting this implemented so quickly. Just saw the update, not had a chance to try it out yet but I'm well excited :) Thank you
     
  49. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
  50. meshonline

    meshonline

    Joined:
    Feb 7, 2014
    Posts:
    121
    It should work, for the plug-in has multiple working modes, you can use the standard mode to generate LOD assets one level by one level manually, save them as separate LOD assets, then use Unity's built-in LOD system, details refer to The standard edition tutorial..