smartGL
smartGL copied to clipboard
animated OBJ workaround
Hi! I know standard OBJ doesn't really support animation, but tools like Blender can easily generate sequence of OBJ files when exporting animated 3D Model. Since, basically, the exported OBJ will practically be the same 3D model with different X/Y/Z locations for each vertices due to deformation, won't it be an easy hack to simply read the sequential OBJ files to support animated OBJs? and have it rendered like how AnimatedSprite is being handled?
kind of like: addFrame(float duration, int rawFileResourceId)
then sequential OBJ files will simply re-use the same textures loaded to the first OBJ.
~creek23
Hi creek23!
good suggestion! I would like to support animation but don't know yet which way to follow (and not enough time at the moment).
Do you think that there must be interpolation of the vertex between 2 frames (like morphing) or just switching the objects at every frame ? For 1st solution we have to be sure that for every frame the number of vertex and mapping remain the same.
Arnaud.
I'm currently thinking of switching OBJ each frame (as per duration) for a quick hack. What we want is to let Blender do the precalculation for deformation, and for smartGL to simply render objects as it is.