Animating Blender collada export in three.js - animation

http://www.diviniaro.com/WGClient/js/three.js/examples/webgl_loader_collada_Gate.html
After trying several things we're just left at a loss to get the exported animation from blender to load. I have noticed a few differences from the example "monster.dae" file in the collada loader. No matter what we've tried the animation just never seems to start.
Other opinions and a second set of knowledgeable eyes would be appreciated. The animations play fine in blender. There are 31 keyframes. There are also no errors on the console.
EDIT:
I think that this issue pertains to these issues with the three.js collada loader.
https://github.com/mrdoob/three.js/issues/2963

Related

Sketchup to Blender to Animated GLTF into Cesium nightmare

I would be grateful for some suggestions for best best practice.
I am a proficient user of Sketchup for a dozen years. I can make my way around blender.
I have a need to model a wind turbine which ends up in gltf and imported into cesium with animated blades and orientation (ie. two animations).
Over the last couple of weeks I have learnt how to animate the blades in the correct plane in blender at appropriate revolution speed. I now have an animated model ready for export with seemingly good structure / hierarchy of parts.
If I export to fbx the blade rotation is correct but materials and textures are missing. Plus I can't migrate it to Gltf as every option I try fails.
If I use the gltf exporters from Khronos when running the animation the blades disappear altogether. If I use the other gltf exporter the blade angle gets corrupted (unlike fbx) and no animation survives the export. If I import the fbx back into blender the model is intact (except no materials) and the rotation works as exported. If I export as Collada / dae the blades drop from the top of the model to the bottom and there is no animation.
I have played hours of videos, searched and read endless Web pages but after weeks of effort I have failed to get anywhere near my goal - an animated gltf that I can import into Cesium.
Every step of the way is plagued by imponderable next steps to fix the problem. I have run out of puff.
I would be hugely grateful for some best case suggestions on doing something which seems like it should be simple but simply isn't.
Regards
dawrightau

three.js / A-Frame ObjectLoader does not load Texture and positions Meshes wrongly

We have an issue with exporting our 3D Assets and animations correctly so that three.js can correctly display them.
All our 3D artists work with Cinema4D so we need to go through blender to export a three.js compatible JSON. They export the scene as FBX and then import it to blender. This seems to work fine. The model looks good there (with Material View set in Preview Window) and the simpler models we exported even worked with textures and animations.
But we now have a scene where, when we load the resulting JSON, some of the meshes are flipped 180° (but only some - the trees) and one of the models (Santa model) is not textured. They all look fine in blender.
When loading the JSON in https://threejs.org/editor/ you will immediately see the issues:
Is this an export problem? Can we fix it by tweaking the export params? Will we need to adjust the model in blender?
I would advise a couple things here:
File a bug on three.js including the .blend file
Try freezing transforms in Blender or C4D before export
Perhaps try a different three.js-compatible blender exporter, like glTF-Blender-Exporter.

ThreeJs and Blender model without texture

I'm new to both Blender and ThreeJs and searched a lot before asking. I created a model with Blender and esported it as .dae so I can load it in the html canvas. The problem is that only the model is loaded and not the textures. I'm doing something wrong or it's the loader that somehow causes the problem?
Here is the sample:
http://provasitimek.herobo.com/firstImport2.html
and the code:
https://github.com/MarcinKwiatkowski1988/learningThreeJs/tree/master/ThreeJs_and_blender
PS. the blender version is 2.70 (so maybe the problem lays here?)
PS2: So, after many attempts, these are my conclusions:
to get the color of the object, you have to choose the Blender renderer and not Cycles renderer
the export to the file .dae is not realy significant, should working with all options (or at least I didn't find any differences between files exported with different options)
if you use Blender renderer and any basic materials (Basic, Lambert, Phong) you get only the color on the object rendered in threeJs: so, for example, if you apply a trasparency to you object on blender, you will not see it on the rendered object on threeJs
with my current level (i just started to learn threeJs and blender 2 weeks ago) this is as far as I can help. Hope someone with higher skills like #mrdoob would figure out what the problem is
THREE.js does not pair models and textures until you actually make a mesh. Export The model and texture separately, load them separately and call
new THREE.Mesh(blenderGeometry,blenderTexure)

Unity animation translation error

I am having an issue in unity. I have an animated model made in blender imported into unity. When the scene starts the model is the correct size and is at 0,0,0. When trying to use a java script to play an animation the model moves about a meter and scales by about half, the animation does play on the small model. The model was made in blender and is not anything out of the ordinary, the animations play in blender with out any issues. It was imported as a blender file not an fbx. Trying to import it as an fbx produced too many issues. The import did not cause any issues but two things of note: the rig was imported with -90x rotation and the animations can only be used as lagacy. The java script is not complicated it is only using "animation.CrossFade( "english_hook" );" or any of the other animations. I have tried to see if anyone else on the internet has seen this issue but either they ave not or I am not searching for the right problem. I am fairly new to unity and have moderate exprience in blender. Has anyone seen this kind of issue, know how to fix it or have any ideas?
Are you using Unity4? You might have to mark your animation as legacy, open your imported model in unity inspector, select "Rig" tab and set your animation to legacy.

Skeletal animation using parsed data from COLLADA file in Three.js

I have experimented with the example COLLADA parser colladaloader.js and imported a skeletal animated collada model "Seymour_anim2.dae" from http://collada.org/owl/browse.php?sess=0&parent=131&expand=0&order=name&curview=0 using mrdoob.github.com/three.js/examples/webgl_loader_collada.html and http://mrdoob.github.com/three.js/examples/webgl_animation_skinning.html as an example. The loader seems to parse and store the skeleton structure and some skeletal animation data either in collada.animations or collada.dae.animations. The problem is that I can't get the skeletal animation to work using the methods in the examples.
Now, I'm wondering is there something wrong with the COLLADA parser, or are there some other methods/tricks in Three.js that could be used to play the skeletal animation of my model? I'd love to hear if you have any ideas how this could be done neatly in Three.js or is this even possible yet.
Edit: I have now also tested the model with GLGE framework and it loads, renders and animates it correctly. However, it would be very good to have skeletal animation for COLLADA model in Three.js because developing with GLGE is too time consuming and troublesome and GLGE is quite inactive project compared to Three.js. Skeletal animations are important for increasing immersion in a virtual world.
I've myself given up on Collada and went on using the included OBJ loader.
But halfway through I've found one thing that might be worth testing out.
There seems to be an alternative Collada loader, here: github ColladaLoader2.coffee
Hopefully it works somewhat better. Please let me know :)

Resources