Forums > Jitter

3D Model animated with audio

September 24, 2013 | 11:33 am

Hey there !

I’m trying to find a way to modify coordinates of a 3D Model (.obj) with audio values, or just with values.

For example, I have a face model (Mouth, eyes…) and I want my model to close eyes. How can I modify the coordinates for the eyes in max ?

I know I can modify shades, colors and so one, but what about changing coordinates ?

Thank you very much for your help.


September 24, 2013 | 11:58 am

The most effective way to do this would probably to create a skeleton for your model in your 3D modeling software, and then export as a DAE file that can be read by jit.gl.model. From there, you can either animate individual bones, or you can set keyframes in the 3D software and scrub through them using animtime messages.


September 24, 2013 | 12:06 pm

Thanks Andrew !

I think I got it with the keyframes, but how do you animate individual bones ? Also with animtime messages ?


September 24, 2013 | 4:46 pm

check out the copynodestoclipboard message of gl.model

<code>

– Pasted Max Patch, click to expand. –

</code>


September 25, 2013 | 8:12 am

Ok thanks !

I’m a beginner with visuals, and I just see that I was not asking the good question, sorry.

I have done Shape Keys in Blender, and I would like to manipulate them in max. It means importing the file and morphing from one shape key to another in max.

Does that make sense ?


September 25, 2013 | 8:47 am

Shape key states in Blender are not exported to max. The shape key add-on for DAE files only works when you re-import the DAE model back into blender.
If you make a 3d model and export each shape key as a separate model you can then load all the model "states" into a bunch of jit.gl.model objects.
Enable @matrix out 1.
Now plug two models into a basic jit.gen object. Input 1 and 2. Create a param object inside the jit.gen object. Call it crossfade for example.Plug that into the mix object.

Now get the output of the jit.gen object and connect it to jit.gl.mesh.
The fade parameter will allow you to crossfade from one model position to another.
This will only work for two models. I’m sure a gen wizard could easily make a patch which would allow you to crossfade between 9 different inputs.


September 25, 2013 | 8:49 am

Excellent ! Thanks a lot !

I got it theoretically, I’ll try the practical work !


September 26, 2013 | 8:45 am

Alright it works, but as expected it’s decomposing every piece of model to morph. One model state is bursting to another. Is there a way to avoid this ?


October 2, 2013 | 4:21 pm

With this approach, it might make sense to export a separate model for the parts that shouldn’t morph. The jit.gl.model outputs each drawgroup as a separate matrix, so that should also be taken into account.


October 3, 2013 | 11:22 am

You have to have exactly the same amount of verts, edges and faces with each model you export (like in Blender once you made the default shape for Shapekeys you can’t alter the amount of verts edges etc..)
Double check that you have the right export options turned on in Blender, I know it took me a while to figure out the right way of exporting them, also very important. Work with triangles not quads, also make sure that your jit,gl.render has primitive_mode set to triangles.
Use the triangulate modifier in Blender to make quads into triangles before exporting them, or use it as a modifier and export with "apply modifiers".


October 4, 2013 | 4:24 am

Forgot to say that the primitive mode for your jit.gl.model objects also has to be triangles or tri_grid, set this for jit.gl.render as well.


Viewing 11 posts - 1 through 11 (of 11 total)