Is blender the best modelling tool to use with Three.js? - three.js

I started working on HTML5 canvas last year. Soon I wanted to experiment with it in 3D. I came across Three.js (http://threejs.org) and I started having fun with it.
When I came across some other examples on the web that use Three.js I realized that there was a way to actually create very realistic objects to use in Three.js and after a search I came across blender (http://www.blender.org).
So far it has been a blast! It allows one to model virtually anything very easily.
But now I am beginning to wounder whether there might be another modelling tool out there that anyone here has come across that easily export into an "js" file that can be imported into Three.js.
The reason I ask is because I want to weigh my options so as to not be heavily dependent on one model tool if others are out there.
Thanks

Related

FBX models look like folded in three.js

recently I started working with models from mixamo.
To give those models several animations I first extracted animations from some meshes, put them together and gave them to all the fbx- meshes.
That worked most of the times.
Then I got aware that these animations can be simply downloaded and so did I using a similar procedure to collect some animations and share them with the meshes.
BUT now the meshes zombie- look like
Is this a known issue ? I know the odds are against me as many people use mixamo. If someone already stumbled about it, please be so kind and tell me a solution.
Thanks for your time.
edit:

ThreeJS: is it possible to simplify an object / reduce the number of vertexes?

I'm starting to learn ThreeJS. I have some very complex models to display.
These models come from Autocad files that my customer provides.
But sometimes the amount of details in the model is just way too much for the purpose of the website.
I would like to reduce the amount of vertexes in the model to simplify the display and enhance performance.
Is this possible from within ThreeJS? Or is there maybe an other solution for this?
There's a modifier called SimplifyModifier that works very well. You'll find it in the Three.js examples
https://threejs.org/examples/#webgl_modifier_simplifier
If you can import the model into Blender, you could try Decimate Modifier. In the latest version of Blender, it features three different methods with configurable "amount" parameters. Depending on your mesh topology, it might reduce the poly count drastically with virtually no visual changes, or it might completely break the model with even a slight reduction attempt. Other 3d packages should include a similar functionality, but I've never used those.
.
Another thing that came into mind: Sometimes when I've encountered a too high-poly Blender model, a good start has been checking if it has a Subdivision Modifier applied and removing that if so. While I do not know if there's something similar in Autocad, it might be worth investigating.
I updated SimplifyModifier function. it works with Textured models. Here is example:
https://rigmodels.com/3d_LOD.php?view=5OOOEWDBCBR630L4R438TGJCD
you can extract JS codes and use in your project.

Inverse kinematic animation

I'm trying to find or create a working example of inverse kinematic posing in three.js. Ideally I would like to export human models from Makehuman via their Collada exporter, load them with THREE.ColladaLoader and set them into different poses in three.js programmatically or through some dat.GUI interface. A bit like an artist doll implementation - I don't need animation, but real-time feedback when tweaking the pose would be nice, and inverse kinematic style posing would be highly preferred.
I've been studying and searching information for days. This http://www.youtube.com/watch?v=6om9xy6rnc0 is very close, but I was unable to find any example code or downloads. The closest working example I've found is this: http://mrdoob.github.com/three.js/examples/webgl_animation_skinning.html However that appears to use predefined animation frames, which in turn appears to manipulate the bones in forward kinematics manner so that was not much help either.
I couldn't even find a model for testing, as I don't know what to look for when searching something with IK rigs/skinning/bones compatible with Three.js. Makehuman does seem to have plenty of rigging export options, I don't know if any of those are usable.
Is there a usable IK system in Three.js, and if so, are there any working examples, working human models, or any hints on which exact rigging system/workflow should study to accomplish this? If direct Collada support is not possible, creating the characters in Blender and exporting them is an option too..
EDIT: found this live demo http://www.akjava.com/demo/poseeditor/ but the code is totally unreadable.
I don’t feel competent enough to answer your question, but I’ll post three links which may put you on the right track.
wylieconlon/kinematics
– a great demo of 2D inverse kinematics animation. The code is totally readable.
https://www.khanacademy.org/computer-programming/inverse-kinematics/1191743453
– another demo, this time less flexible but more terse.
How to calculate inverse kinematics
– a rabbit hole of links. Just in case you’d want to dive right into the thing.
This seems promising.
Fullik : javascript fast iterative solver for Inverse Kinematics on three.js
is a conversion from java to Caliko 3D libs
Caliko library is an implementation of the FABRIK inverse kinematics (IK) algorithm
https://github.com/lo-th/fullik

Overall strategy for storing animated meshes

I've been trying to figure out how you'd take a mesh generated in a program like 3ds max and bring that into your game with animations, textures, etc.
I've looked at FBX and Collada, but from what I've read, they're used as an intermediate step between the modelling software and some final format that may be custom to the game. What I'm looking for is a book or tutorial that would go over in a general way what you would store in your custom file, how you would store animation data, etc.
Right now I don't really have a general plan of attack and all of the guides I've seen stick to rendering a few triangles.
It doesn't have to be implementation specific to OpenGL, although that is what I'll be using.
Yes Collada is an interchange format.
What that means is it is very much generic. And if I am right that is exactly what you are looking for!
You can use a library such as Assimp to load collada into a generic scene graph, and then have your game/renderer use it directly, or preprocess and then consume it.

3d software for real time character animation

My company is considering creating a interactive advisor(3d) for our customer. I was trying to find appropriate software for 3d modeling of human figure (realistic).
We are taken into consideration two approaches.
First option is to use one of the 3d modeling software for a creating model and the with help of some internal scripting language animate the model. The software should act as rendering server because 3d model should be reacting on user action in some way. Therefore we are considering applications that has some kind of scripting language.
The second option is to use 3d modeling software to create a character and then animate it with OpenSceneGraph.
There is also the hard way: do it all with OpenGL but I do not think it is a right way.
The project is at a very early stage of negotiations but I have to collect some knowledge to realize if its even possible to do that is such way. Therefore I have few questions:
Is it possible to use a software like Cinema 4d/Maya/Blender to animate in real time single character?
Which software would be the best to model a character (price is not an issue, what matter is rendering speed and very good 'realitness'). We are considering Maya, Cinema 4D, Blender or ZBrush, Poser, 3DMax (however last three does not have scripting language as far as I know).
Can OpenSceneGraph can be easily use for animating any character from software listed above?
As you can see the main issue is 3d software and question if it is possible at all :). I appreciate all suggestions.
Thank you in advanced.
The probably best way to do this is using a 3D game engine, like the CryEngine3 (it's free for noncommercial projects) or the Unreal3 engine. Technically you're interested in only the character animation, but you'll need sophisticated material and lighting support in addition for multi layered shaders. Those engines can do it.
3D Modelling programs like you suggested are not optimized for realtime rendering. Although Blender has a game engine built in with quite thorough shader support it may a bit hard to get started with it. But for modelling the character and get a high quality preview it's very well suited.
Is it possible to use a software like Cinema 4d/Maya/Blender to animate in real time single character?
The realtime rendering of each of those programs is meant as preview, not the final product. Blender has the game engine, but this is not optimized for such kind of things.
Which software would be the best to model a character (price is not an issue, what matter is rendering speed and very good 'realitness'). We are considering Maya, Cinema 4D, Blender or ZBrush, Poser, 3DMax (however last three does not have scripting language as far as I know).
Scripting helps you only so much with animating a character. You'll also need tons of reference and pose data from which the animation system can blend together the expression.
Can OpenSceneGraph can be easily use for animating any character from software listed above?
Not really. Use a game engine instead if you want to get this done fast. Take a look at the CryEngine3 gallery. And like said: The SDK is free if this is noncommercial. If the program goes commercial you'll require a licence though.
1.- http://www.thepixelart.com/10-best-real-time-animation-tools/
2.- I use Zbrush with 3D Studio Max. Combining those programs you can model a character really fast
Those 3 you mentioned (Zbrush, 3DMax & Poser) actually have script languages
Zbrush => ZScript
3DMax => MaxScript
Poser => Using Python => http://d3d.sesseler.de/store/tutorial/run_python/RunPython.pdf
3.- No idea on this :)
Luxology Modo is a very good option for your needs.

Resources