cancel
Showing results for 
Search instead for 
Did you mean: 

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

Thomixioso
Level 2
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.
17 REPLIES 17

Boff
Level 2
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!)

Thomixioso
Level 2
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.

MikeF
Level 10
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.

Thomixioso
Level 2
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.

MikeF
Level 10
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

Thomixioso
Level 2
Really appreciate your help Mike!

See you later, T.

MikeF
Level 10
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!

MikeF
Level 10
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

Thomixioso
Level 2
oh! you are Master! Thank you so much. I will try it today and make some dk2 demo for share.

Thanks Mike,

T.