three.js increases file size? - three.js

I just downloaded MayaThreeExporter and I wanted to export out just a model from maya. I imported an obj file which is 34 MB into maya and try to export out a three.js file, with out adding textures or lights. But every time I do that, the size of the three.js file goes up to 77MB. More than double. Can someone please help me understand why it would increase the file size? or is there a way to reduce the size?

Related

Make Paraview animation by changing the data on a fixed geometry

I wish to construct an animation in Paraview starting from some files obtained in an optimization process. I have a mesh made of tetrahedrons and at each iteration I have a scalar field on this mesh.
I could create a VTK file for each iteration, but such a file is larger than 100Mb and it would take more than 15GB to store all the vtk files. Moreover, the geometry part in each vtk file is the same, so I guess there is a more efficient solution. Therefore my question:
Is it possible to make animations in Paraview by changing a scalar field on a fixed geometry?
(if this is not the right forum to ask this, please let me know where it could be more appropriate)

unity3d - large file with animations

I have a project where a large truck model is used (around 500MB), very detailed cad model is converted to fbx format in 3dsmax.
There are animations in the fbx model too.
Question 1:
Should I have all the animations as clips in the same fbx file or have separate animation files.
As having seperate fbx files for each animation will increase the overall app size.
Question 2:
How to optimize the mesh which is around 500MB with lots/plenty of child objects (as is it is a very detailed mesh) for performance. Will culling reduce draw-calls or combining mesh reduce draw-call. Is there a way to reduce tris/polycount in the mesh for optimization.
If you really care about the app size - go for the same file. Otherwise it's generally much more convenient to have separate .fbx files for animations.
You can try limited dissolving and decimation in Blender to reduce the vertices/poly count.

FBX SDK Get Animation

I am mainly using EvaluateGlobalTransform to get animation from fbx files. This method works with the humanoid.fbx in the samples\ViewScene directory and another ascii format fbx model that I made in Blender.
However, when I export the same Blender model in binary format and try to get the animation from it, the result is totally wrong. The matrices of every frames that I got by calling EvaluateGlobalTransform are mostly same. Here are some snippets of the results.(it is too much to print all of them so I wrote them in a file)
The wrong one:
The right one:
I am sure that all the fbx files that I use contain at least one animation stack and can be animated perfectly if you open them in FBX Review.
It is worth mentioning that the size(not storage size but spacial size) of the model I made in Blender is somehow larger in binary format than in ascii format.
Please Help Me! Thanks!
It's me again. I think I have an answer to my own question. The reason why all matrices are same in binary fbx file but not same in ascii fbx file is that the two animations, which contains all the matrices, are not the same one. In binary file the default take is Idle Animation, whereas in ascii file the default take is Walking Animation. When I extracted matrices from the fbx files, I actually extracted Idle Animation from binary fbx file contrast to Walking Animation from ascii fbx file.
Therefore, I only need to find a way to change the default take from which I extract animation. I think I have solved my problem. I hope this can solve your problem too.

Three.js FBXLoader failed to load a big FBX model in three.js

When I load a large FBX model, which is 100MB in three.js, Chrome crashes, though it doesn't crash when I load a small FBX model. Can anyone tell me how to fix it?
Load less than 100MB?
100MB is an extremely large single asset for a page, three.js or otherwise. I highly recommend some optimization of your asset. Even if you get the contents into memory, three.js may not be able to render the contents.
Assuming everything in there is absolutely required, you could break the model into smaller chunks and load a whole bunch of assets. That might be possible. You also might have better luck with other 3d solutions (non-JS webpage) which could handle such a (still quite fat) asset.

Vertex Animation stored in FBX file without using Point Cache?

Everything I've found seems to indicate that in order to export a vertex animation a point cache file must also be generated, but that means in addition to the FBX file a whole new folder with that cache data must also be built. Is there no way to store the (vertex) animation data entirely in the FBX file?
That's correct. The FBX stores the mesh/topology, and the point cache stores the offsets of the vertices over time.
The FBX file format stores mesh topology, shapes and skin deformers, but not the actual vertex cache data since it can be of various formats, such as MCX (Maya), PC2 (Max) or ABC (Alembic). Also, for access and performance reasons, it is preferable that the cache data stays in a separate file so that software can read asynchronously from it without having to deal with the complexity of the FBX data model.

Resources