Home Technical Talk

Maya, create (convex) polygons collider for game

polycounter lvl 8
Offline / Send Message
retmia polycounter lvl 8
Hello Polycounters !

Well, I've been looking around the internet to find an answer about creating Polygon colliders in Maya (2015) to use them in Unity Engine.
But surprinsingly, I haven't found any clear answer on how to create these !
I've heard about some old tools here and there, and a plugin that I can't make work, bot other than that, it's a mystery ! I tried some manual techniques ... not convinced ...

The ideal would be to create some kind off convex hull collider with the lowest poly count possible, mainly for object debris. But if there are some tools with more options, I'd be interested ! :)

How do you guys handle this ?

Replies

  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    AHRBkHx.png

    I managed to get the kind of shape I really want with the PhysX plugin for maya (you can get for free if you register as developper on Nvidia).
    But, I can't convert it to polygons, so it's not usable :/

    Any Idea ?
  • Eric Chadwick
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    That's where I'm digging, but it's actually quite technical, some parts remain unexplained ..

    https://github.com/digitaldestructo/DDConvexHull/wiki/Usage
  • Eric Chadwick
    Options
    Offline / Send Message
    Hmm, well the last time I had to make hulls was in 3ds Max, and we had a talented technical artist on our team who made a custom Maxscript for it.

    You could search/ask over on Tech-Artists.Org ...
    http://tech-artists.org/forum/forumdisplay.php?17-Coding-Tools-and-Pipelines
  • monster
    Options
    Offline / Send Message
    monster polycounter
    In Unity add a mesh collider component then check the convex option. Complex models may need to be broken into a few objects to get a better collider fit.
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    Well, I didn't though it would be so complicated, I tried to compile the plugin to make it work, but well I didn't manage to. I think we'll be using the default Collider system as monster describes it just above, the system should be fine for most cases.
    And if we really need it someday, we might use the Tech-Artists forums, that I don't know at all. Thank for the tip Eric Chadwick.
  • Eric Chadwick
    Options
    Offline / Send Message
    yeah the tool we had was great. If you gave it a selection of vertices or triangles, it would fit the hull to that. So we could easily divide a complex mesh into hulls. The company went out of business though, so the tools are all gone. :(
  • monster
    Options
    Offline / Send Message
    monster polycounter
    You know Eric in 3ds Max 2012+ you can add a MassFX Rigid Body modifier and press "Convert to Custom Shape" It doesn't work with subObjects though. I was actually planning a tool similar to what you describe.

    I'm almost certain Maya has the same functionality since they both use PhysX these day, but since I don't have it anymore I can't check.
  • [Deleted User]
    Options
    Offline / Send Message
    [Deleted User] polycounter lvl 3
    If you grab Houdini Engine I can prepare a tool like this for you next week ;)

    Simulations are Houdini bread and butter, so possibility to prepare optimized geometry, for example for Bullet solver, using many techniques is a must. And also piece of cake in Houdini.

    Fas example below. You can go even more crazy with it :)
  • Eric Chadwick
    Options
    Offline / Send Message
    Havok also has a convex hull maker, looks like it's free, and it supports both Maya and Max.
    https://software.intel.com/sites/havok/en/
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    Hey, Thank you guys.
    Well actually, Maya can in fact generate collision hulls with its own physics system and/or with PhysX plugin, but they can't easily be converted to polygons. There must be a way, because you can do almost everything you want with maya, you just have to know how to, like taking points from anything and converting them to polys ... but my knowledge doesn't go that far. Sad ..

    I don't have Houdini, and I'm actually trying to avoid to have too much tools in my workflow, though I heared, there is a plugin that connects Maya directly to Houdini in the last version ?


    Mtm20cm.png
    I found a plugin (more FX oriented) that implements the Convexhull code, it's called SOUP. Yet not easy to use (haven't made it work yet on my objects) > http://www.soup-dev.com/examples2_7.htm

    I'll try to see if havok can generate and export hulls asap :)
  • [Deleted User]
    Options
    Offline / Send Message
    [Deleted User] polycounter lvl 3
    retmia wrote: »
    I don't have Houdini, and I'm actually trying to avoid to have too much tools in my workflow, though I heared, there is a plugin that connects Maya directly to Houdini in the last version ?

    This is Houdini Engine for Maya.
    It works also with Unity and from April with UE4. You could use one tool in all of those to get generate your convex hull.


    EDIT: You know what... I think there is a 2 week long try version of Houdini Engine. If you are interested in testing it I can prepare a tool that will work with it, so you could test it with Maya and Unity. You would get first hand knowledge what's Houdini Engine. Two weeks is enough to prepare and polish the tool with some cool additional options. Take it for a spin!
  • retmia
    Options
    Offline / Send Message
    retmia polycounter lvl 8
    Actually, when seeking for some info about havok on the web, some people were saying that they used the tools to generate their hulls at work. So I tried ... and it worked like a charm :

    7gcpgKG.png

    At the moment I don't think I'll use Houdini, Unity 5 improved also alot its physics, so I think we'll generate hulls only for special cases. Though I remain always curious about softwares and technologies, I checked what Houdini for Unity is doing, and the main idea is a procedural environment instancer / generator ? is that it ?
  • [Deleted User]
    Options
    Offline / Send Message
    [Deleted User] polycounter lvl 3
    You are making mistake by assuming that Houdini and Houdini Engine is exactly the same. They are similar, but not the same. Houdini is a full program. Houdini Engine is more like executer of the tools that you/someone made in Houdini or downloaded from Orbolt shop.

    The main idea is to have one tool that you can use in any program that Houdini Engine supports. With Houdini Engine you can plug-in right now to Maya/unit + UE4 in April, and use the same tool in each. The tools will do whatever you want from them.
Sign In or Register to comment.