Skip to main content
Up and Coming
September 15, 2014

mesh sequence playback in Unity -(simple DK2 demo inside)

Hi guys,

I have some interesting idea to create liquid simulation (flooding street, waterfalls, water explosions etc.) and play it back in Unity. As fx guy with DK2 at home this is something I would love to try experiencing inside Rift. I am really new in Unity, so I would really appreciate if anybody can help me with loading these mesh sequences to Unity. I understand its very performance intensive, but maybe I can try to optimize resolutions a lot.

Thank you, Tomas.
    This topic has been closed for replies.

    17 replies

    Up and Coming
    September 15, 2014
    I'm not sure what you need help with exactly, but you could try Googling 'Unity blendshapes'.
    If you're looking for more basic info then try 'Unity FBX import'

    Hope this helps! (And is relevant to what you want!)
    Up and Coming
    September 15, 2014
    Thanks for info, but i have differrent situation. I have sequence of meshes, every mesh have different polycount. So blendshapes are not suitable for me. I need some script for reading sequence of meshes and switch them one by one across playback.


    Tomas.
    Inspiring
    September 15, 2014
    I've done something like this before using maya's fluid dynamics conveted to poly's.
    I dont have the script handy, but it was pretty simple:
    load an array with all your meshes, have them turn on/off at set intervals based on time.deltatime.
    So for 24fps playback you'd to turn on/off 24 meshes within 1 second of your time.deltatime var

    Though i must warn that this is not very efficient and should only be used as for showcase pieces in your scene.
    Up and Coming
    September 15, 2014
    Thank you Mark,

    I very apologize, but realy dont understand, what do you mean. Scripting in Unity is tottaly foerign for me, I am big beginner in this. Can you help me with this, best in steps?

    Thank you for assistance.
    Inspiring
    September 15, 2014
    I'm pretty busy this week but i'll see if i can put something together when i have a bit of time to go over it.
    I'll get back to you once i have a chance to work on it
    Up and Coming
    September 15, 2014
    Really appreciate your help Mike!

    See you later, T.
    Inspiring
    September 17, 2014
    Ok here you go!

    edit: see below for working version

    I only tested it with a series of cubes though it should work on higher res meshes. Like i mentioned before this is not going to run very well but it should give you a starting point at least.

    just attach this to an empty GO, assign your meshes to the meshes array (make sure there are no empty elements), set your playback speed and hit play

    Show off what you do with it if you can!
    Inspiring
    September 17, 2014
    edit: see below for working version

    Here's a quick video of what you can expect to see using a maya fluid converted to poly's
    http://youtu.be/EuYoe1QJWD0
    each frame is a separate polycount ranging from 200 - 2000
    Up and Coming
    September 17, 2014
    oh! you are Master! Thank you so much. I will try it today and make some dk2 demo for share.

    Thanks Mike,

    T.
    Up and Coming
    September 18, 2014
    This is quick test. Polycount is around 1 mill polys, but growing in time. However, data size is very uncomfortable, so this short animation (70 frames) has 900 MB! So, if you have fast internet you can try it. I can create some youtube if somebody want that. Is there any other method how to attach multiple objects into that script? I did it manualy one by one and its quite slow if you have lot of frames.

    Playback is very smooth, on my I7 4.GHz, GTX 770, 16 Gb Ram.

    http://we.tl/UAqarGDJAj

    Even though, possibilities are endless :) Smoke/fire simulations, Destructions (Maya Ncloth/DMM), cloth simulations or Realflow/Bifrost liquids....etc. If you have guys some interesting idea you would like to experience, let me know.

    Tomas