Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3DS Max Exporter Naming and Blender Exporter Size #6056

Closed
AlexRablau opened this issue Feb 12, 2015 · 6 comments
Closed

3DS Max Exporter Naming and Blender Exporter Size #6056

AlexRablau opened this issue Feb 12, 2015 · 6 comments
Labels

Comments

@AlexRablau
Copy link

Hi All,

I am having an issue with the exporter plugins for both 3DS Max and Blender. I have a model that is around 50k vertices and a 10MB .OBJ composed for a handful of objects. Using the 3DS Max exporter, I can export to a .js which loads nicely using the JSONLoader. However, the meshes don't have any names and so I can't tell them apart by name in the loadComplete callback. Is the name not being loaded by the JSONLoader or maybe not being saved by the 3DS Max exporter?

So I turned my attention to the Blender exporter to create .json files because I can use objectLoader instead which seems to be the recommended way to load things and it saves the models names! However, the blender exporter takes my 7MB blender file and turns into an over 800MB JSON files. It works fine on individual pieces of my model. My model has a lot of small pieces and I think this may be causing it but how can it be making the file 100x larger?

Anyway, I would love to help figure either of these two out because I want to load a model with materials and be able to identify it's parts.

@AlexRablau
Copy link
Author

I found that the extremely large file size occurs with Blender when choosing to embed the geometry in the final .JSON file. Not embedded it results in orders of magnitude smaller size over all. Trying to load the resulting .json file gives me an error though: "Cannot read property scale of undefined". Is scale not supported in the objectLoader?

@repsac
Copy link
Contributor

repsac commented Feb 12, 2015

ObjectLoader does not yet support non-embedded geometry files (hence the error of the scale property). Because of this that option is not available in the most current exporter found in dev until the ObjectLoader is caught up.

Because you are seeing the option to not embed geometry and because the file size is larger I am going to assume you're using the r70 version and suggest using the latest version in dev which enables the Precision option by default (the r70 version is off by default) which results in large floating point values. Using precision (which defaults at 6 and I commonly use 3-4) makes a huge difference in file size.

@AlexRablau
Copy link
Author

Thanks for the quick feedback!

I did turn the precision on and help cut back the size but it is still so much larger than non-embedded geometry. 4MB for non-embedded vs over 50MB when it is embedded. Why is file size that much larger? I really need the file size to be smaller for what I am working on.
I will grab the dev version and see if the size is any better.

I would love to contribute by making ObjectLoader support non-embedded geometry. Can you point me in the right direction as to where I can fix that?

@repsac
Copy link
Contributor

repsac commented Feb 12, 2015

Sounds like a good sized asset. Concerning file size; this can be a drawback when using an ASCII version of an asset. ASCII scenes do have benefits in production pipelines but are not always browser friendly. Maybe msgpack compression helps?

The three JSON format may not always be the best solution. Depending on the density of the geometry you may have to investigate the other formats that three offers loaders for. Awhile back I was testing getting extremely dense scans into the browser and found the UTF8Loader (#4683) to be what worked best.

@AlexRablau
Copy link
Author

I used the dev Blender plugin and got a much more reasonable size. Do materials work with the objectLoader at this point?

@repsac
Copy link
Contributor

repsac commented Feb 12, 2015

If you view the source on ObjectLoader you can see that materials, objects, and geometries are the only 3 keys parsed in the scene file. So you will get material colours but not textures.

Here is a thread related to textures and ObjectLoader #6054

@mrdoob mrdoob closed this as completed Sep 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants