Search Unity

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

Polygon Reduction Plugin Preview

Discussion in 'Assets and Asset Store' started by bibbinator, Mar 5, 2012.

  1. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Hi All,
    Just wanted to post a progress update. Everything is working well and in theory I could release it very soon. But....

    With Unity's 3.5 removal of the limit on total polygons per object it creates some problems that take some careful coding to get around. Basically Unity splits the meshes up into smaller ones, which can also contain sub-meshes if it also has multiple materials. So for models that have an individual mesh over 65K vertices, I have to remerge the mesh together, reduce it, then split it up again and completely replace the contents of the prefab (since I can't remove individual meshes from a prefab because there's no API for that).

    This is a long way of saying I need a week or so more to get all the cases working :)

    Cheers,
    Brett
     
  2. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    @bibbinator So long as you make an obvious caveat on your website order page saying that you are working on this specific use case, I don't think this should hold up sales. Many of us don't use such complex geometry (usually occurs when using mesh terrain), so it wouldn't be an issue.

    Good news on Atangeo changing their licensing model :)
     
  3. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    +1 to this.. would be happyb with current version to start working with it :)

    Regards

    Moria
     
  4. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @gamesfoundry

    They didn't change their licensing model really, it's a single-user license and it's normal for Unity users to run both Mac/Windows.
     
  5. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Hey all,
    Since nor many people decided to send me meshes, and since people also seem keen to use this, perhaps you could all help me by posting what kinds of content you do have and what you're hoping to achieve?

    E.g. I have 15K polygon characters with 2 weights per vert, single texture skin with normal map and want to try and get them down to 2,500 ploys, etc.

    Thanks!
    Brett
     
  6. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    Well, mine is fairly simple.. I'm working on this :- http://forum.unity3d.com/threads/103534-Colony-Alpha-(M)ORPG-(Updated)

    Most of my models are in the 5 - 15k poly range depending on complexity, with the trees and terrain taking the largest numbers of polys etc.

    Most have been converted to single texture with normal, a few just have single texture no normal (rare).

    Because of the multiplayer, I am trying to keep the frame rates as high as possible with as little loss of quality as possible, so apart from the basic scenery, I can have 40 - 50 characters running around the zone at various LOD's.

    I guess I would like to try and get most of the models down to about 10 - 20% of current sizes. Really at this stage, anything would really help, especially when I get into the scenic parts as the undergrowth and trees are by far the biggest drains for my frame rates.

    The other alternative I would look at is to get some better quality models and reduce those to the same polygon rates I already have, so I get better quality, but at no further loss of frame rate.

    I do already use LOD's etc but it's amazing how quickly a few trees and buildings drop 5 - 10 FPS from the rate and when you start to add it all up, that limit of 30FPS is approached very quickly, even with occlusion culling and portals set up :)

    Regards

    Moria
     
    Last edited: Mar 24, 2012
  7. n0mad

    n0mad

    Joined:
    Jan 27, 2009
    Posts:
    3,732
    May I say .... Wow ? :)
     
  8. cheezorg

    cheezorg

    Joined:
    Jun 5, 2008
    Posts:
    394
    Another +1

    Getting the current version out in the wild will result in plenty of fast feedback on any specific issues that pop up, while allowing those who can benefit from the current version to do so now.
     
  9. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Thanks for the feedback, it helps. Keep it coming...

    :)
     
  10. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    @bibbinator We'd be happy to share a few models under our NDA. For examples of content, please visit the thread link in our signature, and let us know if there is anything specific you'd like to test via PM (including your Skype details). Art assets mainly consist of:

    - Animated characters 1000-1500 polys
    - Static and animated buildings 4000-10000 polys
    - Environment props 500-5000 polys
     
  11. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    My most used would be:
    - unity trees > LOD group
    - unity terrain > mulitiple meshes with LOD group
    - medium poly animated meshes to low poly LOD group
    - high poly sculpt object from mudbox/3d coat > low poly LOD group
     
  12. KatanaSim

    KatanaSim

    Joined:
    Oct 25, 2009
    Posts:
    105
    I need to simplify and clean up furniture and architectural models from a wide variety of sources, including Turbosquid (and other 3rd party vendors), Google SketchUp Warehouse, and object scans done with the Microsoft Kinect. Those sources can be very messy and very complex (5-10k all the way up to several 100k polys).
     
  13. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    298
    +1
     
  14. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    I watched these vids.

    Will This be replace the decimater and Ultimate Unwrap or just the UU part? I'm not sure if what he is doing will let hobby user simply export an object or fbx and then decimate it. Or if you would still need the daz3d game kit to decimate it first. The question for me would be does it do the functions of both?
     
  15. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Hey all, thanks for the feedback, very useful!

    @dreamlarp

    The plugin simply reduces the polygon/vertices in a model, preserving everything else to the extent possible. So if there are UVs, they're preserved, if there's no UVs there's nothing to preserve. Same with normals, tangents, weights, etc.

    It's a mesh simplification tool for use within Unity, intended to be used on objects that are ready to go except for you'd like to try and reduce the polygons as much as possible without having to go back to an artist).

    It's worth noting you can replace/override things if you want though. For example, if you wanted to generate 3 LODs for an LODGroup, you can generate them from a master model, then go into each generated one and say overwrite the material or shader used, etc. Nothing to do with my plugin, but probably a common use-case.

    Cheers,
    Brett
     
  16. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Ok great then as I understand it I would still need the game kit in daz to get the models about ready for unity in animations ect.. but for this engine it looks like its UU built into unity. The only thing I would like to know is does it take the multiple textures and make one out of them like UU does?
     
  17. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @dreamlarp

    It doesn't do any texturing at all. It preserves UV(s) if it's there, that's it. I preserve up to 2 sets of UV as per Unity's limit. Within that though it does "fancy" stuff. For example, if you have a mesh with multiple materials, it knows about materials and will keep the vertices it needs to anchor UVs at edges, etc. So it's both UV and material aware.
     
  18. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    733
    I wait this tool with great interest. All of my 3D jobs are based on CAD applications and as we know (in this ambit) the number of poligon is not a priority. This tool will be usefull to eliminate the tedious passage back to optimize the models that are already placed in a unity scene but with a need of little (or big) optimization to mantain a good performance. Doing it inside Unity make this tool a big time saver.
     
  19. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    I can see a usefulness for mobile of optionally combining materials into one atlas, but since there are already other tools that can do this task it's not a priority, this can become a priority if this tool does not work together with other texture combiners for some reason.
     
    Last edited: Mar 26, 2012
  20. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    +1

    Exactly what i was thinking. For me at the moment I use the daz3d game kit for decimating and ultimate unwrap. This would be great because its inside of unity witch is my end program anyway. But will it be used for free as well as pro? And whats the price estimate? Would it worth me using instead of daz game kit and UU?
    Quite a few on both these forums daz and unity would like to know what advantages using this would be.
     
  21. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Cant wait to see functional reduction on animated meshes. This will be great tool once it will be released.
     
  22. Games-Foundry

    Games-Foundry

    Joined:
    May 19, 2011
    Posts:
    632
    @bibbinator If we buy a license for Balancer now while you are still developing, will we be able to use that license with your plugin rather than having to buy it a second time?
     
  23. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @Sjm Tech Yes, this should work well for you.

    @Lars Steenhoff Combining materials into one atlas can be tricky because you can't wrap UV coords within a sub-area of the atlas in OpenGL ES 2. Added to that is that reduction becomes limited because we have to maintain the edges to anchor the texture, plus you need to duplicate verts at material boundaries anyway. This is emoting I have done within the past year, and it's a headache I'm not looking forward to anytime soon again, haha. But I'll keep this in mind.

    @dreamlarp At the moment it's Pro only, sorry. This is because the plugin currently requires native code, and that only works in Pro. We're investigating a managed code only solution, but it's only R&D at this time so no promises for the future. I can't comment specifically on the game kit workflow yet, but I'll look into this and what it offers and try to offer some guidance as to how workflow with the plugin is different. Simply put though, this plugin is primarily designed to squeeze out every last polygon it can within Unity so you can see the final result. If you could eliminate even 10 ploys on a prefab that appears 50 times in a scene, that's 500 ploys less right there. And the new LODGroup is easily supported so you don't have to keep popping out to Daz to make LODs, you can just use Daz to make the "master" mesh, and then the plugin to generate the LODs inside.

    @gamesfoundry Sorry, it's a different license. Maybe down the road I can work something out with Atangeo, but for now they're completely different and each of us provides support directly to the licensee for the product they bought.
     
  24. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @dreamlarp

    Just a follow-up to make sure it's clear, but currently this plugin will reduce polygons but doesn't do any unwrapping or other operations. We might look at that in the future, but at the moment the idea is that you already have a mesh that is technically correct inside Unity but you just need to optimize the mesh.

    Cheers,
    Brett
     
  25. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Hi Brett,
    And idea on a release date yet?
     
  26. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @24pfilms

    I dislike giving forward looking info, because everybody will take it as a statement of fact, but as a consumer of many software applications myself, I also like to have info.

    Sooooo an update. Currently everything is basically working well, but I'm doing so refactoring to make things as bulletproof as possible. My concern is that because this plugin inserts itself between the incoming models and the user's game objects, it is very tricky to upgrade to new versions of the plugin if things aren't done in a certain way. So I'm reorganizing the internal data structures to have the least impact in an upgrade scenario. I'm hoping to have that done in the next day or two. Then another round of testing. Some doc. Website completed and put up.

    So I'm currently looking at about a week if everything continues apace.

    Cheers,
    Brett
     
  27. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Thanks alot for the feedback Brett. Much appreciated.
     
  28. RichardJaquish

    RichardJaquish

    Joined:
    Sep 30, 2011
    Posts:
    5
    Really hoping you follow up with a strait C# implementation at some point. In addition to being usable with the basic version of unity, the ability to optimize meshes at runtime through the webplayer definitly has its uses for myself.

    Very cool, looking forward to the release!
     
  29. RayWolf

    RayWolf

    Joined:
    Mar 24, 2012
    Posts:
    87
    This sounds really promising, good base technology I think. Im waiting for release!
     
  30. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Almost ready ? :)
     
  31. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    98
    Just jumping in here, I alread own Atangeo Balancer and it is great, will this work with skinned mesh renderers? and I can send examples if you like
     
  32. moctezumagames

    moctezumagames

    Joined:
    Jun 9, 2009
    Posts:
    395
    Really nice tool man.
     
  33. maart

    maart

    Joined:
    Aug 3, 2010
    Posts:
    82
    I had no problems exporting trees to balancer with the exporter that came with the angrybots demo. I hope you can include it later. The combination of the angrybots demo Exporter with balancer will propably also work great for unity free users. (i didn't test the exporter on free edition) i did a video for antangeo recently, search for it on youtube.

    I would welcome an additional unwrapping and texture combining option to allow some fancy stuff like high poly to low poly texture baking.
    Beeing able to reduce the poly's in unity is great and will give me a better view of what i'm dooing, than having to go to balancer. But with this plugin i propably still will export the generated lod and unwrap and bake textures, and then import them back to unity.

    Still i'm looking forward to the release!
    Any info about the price would be nice.
     
    Last edited: Apr 11, 2012
  34. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @Lars and others....

    Yeah, refactor is done, working great, faster than previous version. The only hiccup here is that it's spring break and I'm gonna go on a week holiday starting Friday. I don't want to try and release this and then go out of town, so I need to wait til I get back. So very soon to be released. It will be released before the end of the month if it kills me :)

    @Anadin Yes, it works great with skinned mesh renderers!

    @Maart Enough people have asked for unwrapping and texturing support that I'll be looking into this. I need to understand the workflow a bit more in terms of how people are using my plugin with this, but I need to wait until after the first release to do that. Stay tuned.

    As for price, I can say that I am probably going to use a dual license model whereby the price for indies and small teams will keep the price affordable. E.g. assume it will be under $100, _probably_ about $80 at launch, but this isn't confirmed yet.
     
  35. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    98
    Whoo Hoo! all great news, have a nice break then get it out!! :D
     
  36. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Question:
    What file formats will it support?
    I just tried Balancer with 3ds and .lwo ...no go.
    But works with obj.

    Needing your asset in 1 week to 10 days.
    Have a great holiday.
     
    Last edited: Apr 15, 2012
  37. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Have a nice holiday!
     
  38. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Hiya all, I'm back from an awesome holiday in Pulau Perhentian, thanks for the wishes.

    @24pfilms I support Mesh components attached to game objects. So if you were able to import the object into Unity and drag it into a scene, it will work with my plugin. I'll be adding special support for other types of meshes in the future such as Unity Trees, but for launch it will support game objects with mesh components.
     
  39. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Awesome I can't wait for unity trees !
    I have bought many trees on the store and sometimes they have more than 3000 polygons, If I could reduce them I could finally use them on my iOS devices! :)
     
  40. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Wow, now thats a vacation.
    Thanks for the info.
    I have my trigger finger on the virtual asset store buy button.
     
  41. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    98
    Ditto the trigger finger (it's getting tired) :D

    Seriously can't wait but take the time you need I have a feeling this one is going to be successful
     
  42. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Hi all,
    Okay, at the risk of getting overwhelmed...

    I'm looking for a few beta testers. I was going to contact some people privately and ask, but somehow I think opening it up to everyone might be a better idea.

    So, before you PM me, please consider:

    • Beta version will be sent out later this week (assuming no more new show-stopping bugs are found by me)
    • You must have a Pro license to be able to use the plugin and test it.
    • The plugin will be fully functional in theory, but may be missing functionality still.
    • There will certainly be bugs, and when the plugin dies, it takes Unity and all your unsaved work with it. Native plugins aren't very friendly to Unity when things go wrong.
    • You must agree to keep your reviews/comments private until the plugin is released.
    • It's possible that when the official plugin is released, it won't be backwards compatible with the beta version. This would only happen in the case where an underlying data change is necessary, but it's best to assume that you would test it only and not use for production use at this time.
    • Initial Beta test is Mac only (Windows will be second phase of testing)

    So if all of this is okay with you, and you actually have the time and inclination to test, please PM me (don't post here in the forum please!)

    Cheers,
    Brett
     
    Last edited: Apr 25, 2012
  43. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    EDIT: I have a workaround. I'll leave the multiple materials alone and all will work as expected, but the user really shouldn't be using such a model, so I'll likely output a message letting them know that the materials should be optimized. In a future version I may try to collapse the materials, but for now I'll leave it be.

    Opinions needed! I have an edge case that might not be so edge and seeking suggestions as to what to do.

    Summary:
    If you have a model with multiple materials on a single mesh (a mesh with sub-meshes), and those sub-meshes actually use the same material, it trips up my plugin.

    Detail:
    In theory, it's very bad practice to have a mesh that has multiple materials where one or more of the multiple materials is the same. This is because there's no reason for it, and these sub-mesh triangles should be merged into the base mesh.

    The problem is that Unity, even if you check the Optimize Mesh checkbox, seems to leave the multiple materials as they are _until_ you instance the mesh and then it seems to detect the problem and fix it. The problem for me is that this happens in the middle of me trying to gather up all the triangles and insert my plugin into the object. As a result, it looks like an error to my code as the plugin will return fewer sub-meshes than Unity reports it has.

    Sooooo, my current options are:

    1. Detect that a mesh has multiple materials that are duplicated and simply skip the mesh entirely, possibly outputting an error message on the console.

    2. Attempt to optimize the mesh and fix it <argh!>

    3. Use a brilliant suggestion from somebody on the forum ;)

    Cheers,
    Brett
     
    Last edited: Apr 25, 2012
  44. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    By the sounds of it make an instance of the mesh and let unity detect and fix it, sounds too easy right? I guess it must be complicated to implement this.
     
  45. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Hi Lars!

    I need to make an instance of the mesh to do some operations on the mesh, and that's why it's all tripped up: I'm a bridge between the imported model and the instance, prefab or otherwise. So there's no letting Unity fix it at that point unfortunately.
     
  46. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    As mentioned above, I have a "fix".


     
  47. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Good solution :)
     
  48. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Hi everybody!

    The good news is that I now have completed work on the Beta version and all seems to work great now. I have one last detail though I want to check for my sanity. Can anybody please help check this for me?

    If I have a model with more than 65,000 verts, and it contains multi-materials per mesh (e.g. one mesh with sub-meshes), when Unity splits the mesh on import into parts, does each part contain the full material list? Or only the materials used in that split?

    Detail:
    When Unity imports a mesh with more than 65K verts, it divides the mesh into as many 65K mesh parts as needed, each with it's own mesh renderer and array of materials (if multi-material per mesh). In my tests, it seems that the material array is the same for all parts, but I want to check if anybody sees something different in any meshes they might have. It's tough to test as 1-2 test meshes aren't representative of a wide array of real world meshes.

    Thanks for the help! Once I verify this, I'll be able to start the beta testing.

    Cheers,
    Brett
     
  49. dabrow

    dabrow

    Joined:
    Nov 15, 2010
    Posts:
    22
    Hi I love it and will buy it asp.
    I do hope It will be on Asset Store soon !
    Thanks for developing such asset for the unity community.

    Cheers
     
  50. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    98
    I too see the same thing on all of the parts, same material array in the same order for all the parts.