Search Unity

Cruncher - Polygon Reduction Plugin for Unity Pro

Discussion in 'Assets and Asset Store' started by bibbinator, Sep 4, 2012.

  1. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @iByte

    Cruncher has similar features to Balancer, but of course the bug difference is the Unity integration. This integration allows Unity to do stuff that Balancer doesn't do, such as skinned mesh reduction, etc. Currently Balancer doesn't support FBX, but within Unity you can reduce your skinned meshes.

    Cheers,
    Brett
     
  2. Shigidy

    Shigidy

    Joined:
    Dec 14, 2011
    Posts:
    441
    So I'm trying to release a game to wooglie.com. It has a 20mb limit. Right now it's at 36mb with one race track. I at least would like to have 3, so theoretically it would jump to around 100mb. If I were to get this product could I just finish the scenes like normal then add your asset product and it would reduce the mb? Also could I use the slider to get as close to 20mb as possible with the best look of the model? Thanks
     
    Last edited: Apr 30, 2013
  3. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    294
    I'm using Cruncher and Mega-Fiers to morph several models. Since I have a model with more than 65536 vertices, I tried reducing it with Cruncher and it worked great. The problem is that Mega-Fiers' morph system loads .obj files for the morph targets, and since Cruncher generates a prefab, I'm not sure what to do.

    Is there any way to convert the generated meshes to .obj format, or am I doomed?

    EDIT: Ok, I found a script that exports a prefab as a .obj. Now, the only problem is that I need to have exactly the same amount of vertices on each object (the object I'm Crunching is made up of dozens of children with all the same vertex count). Why does the output of Cruncher have some variations in the vertex count?

    Thanks!
     
    Last edited: Apr 30, 2013
  4. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @Shigidy

    First thing is to go buy this plugin for $5:

    http://u3d.as/content/anomalous-underdog/build-report-tool/4u2

    This will tell you where the memory is actually being used. Meshes usually compress really well, so I'm skeptical that if the problem is the track alone that Cruncher will be a magic solution for you.

    Usually the problem for tracks is that they're authored outside Unity and all the buildings and scenery are separate meshes. Be sure that any repetitive items are converted to prefabs and then placed inside Unity instead of the 3D art package. I once did a hunting game that was authored in Max. It was also like 20MB for the environment. I wrote a Max script to output all the scenery object names, position, rotation, etc., then exported each item separately and ran an importer script that instanced prefabs and placed them based on this file. My memory went down to just a few MB for the scene and it performed way better.

    Good luck!
    Brett
     
  5. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @jesta

    Yep, that's what I was thinking. There isn't an easy way to fix the vertices in Cruncher though because Cruncher works by analyzing a mesh and figuring out which edge to collapse based on the topology that has the least impact on the visual result. So this looks like mission impossible to me.

    If you're sure that the resulting edges/verts are the same, but just ordered wrongly, then you might be able to do a spatial sorting on the OBJ text files to get them reordered correctly.

    The other, way more advanced and difficult way, is to use Cruncher's built-in API to reduce meshes. When doing it this way, you can request that Cruncher give you back the remapping data. This will be an array that tells you which old vertice index got remapped to which new vertice index. You could use this to know which vert ended up where, and then resort you vertices manually to all follow the same order. But man, this would be a nightmare to debug :)

    Cheers,
    Brett
     
  6. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    I just purchased this in the last 24h sale as well. I must say, it seems excellent!

    I found that another Unity plugin, GameDraw, has some mesh optimization tools too (though it's really for modeling). Has anyone compared them? Just from observation, GameDraw's tools don't seem as specialized, and doesn't have some thing that Cruncher has. One thing I noticed that GameDraw does have though, is optimization for combining materials and texture atlases too. Does Cruncher have anything like that?



    If anyone has used both tools, I'd be interested in hearing comparison between their optimization.

    Thanks!
     
  7. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @uniphonic

    I haven't used the GameDraw tools at all so I can't say how it compares. Cruncher currently doesn't have utilities to merge textures and combine materials but it's something I'll consider and see if it can be done. If you own both tools already I suppose you could use GameDraw to combine everything and Cruncher to reduce the polygon count.

    Internally, Cruncher already does a bunch of merging and mesh operations, so I guess it shouldn't be that hard to merge materials and meshes. Anyway, if I decide to add this I'll be sure and let you know.

    Cheers,
    Brett
     
  8. Deepestblue

    Deepestblue

    Joined:
    May 11, 2009
    Posts:
    48
    Hi there,

    I start a brandnew project and import the package, but no Cruncher-Menu-Entry appears as in your tutorial video. The only difference I can see from your video is that I am on Windows 8 and not MacOS. I haven't moved the files in the Project View whatsoever, and yes, I have Unity Pro. How can I apply "Convert Selection" otherwise? I tried applying all 3 possible components from the component menu, but that just throws errors.

    Thanks!
     
    Last edited: May 5, 2013
  9. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @Deepestblue

    That's strange. Is there no Cruncher menu at all in the "Create" menu? Or is that menu there but the sub-menus missing?
     
  10. Deepestblue

    Deepestblue

    Joined:
    May 11, 2009
    Posts:
    48
    Hi Bibbinator,

    please see attached a screenshot. The only thing that points to Cruncher at all is "Component > Scripts > CruncherPlugin" which contains "Cruncher Root" and the two Cruncher target components. (And assigning any of these to the Dino throws erors.)

    Thanks for the help ... :)
     

    Attached Files:

    • $1.JPG
      $1.JPG
      File size:
      68.7 KB
      Views:
      1,107
  11. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @Deepestblue

    Can you click the GameObject menu and take a screenshot of that while it's open? I want to see if the Cruncher menu is completely missing or not. If the menu is there, click the About option and check the version number is 1.08.

    $Cruncher Menu.jpg
     
  12. RonHiler

    RonHiler

    Joined:
    Nov 3, 2011
    Posts:
    207
    Great plugin Bib. Seriously, very awesome. I wish I had known about this before I manually created all my LODs, heh. But for any new models I create from now on for my game (and there are many still to be created), this is how the LODs will be generated.
     
  13. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @RonHiler

    Thanks for your kind words! It really helps to keep the motivation going :)

    And of course, feel free to post a good review on the Asset Store (if you haven't already) ;-)

    Cheers,
    Brett
     
  14. milox777

    milox777

    Joined:
    Sep 23, 2012
    Posts:
    195
    I keep getting this error after updating Cruncher to the latest version:

    And a TON of those whenever I try to change something on ANY cruncher object in the scene:

    And I cannot change any polygon setting on a gameobject anymore - and I have a lot of them...
     
    Last edited: May 6, 2013
  15. Zen-Davis

    Zen-Davis

    Joined:
    Aug 14, 2009
    Posts:
    285
    Hiya. Getting this error:

    NullReferenceException: Object reference not set to an instance of an object
    CruncherEditorPlugin.CruncherUtilities.CreateCruncherObject (CruncherPlugin.CruncherTarget ct)
    CruncherEditorPlugin.CruncherTargetEditor.OnEnable ()

    Everytime I try using Cruncher, Unity crashes. Can you please get a fix for this as it simply does not work otherwise.
     
    Last edited: May 6, 2013
  16. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @milox88 Sorry you're having problems, check your mailbox as I sent you a message there.

    @Zen Davis

    Can I get some more info from you. When does this error appear? What are you doing?

    Thanks,
    Brett
     
  17. Deepestblue

    Deepestblue

    Joined:
    May 11, 2009
    Posts:
    48
    Hi bibbinator,

    that was the hint I needed. :D It is under GameObject, and there I could also apply it as described in the video. I simply didn't see the entry, so only the "Cruncher"-topmenu is missing for me. Thanks for the help and the great tool!
     
  18. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @Deepestblue Awesome, enjoy!
     
  19. Zen-Davis

    Zen-Davis

    Joined:
    Aug 14, 2009
    Posts:
    285
    Sorry! It was me being a dumbass.

    I was trying to add it through use Cruncher through the Component / Scripts instead of GameObject. Sorry!
     
  20. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @Zen Davis

    No worries, it happens to all of us. Thanks for taking time to let me know everything's okay!

    Have a great day!
    Brett
     
  21. spartan

    spartan

    Joined:
    Mar 10, 2010
    Posts:
    174
    @bibbinator Didn't saw Cruncher on the last Asset Store Madness. Do you expect to release some discount price soon? Thanks!
     
  22. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @spartan

    I'm not sure when the next sale will be. It's also depends a bit on Unity and their plans. But I will post here in this thread next time it goes on sale!
     
  23. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    @bibbinator

    Picked this up a while back, and it's definitely on my Top 10 must-haves for Unity. Thank you for creating this!

    Also, is there any way to toggle the wireframe on the selected object when fine-tuning values? Often times it's better to tweak from the LOD distance visually, vs. watching for changes in the wireframe up close. Been finding myself changing a value, then de-selecting the model to get a better look, then rinse and repeating.
     
  24. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @lod3

    Under the Scene view Tab there's a pop-up menu that defaults to "Textured". Change that to "Wireframe". Does that achieve what you wanted? Or you mean something different?

    Cheers,
    Brett
     
  25. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    Actually, looking for the exact opposite. I'd like to select a model to be crunched, then toggle the wireframe off so as I tweak values from a distance I can better gauge what setting works best, as the wireframe makes it difficult to see little nuances.


     
  26. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Ah, I see what you mean. Hmmm, not sure how to do that. It's funny that there's no way to disable that...
     
  27. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    Ah, is it a Unity core thing? Maybe I'll suggest the ability to them then. It would be incredibly useful for environmental art as well if you could toggle view of the wireframe.

    Thanks!


     
  28. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Yeah, Unity thing. Almost feels like a bug because there is a "Textured Wire" option. But when you select an object it always shows the wireframe regardless of the setting.
     
  29. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
  30. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
  31. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @Thinksquirrel

    I didn't know that, thanks for the tip. I'll look into adding that into Cruncher as an option.

    Thanks!
    Brett
     
  32. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    @bibbinator

    Suffering the same as this post. Could you post the cause? PM is fine, too. It's been happening since I first got Cruncher, but it's only now starting to drive me crazy :)

    Well, specifically, this is what I keep having pop up:

    Code (csharp):
    1. cruncherMeshConfiguration == null, you must pass in a valid CruncherMeshConfiguration in order to process meshes.
    2. UnityEngine.Debug:Log(Object)
    3. CruncherPlugin.CruncherPluginManager:AddMesh(CruncherIO, CruncherMeshConfiguration)
    4. CruncherEditorPlugin.CruncherTargetEditor:OnEnable()
    It doesn't seem to affect anything, but I'd still like to make sure.
     
    Last edited: May 26, 2013
  33. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @lod3

    Firstly, please accept my apologies that things went haywire, that totally sucks and you shouldn't have to deal with that.

    There is a new data structure and if it's null it gets initialized. So it looks like there's a bug whereby there must be a code path that doesn't detect the structure is missing and doesn't initialize it before proceeding.

    If you have any models that are still broken, I would love to have a package that has the original and Crunched objects so I can find why it isn't upgrading the model properly. If this isn't something you can do, I understand.

    I added this new structure to give more control over the mesh reduction.

    If you create a new object does the message still appear? Or it only appears on pre-Crunched objects?

    Again, sorry you're having some issues.

    Cheers,
    Brett
     
  34. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    No worries, Brett; nothing went haywire. Just wanted to make sure the "null" message was safe and could be ignored. I honestly don't know what's causing it, but the "Crunched" models still work fine.

    Now, if the message is actually benign, and there's a way to disable that message from appearing all the time in the console, could you show me what line(s) to comment out in what file, or is it more complicated than that?

    Thanks!


     
  35. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @lod3

    It's benign in that it means when that error is encountered it stops processing. So I believe you can't adjust your mesh anymore? If you can send me even a single model in a package that throws this error I can then trace it and see why the null struct isn't being checked (the code checks and intializes it to default values if null). If you can't, no worries, I just need to look through the code and it's probably a silly case somewhere.

    But thanks very much for posting you encountered the bug. When only 1 person out of many encounters it I think maybe it's caused by something else. But when 2 or more users encounter it then likely it's my problem :)

    Cheers,
    Brett
     
  36. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    Sent PM.

     
  37. spartan

    spartan

    Joined:
    Mar 10, 2010
    Posts:
    174
    Hi Brett,

    Any chance to put Cruncher on next Asset Store madness or some discount period?

    cheers
    Spartan
     
  38. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    676
    Brett,

    Figured out what it is, but no idea what's causing it. The affected crunched models that spit out that error are missing their Cruncher Root script for some reason. What's a common cause for a crunched model to not receive its root script?
     
  39. metalouis

    metalouis

    Joined:
    Sep 28, 2011
    Posts:
    12
    @bibbinator

    This plugin looks awesome! You mentioned an API so developers can access the poly reduction by script: is this accessible at run time or just in Editor?
     
  40. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @metalouis

    It is editor only

    Cheers,
    Brett
     
  41. quydoau

    quydoau

    Joined:
    Jul 2, 2012
    Posts:
    31
    Hi @bibbinator, do you have a rough time frame for implementing the function "painting" hints on the mesh for reduction?

    Thanks.
     
  42. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @quydoau

    I don't sorry. I'm freakishly busy and while it's a high priority item it's also a very large feature to implement. I can't promise when or even if I'll get to it!

    Cheers,
    Brett
     
  43. eric_kog

    eric_kog

    Joined:
    Mar 6, 2013
    Posts:
    11
    Hey @bibbinator,

    Cruncher looks like a pretty awesome tool, we're considering picking it up for our pipeline but there doesn't seem to be a lot of documentation for it online.

    I was wondering if you might be able to let me know some of the limitations of the tool (though I've seen from this thread that you've definitely put a lot of effort into making it handle a lot). For instance, does it handle non-manifold geometry (not that we're planning on that happening a lot ;D)? Are there any caveats to consider when creating a model for it?

    Is there a complete feature list online anywhere? or a compiled version history?

    Thanks for your time!

    Cheers,
    Eric
     
  44. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @eric_kog

    Hi, thanks for your note.

    Cruncher shouldn't crash when handling less than perfect geometry, but having manifold meshes is required in order to reduce a mesh properly. Without it, the mesh may deform when reducing.

    There isn't a complete feature list anywhere yet. I have a new website that has a nice page on Cruncher, but haven't published it yet as still adding some new products to it.

    Sorry I don't have great stuff. The best is to look at the features on the first post, and the links to the videos on Cruncher in action.

    Cheers,
    Brett
     
  45. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    Cruncher looks amazing, but it's a real crying shame it's in-editor only.

    A version we could use in our builds would be very useful to my project and I would be prepared to pay a minor fortune far beyond the current asking price.

    I realise a DLL is involved so that presumably limits it to desktop, but that's not a deal breaker by any means.

    I notice Cruncher is just one of the many tools you offer using your polygon reduction tech, so please give it some thought as I notice it's not just me that requires this functionality! :)
     
  46. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Is it possible to have a subset of the Cruncher functionality during runtime ? The reason is that I have some small meshes that need to be optimized in game.
     
  47. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    @fanjules, @rocki

    Thanks for your notes. I will look into this. It would be Pro only as it needs native plugins, and unfortunately it would likely cost a lot because of the work involved in development and testing (and assuming it needs to be multi-threaded so it doesn't lockup the main process and cause the device to terminate it).

    But I will add this to my list and see how much work it really is. Thanks!

    Brett
     
  48. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    Don't forget to add metalouis to that list too. ;)

    Multi-threaded would be ideal but not essential for my intended application as I wouldn't be doing it during the main gameplay, can't comment for the others though. I only mention this in case you decide not to implement it due to the multi-threading requirement, but I would rather have some functionality than none at all.

    I really hope you do this as it will make your product the definitive solution for poly reduction (I had seen threads of others experimenting with their own implementations, but if Cruncher was to offer this then there wouldn't be a need to look elsewhere).
     
  49. bibbinator

    bibbinator

    Joined:
    Nov 20, 2009
    Posts:
    507
    Roger that ;)

    Have a great weekend all!
     
  50. agentleo

    agentleo

    Joined:
    Jan 2, 2011
    Posts:
    56
    I just purchased Cruncher and I have few assets that I have to test it with for an Oculus Rift project I am working on.