Search Unity

SimpleLOD user support thread

Discussion in 'Assets and Asset Store' started by Orbcreation, Nov 25, 2014.

  1. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    After changing scale of model to 1 to make it bigger. A have problem of holes after simplyfing mesh (With very carefull compression I can create it without holes, but it's too low compression..., with compression on 1 it created holes too, but with 2 they are more apparent for screenshot):
     
  2. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    Hi @Orbcreation,

    I just stumbled upon this Tool and would like to know how it would go with Xfrog trees? I posted this thread a couple months ago and got no love http://forum.unity3d.com/threads/xfrog-tree-usage.361650/

    A tree, as in the picture is 187,000 tris, I was looking at Custom Tree Importer but it requires the models be simplified and organised before hand in a 3d modelling app (I won't be able to do this)

    and would like to use AFS as well but can't so i am running these trees without LOD or billboard (or wind) :(

    So i would like to know if you have or can try out one of the Xfrog Trees and share the results? There are free sample you can download from their site to try out.. or contact me and we can talk. What i noticed is the model is not organised in any logical way, like a bunch of leaves are part of a mesh that have the roots, and another bunch of leaves might be part of the main trunk.

    I have over 300 trees so i could really use some help!

    here is a wireframe view of the same tree in my thread... crazy huh?

    upload_2015-11-13_20-58-42.png
     
  3. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    @camel82106 Can you mail me your model, so I can have a look? You probably don't have a uv map for the rim where the holes appear. Uv maps are heavily used by the decimator and without them, it is almost helpless in the world of triangles
    @ZenMicro Have you tried importing a tree and running SimpleLOD on it yet?
     
    Teila likes this.
  4. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    No i have yet to purchase SimpleLOD, i will though i am pretty sure as mentioned i have a vehicle that has hundreds of parts some of which are completely unnecessary, like a door that has a strip of metal around the outside giving it depth should be all one for the door skin. Just been busy with coding other stuff, just thought you might be able to know upfront if the tree will work.. i think it will on the trunk and branches but then there are the leaf quads - many, many leaf quads!

    Can I ask, while SimpleLOD can merge meshes, does it have the ability to separate meshes? As in the tree wireframe pics in my thread about it - some grouping is not helpful for trying to get a hierarchy in place that Custom Tree Importer can use to get the tree in as a Unity Tree.

    Also could all these quad leaves be made as one mesh? if so there may be an issue still with the fact the model is made of say 3 mesh groups already but the root stock is also paired with a bunch of leaves.. probably done this way as a form of obfuscation for identification if a tree was used without a licence they could identify these things - i can't see any other logical reason for this grouping.
     
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Purchase it, you will not be sorry. This is a great product.

    Using an LOD system on a 187,000 tris object is going to be difficult and the results will probably not be what you want. Unity has a vertex limit of 64k, well below your model's specs. A 64k tree is absolutely unusable in a game. What you want is more like 15k, and if you try to get this tree down to that size, you will have a mess that won't even look like your tree anymore.

    My Speedtrees are about 12k for LOD0, the highest poly LOD. My lowest are about 3k. They look very good and I get good performance. Still, my fps drops in heavily forested areas. Speedtree also provides billboards. You will have to make your own billboards if you can get this to work for you. There may be some tools on the asset store that can help you but SimpleLOD does not make billboards.

    I see you want to separate the parts of the tree. You need to do that in a 3d modeling program, like Blender. You cannot do that in Unity.

    Merging does not lower the polys/tris. Merging does help reduce draw calls since you have one mesh, rather than many. But it does nothing to help with the 187k tris that won't even go into Unity at all. :) You can't even put it in Unity to use SimpleLOD.

    I read somewhere that XFrog has a decimator. I would look at that first.

    If you can get it down to 30k, you could try SimpleLOD on it....OrbCreation may be able to tell you if 64k would work.

    I am so sorry you spent so much money on 300 trees. They are made for renders, not for using in games. I will admit they look nice though.

    Sorry for butting in, but I feel for those who spend money on stuff that may not work in their game. Makes me sad.
     
    twobob and hopeful like this.
  6. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    I just purchased SimpleLOD and am excited to see if i can get my game as it stands down in resources as it currently has a vehicle and trees that are not game ready.

    However these errors appeared upon import... do i need to change something? I haven't yet tried to use it, thought i better get these errors sorted first.

    upload_2015-11-20_19-34-44.png

    Here's to a speedy reply from someone (sorry if it have already been addressed in the forum)

    EDIT: I just clicked clear and got on with it.. no impact that i have noticed, but just a heads up Orb.
     
    Last edited: Nov 20, 2015
  7. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206

    Hi @Teila, (must remember to use the @User thingy :))

    I actually already have them in Unity...You've seen them in screenshots but I know they are way high. I bought SimpleLOD now and have started on my van which has like 4000 tris just on a single door, at least i know SimpleLOD can help with them!

    I'll see what i can do with the trees later.. I do expect to need to write my own billboard solution.

    Xfrog is releasing a Unity pack soon which i am somewhat involved with (or will be for testing etc), I don't think that all my trees (being specific to Australia) if any will make into the first pack.. but it's a good sign. I will still look into my existing trees unless a bunch of my required trees land in my lap :)

    I appreciate your input in any case.. I didn't realize that post was for me until just now by accident btw.

    EDIT: I just realized, i think Unity did the splitting of the trees in the unintuitive way and split them into multiple meshes.. in some cases 5 parts for one tree.

    Oh and don't be sad :), I love the trees and think one way or another iI will find a way to use some as a 'hero' tree here and there at the very least... and thinking about how hardware grows in power exponentially, maybe if 5 years my assets will be standard haha.
     
    Last edited: Nov 21, 2015
    Teila likes this.
  8. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    I have tried now simplifying it's meshes (of my trees) and creating LODs as well. it is helping somewhat, and even at LOD0 i think removing some of the tiny branches in the tops of the tree is ok as you likely to be on the ground looking elsewhere anyway.

    One big issue i have had is that when i create LODs the first one is invisible or deleted.. not sure, but as i zoom out the rest look as you might expect AND what Unity LODGorup component is saying does not match what is being shown in the scene.

    I tried this on a car door as well and the LOD0 is gone... my settings are pretty standard i think, setting 1 for LOD 1, 2 for LOD 2, note that in this case (the images) i had only the door skin selected.

    upload_2015-11-21_18-31-23.png

    So firstly it appears it can't do much for reduction (none) on this particular mesh and it's pretty low anyway but I've found that as a pattern.. for example a high-poly cylinder i would have thought could be reduced to a square box pipe if you know what i mean. I have a particular mesh that is 20,000 tris and SimpleLOD just does not seem to be able to do any reduction on it... I tried scaling up to 100 and executing the mesh simplification then but it doesn't seem to help.

    In any case as soon as I click that message away, my door is gone. And for a tree sub-mesh i got the same behavior.

    What I also want to do is manually select a LOD and then decide to hide the door handle for example, what is the work flow for manually working on a LOD at a time? The options seem to only be for 0-1, 0-2 etc.. do i just need to do 0-1 one each as i go each time working with the reduced mesh as the next LOD and manually naming etc? would i need to make a copy of each first?, and do the other parts separate? I have a lot of detailed objects that i need to switch off at range and i also can't merge too many more meshes as i require access to them individually (like the glass windows etc)

    So say i want LOD0 (which is full detail right?) have the current mesh groups, but make LOD1 say have them combined (as you can't interact with them at a distance and it will reduce draw calls) and then LOD2 hide some of them etc... just do them separately and set them up in the LODGroup Component manually? I am really new to creating or working with LOD i have to say so bear with me :)


    upload_2015-11-21_18-33-25.png

    Can i also make a few suggestions?, a couple of things, In the popup message can you show the before and after poly count so you get a good idea of the effectiveness of that run and maybe even show a % for it's reduction success, also if any details were removed can that be mentioned as well? I did a reduction on something and only later realized an important part was missing so I had to revert to an earlier version etc.. a bit of work in that.

    To the suggestion I had in mind... add a separate slider for the Simplify mesh button.. currently you use LOD1 but then it affects all your settings, I know it's just a UI thing but it bugs me, would like that function to have it's own slider guess. All up to you. I also think there is no Undo for making LODs, is that right? would like to feel safe in any step I take.

    Another idea is your tool , if it could report on Tris and Vertices (of any selected mesh) when clicking a button.. that would be really cool... what do you think? I think if you built in these extra features your product could be raised in price to $45 for example... but I would want to see that it could reduce poly's more in some cases as it seems to only be able to delete it and not reduce it in some cases.. just my thoughts, I know mesh decimation is complex. I'm happy to provide you the models i am working on for testing.

    upload_2015-11-21_18-37-26.png

    I am using the 3c setting as i like the LODGroup component Unity provides. What is with the naming of the LOD as well? can I rename to something clean like _LOD0 etc? i guess so as they are just separate meshes now. maybe you could add the naming convention as a drop down or text field.. again just ideas.

    Appreciate your help! @Orbcreation

    Also just so you know i am pleased with the mesh merging function which is the main thing I spent several hours on last night organizing and simplifying this vehicle models hundreds of groups and meshes all names just with numbers! argh.. nice work, I now have a model a little closer to human usable :p!

    EDIT2: I know i'm probably asking a lot, but it might be something to consider for added features! I discovered this stupid thing that I want to delete.. but as I've merged many a different set of meshes it's too late i think... Is there already or could there be a way to select parts of a merged mesh and delete them?

    upload_2015-11-21_20-35-42.png
     
    Last edited: Nov 21, 2015
  9. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    Wow, that is a big post. i haven't read it completely yet. I am very busy at the moment and as I am typing this people are already calling me over.
    Very quickly: I saw something about LOD 0 disappearing. You are probably using the LODGroup instead of LODSwitcher. There was a bug that caused LOD0 not to be saved. It has been fixed in the latest release.

    But I will read the rest of your post asap.
     
  10. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    Yeah i had a few things to say.. part problem, part positive feedback, part ideas, part other.

    Mainly my suggestion/thoughts were if SimpleLOD provided a bit more info and perhaps it could do a run through then report what 'small details' it found and you could choose to keep or scrap... just a thought. sorry to take too much of your time.

    Anyways.. so there is a new Update to SimpleLOD? newer than 1.5e? is it in the hands of Unity reviewers atm?
     
  11. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    @ZenMicro First, let me advise you to use the LODSwitcher component instead of the overly complex LODGroup. Since you say you are not an experienced user, better start with the easy way to do this. LODGroup has a hierarchy of LOD gameObjects under the parent, that clogs up your editor. I personally find that rather annoying. Also beware that I recently found an error that causes the child objects to have wrong positions after being added to the LODGroup. You need to set the local position ans rotation to zero and the local scale to 1.

    Does it have UV coordinates? If not that is probably why reduction goes so poorly. If it does have UV coordinates, can you mail me this mesh?

    This is very likely due to the error that existed in version 1.5c. Simply update your version and LOD0 should still be there. Another possibility is that the scale of your mesh is very small and you have the remove small parts slider set high. In that case it removes parts that are smaller than a certain size.
    LOD0 should be your original model

    If you want to remove specific parts in certain LOD levels, you can use the "Remove a submesh" option. Or, if the door handle is not a submesh, you can use the "Remove small parts" slider.

    The decimation levels affect eachother because LOD2 needs to have a higher compression level than LOD1 for anything to happen.

    No undo, but there is the Backup / Revert button at the top of the panel.

    LODGroup requires complete GameObjects for each LOD level, not just LOD meshes. You can rename to anything you like. The only reason the names change is because I don't want to accidentally create any gameObjects with identical names

    If these numbers are in a separate submesh (have their own material) you can use the "Remove a submesh" tool. You can not select specific vertices and delete them. For that you'd have to export it (with another package from the assetstore), import it in a 3D editor and do whatever you want to do there.
     
  12. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    I tested the LODGroup option 3c a bit and see what you meannow. LOD0 should be the original gameObject, but that is not set as a child and it is deactivated.
    So I changed the code a bit. It now makes a copy of the original gameObject, renames it to <originalname>_$Lod:0, and deactivates the original. Sorry about that. The confusion was caused by a much earlier bug that has been fixed where the LOD mesh was not saved in the project folder.

    If you send me your email address in a private message, I will mail you the updated version. It will also be included in the upcoming version 1.5f
     
    hopeful likes this.
  13. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    Hi OrbCreation,

    Thanks for taking the time to reply, I received your email with one updated file which i replaced as per your instructions. But haven't noticed any difference.

    I did another 3c option (yes i know you recommended the other) but I have other models that are using LODGroup and I would like to work with the feature Unity supplies, the separate objects is good for having greater control I think, however I tried to do a LOD generation again and LOD0 was moved to 0,0,0 is this something you'll be fixing? it basically means it would be a real pain to try and use 3c as you'd have to write down the details to restore it after... look forward to a patch for this.

    The LODs were moved to the root of my hierarchy from where they were nested within the model tree.

    What I also want to do is manually select a LOD and then decide to hide the door handle for example, what is the work flow for manually working on a LOD at a time?
    If you want to remove specific parts in certain LOD levels, you can use the "Remove a submesh" option. Or, if the door handle is not a submesh, you can use the "Remove small parts" slider.


    They are seperate meshes (the handles etc) would i be right in guessing a LOD is a always a single mesh? I'm not sure but if i had the LODs in LODGroup format I could just delete or disable them at lower LODs. (The models i have use LODGroup but are simple objects so are single meshes per LOD) but for an entire vehicle can't be.. maybe only for LOD2, 3 or 4? - I know this may be a more general question then.

    It's a little hard to work with such a complicated model! Like in the image in the previous post of the hierarchy for a door... only the deepest objects are meshes (already combined from pieces)... so it's this i don't fully sure if i need to create LODs for each set individually, but most likely.
     
  14. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    When you use option 3c: Each LOD level will be a gameObject that is nested underneath a common parent. The common parent will have the same position, rotation and scale as the original gameObject. And since the new LOD objects are its children and need to appear in the same location, they will have localPosition 0,0,0. This is not something I will change, because it is the only way to make the LOD's automatically appear in the exact same location as the original.

    An LOD level can be many things. You can have a decimated mesh for it, use different materials, have parts removed, have scripts disabled or run on lower priorities, whatever you want. What SimpleLOD does is create decimated meshes for them.
    The reason it has an option to merge meshes together and bake atlases is because letting the graphics card render 1 complex mesh is usually much faster than having it render a dozen smaller meshes.

    merging meshes, removing small parts, etc. is generally the first step when you use SimpleLOD. After the meshes are merged into one (or 2 or 3 when you have moving parts) it is easier to generate the LOD levels.

    When you use option 3a, all you get is a decimated mesh per LOD level. There will be a LODSwitcher component, that replaces the mesh in the gameObject depending on the LOD level to show. Simple, easy and clean.

    Option 3b goes a little bit further. Here you can have different gameObjects for each LOD level. These gameObjects can be changed in any way you like to further increase your performance (like using different materials, with less demanding shaders, etc)

    Option 3c is basically the same as 3b, but it uses Unity's own LODGroup instead of LODSwitcher.

    Starting off with very complex models may not be the best way to learn about LOD levels, game hierarchy, materials and many other things. Why don't you experiment a little in a different project with some simple models first.
     
  15. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    I understand your point about working in a safe environment of another scene or project. But my concern is (and i still do not get it) is that I select a part (lets say the steering wheel) it is a separate mesh as it needs to rotate independently, it is in the correct place in relation to the rest of the vehicle already - there no desire to move it to some other position obviously, only allow a rotation on an arbitrary axis in code later.

    I run 3c option and LOD0 - the original wheel (or copy) has been teleported to 0,0,0 which is useless, the other parts however have not.

    I cannot see how you say this is normal and will not be 'fixed'. If i select a part in place, i would expect that created LODs would have them ALL placed where they were transform-wise as they are after all representations of the same model.

    So for whatever reason a part is moved to 0,0,0 for processing it must be placed back where it came from. That's all i'm saying.

    So it seems to me either you are saying i need to create a Parent GameObject first and make it a child before i carry out the 3c procedure or there is something else going one... like i say the LOD0 is moving to 0,0,0 not the other LODs.

    Do you think making an automatic creation of a parent object with the original mesh, then carry out the procedure will resolve it? If so then i think that is a easy code fix for you to do... If it lies upon the user to do so then OK, but that feels a little like lazy coding and not what you want in a tool.

    It's like.. you create a tool for the community, and you should want to make it as smooth going as possible and not so "I'm too busy sorry, that's the way it is" or "I don't make enough money from this tool" - I'm sorry but those responses do not instill confidence in me, a little disappointing.

    If a Caveat of using 3C is ensure you make it a child of an empty gameobject first (which may be written somewhere, I'm not sure).. but i know then that that could be resolved easily - I would be jumping on it if someone pointed out such a small oversight on my part. Borderline Abandonware?
     
  16. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    ok, I have made a few screenshots. Screenshot 1 shows a rock at position 3, -5.9, 31
    After running option 3c the original gameObject is disabled and a new gameObject is created. It's position is again 3, -5.9, 31 (see screenshot2)
    Underneath this new gameObject are the children. 1 for each LOD level. They have localposition 0,0,0, which gives them a world position of 3, -5.9, 31 (screenshot 3)
    I really don't understand what the problem is here.

    You post questions before even trying it yourself, write posts that are a mile long, send me PM's saying: "I saw you were online, but haven't answered my post yet". This is not funny anymore.

    You bought a $30 asset and expect $300 support. I am sorry, but I think I have been more than helpful in trying to answer your questions. If you are dissatisfied, just ask your money back. If you know so well how it all should work, simply change the code yourself, it's all there.
    Schermafbeelding 2015-11-30 om 13.06.25.png Schermafbeelding 2015-11-30 om 13.06.48.png Schermafbeelding 2015-11-30 om 13.07.00.png
     
    smada-luap, red2blue and Teila like this.
  17. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I use this almost every day and have never had an error or a problem. :)
     
    Orbcreation and hopeful like this.
  18. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    This tool is amazing and massively underpriced for what it can do. It has sliced the number of draw calls in my game down to 1/3 and on top of that provides a really easy to use LOD system. Best thing I've bought on the asset store.
     
    Teila, twobob, hopeful and 1 other person like this.
  19. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    I use it for my 3 games, the only problem I had was solved in only 24hours.
    It's the best LOD and poly reducer system I bought.
     
    hopeful and Teila like this.
  20. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    The author worked with us to unpick some very stupidly complex meshes - on the same day - he also took on board feedback that ultimately created a much more robust undo system.

    Some meshes are just incredibly to hard to simplify, usually owing to a lack of forethought during the authoring stage, sometimes it's just the numbers. YMMV
     
    hopeful and Teila like this.
  21. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    That's great, I'm glad you could help the author tomake the tool better, that will always serve the community better. My experience with the author is I hope to never have to deal with him again.

    There is an obvious 'bug' that no one seems to want to acknowledge though - or call it my work flow! But if you use LODGroup YOU MUST MOVE YOUR MODEL TO 0,0,0. I'm glad i got that sorted, if you use the other option it does not require this and it also uses the familiar _LOD0 not _$lod.0 whatever.

    Also these two option also place the finished models is different places within the hierarchy. If this is all documented well my bad and i'm done trying assist with this developer.

    Handy Tool, Arrogant Developer.
     
  22. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Not nice. :( (meaning the comment, not the developer)

    I use LOD Group all the time and have never had to move my model to 0 0 0. Odd.
     
    Orbcreation and twobob like this.
  23. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Okay, you are actually going out of your way to be annoying now.
    Please stop.
    He offered you your money back, You don't mention that I tried putting those same models through tools that cost N thousand times more than this and they still failed to optimise.

    /and/ DONT quote me unless you have something to say about what I said.

    Here is the script I used to use to manually adjust LOD naming conventions of things (can be useful for taxonomy and mass tidy-up sometimes) https://gist.github.com/twobob/84431c58ba65282f450f, Moving something to 0,0,0 is obviously trivial, although I have never had to do it.
     
    Last edited: Dec 2, 2015
    Orbcreation and Teila like this.
  24. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    I use the lod switcher myself. Super easy. So easy that I went back and redid roughly 100 character models in my published game with it. Those already had lod's made with cruncher, a tool I paid $200 for but one I no longer use because of simple LOD.
     
    Orbcreation, hopeful and Teila like this.
  25. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    People, this is so amazing. :)
    You actually stick up for SimpleLOD! Thanks!! Please let me know if I ever can do something in return.
     
    CrisisSystem and Teila like this.
  26. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Of course we do! You made a great product and it saved us a lot of time! It works flawlessly for me and has been very valuable in optimizing our game.

    Just stick around and keep giving the great support you have been. :)
     
    hopeful and Orbcreation like this.
  27. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Hi, recently bought the Simple LOD and it works good.
    It works well on models with high vertex counts, but not with low ones, like ones with ~1000 vertices. It can reduce vertices, but it also creates 'holes' on the model and it's not usable.

    I remember there is a tutorial for procedural map generation from Unity, and the tutorial shows how to find 'holes' from a mesh. Maybe I'll have to patch up my mesh myself.
     
  28. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    스크린샷 2015-12-07 14.01.50.png
    Hey, I made some script that can patch mesh holes. I noticed that the result mesh's vertices needs to be 'merged'.
    the screenshot above shows the indices of vertices, and those two with red circles indicate that two vertices are at the same location.
     
  29. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    Hey @NGC6543 Thanks for trying to figure out where it goes wrong.
    Smaller models are treated with a higher compression factor than big models. This is needed, because there is much less to decimate. This is why the holes usually don't appear in larger models unless you use a high compression level.

    I found that the holes are indeed the result of 2 vertices being moved to the same location. Your picture illustrates that very well. (very handy tool to show the vertex indexes btw!) There are safeguards in the software to prevent this and in most cases they do their job. Unfortunately this is not always the case.

    In order to solve this, I will probably need to keep track of the moved vertices through multiple iterations (I track them down 1 level now). Let's hope that will not slow performance. I have been planning to work on this, but it's just very hectic here. I promise you I will try to solve this asap and come with an updated version.
     
    NGC6543 and hopeful like this.
  30. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Thanks for the quick reply.
    Further research reveals that those two vertices cannot be merged : It seems that those holes(and merged vertices) are likely to occur where the texture UV coordinates are changed drastically(like seam lines). Some vertices shows wrong textureing when combined as a triangle, so I had to check the vertex indexes of the neighbouring triangles to find the right vertex index. So, as it turned out, your code just did the right and the best thing it could do.
     
  31. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    Yes, well, that may be so, but the end result is not what we want. So I will try to figure out where exactly it goes wrong and either fix it or create a failsafe or a workaround.
     
    NGC6543 likes this.
  32. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi, I have a workflow suggestion. I use Unity LODGroup instead of your LOD switcher script. For objects with submeshes, it will create a LODGroup per submesh. I want to use only 1 LODGroup at the object root to control all the submeshes instead of individual. Can you add that in please.
     
  33. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    I will see what I can do
     
    imtrobin likes this.
  34. olonge

    olonge

    Joined:
    Sep 22, 2014
    Posts:
    16
    Hi I recently purchased Simple LOD to use on the following assets
    Books: http://u3d.as/2Vk
    Rocks Pack: http://u3d.as/8xf

    I wanted a LODsystem as well as a texture atlas, so that as my camera backed away from the Game Objects, the meshes were simplified. Simple LOD looked perfect.
    So to try it on the asset,
    - I created an empty scene
    - dragged in a copy of these objects
    - selected them in the scene
    - fired up Simple LOD
    - clicked on No of LOD Levels = 3. at compressions of 1, 2 & 3 respectively. Remove small parts = 1

    upload_2016-1-2_18-28-19.png

    i.e., No compression.

    I then selected all meshes, and tried to bake the atlases. er... I only get the option to bake the atlas if only one game object is selected :-(.

    Am I doing something wrong ?
    (coughs) ...or is it that the meshes are already completely optimised ?
    (sighs) and does the atlas bake only work on one object in which case, I should have just bought "Pro Draw Call Optimiser", whose free version, I already use to merge the textures of my 100 plus game objects.
    Lots of textures, to replace having to modify change the renderers for highlighting.

    However, my main issue is with the LOD system, as this is what I really need, simpler meshes at increased distances, even for these rocks.

    Many thanks
     
    Last edited: Jan 2, 2016
  35. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    You can't compress them any further. They are already very low poly. :)
     
    hopeful likes this.
  36. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    The overall asset is good, because it add important and very useful(you could say essential) functionality, but quality of documentation and code in general is poor to average at most. After few minutes of trying to expose some members, I gave up, because I figured out it is waste of time trying to fix/add anything in such fatally designed and overly complicated code, ended up doing workaround on my side. Not impressed. Mesh optimization algorithm is also not so good, but it's sophisticated topic, so no criticizm here.
     
  37. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I have never had any problem with it and it works great as a simple, as said in the name, way to build LOD's. Yes,you can do better, but you can also pay a lot more. There are great decimation tools available for $200.

    We have also had no problem integrating this using code into parts of our project.
     
  38. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    @olonge
    It looks like you have an model that is already very optimized. Still, you should be able to decimate it a little further. Did you experiment with the additional settings that are under the "more..." button? The max. decimation value in the interface is set to 3, but you can use much higher values if you like. Just open the SimpleLOD_Editor.cs file, go to line 325
    Code (CSharp):
    1. compression[i] = EditorGUILayout.Slider(new GUIContent("Compression LOD "+(i+1), "Set the compression for LOD " + (i+1) + (i<=0 ? " (or for simplifying the current mesh)" : "")), compression[i], 0, 3);
    2.  
    and change it to
    Code (CSharp):
    1. compression[i] = EditorGUILayout.Slider(new GUIContent("Compression LOD "+(i+1), "Set the compression for LOD " + (i+1) + (i<=0 ? " (or for simplifying the current mesh)" : "")), compression[i], 0, 10);
    2.  
    It may create holes in your model when you use very high compression, but you can experiment a little to find the optimal settings.

    You also state that you have trouble with baking atlases. In order to bake an atlas, you will need a gameobject that has multiple materials with multiple textures. Usually these are created by merging several gameobjects together and then creating atlases. This way you can combine materials and reduce the nr of drawcalls


    @Teila Thanks for answering those questions. I hope we will one day meet at a Unite conference and I will be able to make up for your support by buying you a beer or whatever it is that tattooed princesses drink. :)
     
    hopeful likes this.
  39. olonge

    olonge

    Joined:
    Sep 22, 2014
    Posts:
    16
    Thanks @Orbcreation
    Re: baking, I guess all my (non unity-bought/free) models only ever have just one texture, applied in Blender, but this is fine as I will stick to PDCO for that.

    I'll also try extending the max compression to see if it makes any difference. Thanks for the reply.
     
  40. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    :) That would be great! I can't have gluten but a glass of wine would do!
     
  41. PhoenixRising1

    PhoenixRising1

    Joined:
    Sep 12, 2015
    Posts:
    488
    It's on sale today :). Figured I'd bump it for you.
     
    CrisisSystem likes this.
  42. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Noticing this is on the 24-hr sale, I just thought I'd mention to any prospective buyers that a mesh reducer like SimpleLOD is one of those basic tools you'd want to have in your toolkit. You can use SimpleLOD in the editor, and you can use it on meshes at runtime (which is great if you're going procedural with your game).

    If you're using UMA2, for instance, SimpleLOD can help you run more characters more efficiently. If you are trying to get a super-efficient low poly environment for your game, you can use SimpleLOD in conjunction with something like Mesh Materializer, and get excellent results.

    Mesh reducers used to be expensive, but SimpleLOD is not. Especially when it is on sale. :)

    Of course, like any other automated solution, there are a few limitations. It won't always decimate as cleanly or efficiently as you could do by hand, and it runs into difficulty when it tries to reduce meshes that are already optimized (so don't feed it meshes that are already low poly), but there are many cases where decimating by hand is impossible or impractical - or tremendously tedious - and that's when you want something like this.
     
    Orbcreation and Teila like this.
  43. sathya

    sathya

    Joined:
    Jul 30, 2012
    Posts:
    297
    Can we create Lightmap UV for individual LODs ?
     
  44. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    @sathya There is a documentation page about lightmaps here http://orbcreation.com/orbcreation/docu.orb?1233
    Don't know if that answers your question, because it is mainly about preventing that your lightmaps are ruined after you merge meshes together.
    But baking an LOD mesh does not alter the UV2 maps. You can have different gameObjects for different LOD levels and bake separate lightmaps for them.
     
  45. Wenceslao

    Wenceslao

    Joined:
    Feb 7, 2009
    Posts:
    142
    I'm having this issue still on the latest version of SimpleLOD. The reason why I want to use LODGroup is because I'm trying to generate LODs for some Tree meshes I have to use in conjunction with the Unity Terrain System (Actually using another package called TerrainComposer). So if they use LODGroup, I have useful population tools for trees. Except that when I create the LODGroup, LOD0 doesn't appear.
     
  46. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Hi Orb,

    I'm running into a new problem with my merged meshes when I try to port my game to Android. Most of them (but not all) are invisible when I build to a device (Android LG G3 and G4). The non-merged versions of the same character model are visible on the device. I have removed the LOD Switcher from the characters but the issue still persists. Therefore, I believe it has to do with the merged character.

    Have you run into anything like this? Any tips? As I mentioned, there are some characters that I merged that are not affected so I'm trying to figure out what differentiates them.
     
  47. Wenceslao

    Wenceslao

    Joined:
    Feb 7, 2009
    Posts:
    142
    I ran into another issue today where I opened the Simple LOD window because it seems to close itself on begin play. When I opened it again, Unity crashed. After restarting, there was no Simple LOD window, the menu option to open it is greyed out. Is there a temporary file somewhere locking Simple LOD? I've tried resetting my windows, restarting Unity and I'm trying to download it now but the Asset Store seems to be very slow at the moment.
     
  48. Orbcreation

    Orbcreation

    Joined:
    May 4, 2010
    Posts:
    231
    SimpleLOD does nothing but instantiate an EditorWindow and add a menu option with the [MenuItem ("Tools/SimpleLOD")] statement. This menu item is disabled /enabled with:
    Code (CSharp):
    1. [MenuItem ("Tools/SimpleLOD", true, 0)]
    2.     static bool ValidateSimpleLOD() {
    3.         return Selection.transforms.Length > 0;
    4.     }
    That means that it is disabled when there is nothing selected in your hierarchy.
    Issues with Unity crashing, or not opening or whatever are not things I can do very much about. The menu item + opening/closing of windows is just a few lines of code that do nothing but call the default Unity Editor functions.

    However, for starters, I would not use Unity 5.3. Not saying that will solve your issue, but it would be good to rule it out. My experiences with 5.3 so far are that it is unstable and unreliable. In my case it slowed my game down to about 30% of the original fps. Parts of the screen look very weird sometimes and Unity freezes pretty often and I end up killing the Unity process.
     
    hopeful likes this.
  49. Wenceslao

    Wenceslao

    Joined:
    Feb 7, 2009
    Posts:
    142
    Thanks for the heads up. Bad example because I created a new scene to see if my scene was causing the issue. I have a scene where I have several assets I was working on when Unity crashed. So I did have assets selected at one point. Then after I posted I started having an issue opening my own tools so then I knew something was up.

    I'm hearing you on 5.3. I had to work on other projects for a few months so actually didn't touch Unity. Now I'm back and I upgraded to 5.3 before reading about all the bad things that are happening. I may try to downgrade to a previous version but I've created a lot of prefabs that if they aren't backwards compatible will create a lot of work. I ended up nuking the library and re-importing AND re-installing Unity and now it's working again.

    I've also figured out a work around for the Group LOD issue, it adds a few steps to my asset creation but once these are all temporary assets anyways and will get replaced at some point.
     
  50. Glycin

    Glycin

    Joined:
    Mar 12, 2013
    Posts:
    1
    This is a really great package, and the price - quality ratio is off the charts.

    I have a problem though. When I simplify a mesh and then run my scene I get the following:

    Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 12, VertexCount: 27427
    UnityEditor.UnityBuildPostprocessor:OnPostprocessScene()

    The simplified model is visible in the scene view but invisible once running. Any ideas what the cause of the problem can be?