Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Lightwave 11.5 Fracture Animation to Unity 4

Discussion in 'External Tools' started by timrbetts, Jul 25, 2013.

  1. timrbetts

    timrbetts

    Joined:
    Jun 21, 2013
    Posts:
    5
    I'm somewhat new to Unity but have been a very long time fan and user of Lightwave as a hobbyist mostly.

    Recently I was successfully able to model and texture a small aircraft. I then baked a diffuse atlas and normal map. Next, remapped all surfaces to use the diffuse, then used the LightwaveAppLink to import the FBX into Unity. Once in Unity I applied the normal map and added it to the scene and played around with a chase camera. I'm pretty happy with the way it turned out, but on a side note it sure was a lot of work to get my model and its surfaces into Unity and it certainly seems like there is an opportunity for someone to create a more dedicated exporter to automate this process OR do you guys have a better work flow?

    Anyway, having got the main model into Lightwave, I decided I would now like to blow it up, so I make another scene in Lightwave and used fracture to break it up into about 100 pieces which we can call my fractured model. I then animated several collision objects over 120 frames to have it destroyed the way I wanted (one possible variation of many perhaps).

    Where I need help is to first understand how I take that animation into Unity and play it back. So ideally, I would trigger the explosion say after a few seconds after loading my main scene, I assume by replacing my main ship object with the fractured model and trigger the animation. Just getting this far would be nice, then I suppose I could fade out the fractured object or something over time.

    Finally, I'm also very interested in after the animation has played that the individual pieces of the object fall under gravity. This would mean I can have the look of the explosion I want and have the pieces handed off to Unity's physics engine. Is such a thing possible? I assume somehow I would have to be able to loop through the mesh of the fractured object and identify each piece as a separate object and then create them as game objects on the fly?

    OR perhaps in Lightwave I somehow play the animation to the end and then somehow save out the fracture pieces as separate lightwave objects parented to a null or something which I can then import into Unity and replace at the right time with rigid bodies assigned to them?

    OR am I going about trying to achieve this all wrong and there is a nice extension or plug in for Unity that would allow me to control/script the look of the explosion of my fractured object? I'm assuming this would still require the fractured object to be saved out somehow in Lightwave as a parent null and each piece as a child object parented to the null, correct?

    I'd appreciate any advice I can get. This is just a little project that interests me.

    Cheers -- Tim.
     
  2. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,180
    Didn't lightwave fractures used to be called rainbows?
     
  3. timrbetts

    timrbetts

    Joined:
    Jun 21, 2013
    Posts:
    5
    Thanks goat - I believe you are correct :)

    Any Unity Lightwavers out there offer any advice?
     
  4. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
  5. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
    I've now been through this myself, cloth on a textures mesh from lightwave into unity using the cache reader I linked earlier.

    Make sure you dont use discont UV's since the vertex number will not be the same in the written pc2 and what's unity will be expecting.

    Dpont has a plugin for baking down to pc2, dpont cache writer.
     
unityunity