3D Model animated with audio
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.
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.
Thanks Andrew !
I think I got it with the keyframes, but how do you animate individual bones ? Also with animtime messages ?
check out the copynodestoclipboard message of gl.model
----------begin_max5_patcher---------- 1158.3oc0YtrjZiCEFdM7TnxalMDJKeCyrp2L6xtoprI0TTx1pA0iQxQVz.S p7tGcyzLcZDFhwfWz31xxV+5SGcz4H88wi7xX6v0df+D7UvnQee7nQ5hTELx d+Hu0nc4knZc07n3srrW7lXdj.uSnK9EhXJhRVOsfSdECdRrgSA9fXfeSUYa DkXgXeE1zbddSj+A9G6ioaVSnxJnaEnsvJjHeEgtbAGmKLuFL1ep+DPDTeAl jptD.m5e3KQJzJRpxOkFzz5OynBJZsts89BlWfnHu2ZZi3zscvQuQM4+zuAL XpupzeLdr5mIsjU4r0qwTwu.qBrrwv.Jq.WC1y17Gb0MB.gJvbbs.WH+2I.D s.nXJRfa9DkDJNmsgJNVosFcgZlEFYP2L8k33SfN3kiN+l2fuLSe+zlRx1jk UhqIEXWHtQ5RFHwFRPXzijeRhV8ymot3a+4fzMsf9KcEiTmypVMTAdRQAPFa +BNiI5X65fDcWxdANetK6ZX5c0t9BoUckzp0G10.atAXow5KJT4.XyGd.Kni AVXfY5uwy4Y.1fx.S5S7e6b6qPyBMggF6K3LW3JveHwqUXTQWSqTCsrdw7ib RK3PiV+EsqAlM.lvF2WINAVvPBXedg7UekjWhuMSIsnKHLvIyBGVLqdEaSYA l20LyrLYjIZu.SremjYQCKlkQxwUc8DSyxjQysSLcCr3gEvvkYrscMvLyJis jJHzIvRFV.6YFGi3q6ZjYVsLNxXiE514+rgEx1xI0cc1QwFW9wVuXPmY8Gj9 Pl0uFQhUXvxxoqkPqTmfeNqZu9epPxD+0O2ru.DpZqA3.MM5j7+C8M4V13Ry Y9+v6W9+2rT4O.9ClqfmdlThA+MdurevmVfjlxp8agSPkKT0EDdRKY4Wbgrt bxteuL9sABN2Y9X22..WiqqQKw+BTUaTiio5eLRBN6NTY2YJ6NgbB6yqfHvd wqnzJakbBcmG8qENP+iubxM739lPpfsboC.PTNvt3EMMySd2ueTm+vl8Tg3x dtb57BLEY8o3+wlFcmMf.jAvbT8o69YH5RkMfoVWIHrF.INyz9gLzguIGR3L Pra9bwNOhNx2QhyHpRdTccrkPKXakKJUiP.3YsetVSmfl.AhcQoG1bAkNX4X pqTk+cADLpU9Xuq.BID7MjKcw2y20m0ltd70OCRoacsetjgDD0.0aiwK1RJD qTOVevd27.XTQeqC2VvxKIUYLDunCimo4zbRsGVoyHZBuIdkzsjNug2cLuZ4 pJ++isZYbv4M83lyPE7lfUrhP0mM2QURswQGUoUjhBL83UaKH0pEf081Od.r s5Qc1WmUOpy6ouzy7VnmzdSNsgNpSqnmjy6ZpSnGX+oGXazSvi0vUX+gmvGq I6uqoNgdh6O8D2F8jze5IoM5YV+omYsQO8m2vVYN2apoMqTze1NsYnB1qpA9 vnl1Lsp+lU0FmN8X.XsIfPX+EhAz+FZHaBeFUU8JlWa+jZkHyu3ElNQljI5a ITys5Xx833WIM0ORWBhKyNPHSMXC2DY+tzDuwp14Gi+oJX+qw -----------end_max5_patcher-----------
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 ?
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.
Excellent ! Thanks a lot !
I got it theoretically, I’ll try the practical work !
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 ?
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.
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".
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.