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

Exploded View (Part Viewer)

Discussion in 'Animation' started by treydavis76, May 25, 2016.

  1. treydavis76

    treydavis76

    Joined:
    Jun 5, 2013
    Posts:
    12
    I've searched everywhere I can think of, for a simple solution for developing an application that will allow a user to click a button, and have the parts of a CAD model move to an exploded view, so all parts of the model can be seen. Unfortunately, searching for "explode, exploded, or explosion" only shows game-typed effects with fire and smoke, and destroyed meshes!

    As a non-programmer with limited programming knowledge, is there a simple solution, a script or plugin, that I can use in my scene, that will give a user the ability to explode a model, and reset the position of the parts when clicked again, or another button is clicked?

    Thanks!
    -Trey
     
    radiuoz likes this.
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Is there a reason to have this work in Unity? There several solutions this can be done in with little effort.
    If this is the only functionality - including being able to zoom, rotate and move the view - Unity seems like overkill for this functionality.
     
  3. treydavis76

    treydavis76

    Joined:
    Jun 5, 2013
    Posts:
    12
    It's an entire project, done in Unity, for use as a teaching aid for businesses. The exploded view is just one of the many interactive pieces in the simulation.
     
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    That makes sense.
    Have you looked into the cad viewers/players that do this by default? I'm guessing they do not generate capture-able animation data, most are scripted.
    Was thinking this could be baked out and put into Max or alternate software which then could be exported as fbx.
    Then setup in Unity would not be difficult for two animation states, together - apart.
     
  5. treydavis76

    treydavis76

    Joined:
    Jun 5, 2013
    Posts:
    12
    I could animate the exploded parts in 3DS Max using a script, but I'm basically building a template, that other people will be putting their own models into later. So I'm looking for something that can be done within Unity itself.
     
  6. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Sounds like an asset package in the making! ;)
    I've done pretty much this exactly manually animating several times going back several years.

    The funnest one I remember was going the opposite direction, compared to common visuals to show a complete component break down to individual pieces, we started with a bolt rolling onto the screen, then proceeded to combine all pieces together until we had an entire cargo plane sitting on the runway. Non-interactive presentation, but similar with respect to rendered illustrated parts breakdown in reverse, though this was for advertisement purposes only.

    I searched around a bit today but came up with niente . Update if you end up coming across something useful.
     
  7. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    in deep exploration tool, i think it was all manual process also,


    but if you don't mind the direction of exploded parts, just iterate over all parts,
    move them along 1 (maybe just forward/backwards is best) or 2 axis, until none are overlapping in bounding boxes?

    would be interesting to see how it looks on a complex model : )
     
  8. MSSK15

    MSSK15

    Joined:
    Mar 30, 2017
    Posts:
    19
    Hi @treydavis76
    I am trying to implement the same thing in one of my project, have you found any solution for exploded view.
     
  9. developer_unity224

    developer_unity224

    Joined:
    Jul 22, 2020
    Posts:
    6
    After researching a lot about this, I've figured it out a solution for my use case: I used the local position of each part I wanted to move in some axis in some speed. Store, at Start, the local position, then, when the explode is going, calculate the distance between the stored local position and the current position. I had to set a minimum distance, if the calculated distance is greatest or equals to the minDistance, so the objet stops. Also, you have to say in which axis you want the peace to move towards.
     
  10. Santanu_Tecknotrove

    Santanu_Tecknotrove

    Joined:
    Aug 29, 2022
    Posts:
    1