-
Notifications
You must be signed in to change notification settings - Fork 51
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
Open .mtl file associated to .obj file #140
Comments
Hi everyone, i have the same question. how do you associate the texture material (.mtl) with the .obj file ? thank you, |
Hello everyone, I have been working on the texture support for meshlabjs, it has been developed on a separate branch and is currently waiting to be merged into the master branch. The mesh file and the texture file must be in the same archive (.zip archives support has been added as well). Although it does not support multiple textures at shader level (only one texture may be displayed), a new panel has been added to the UI where it is possible to check the texture file(s), allowing zoom, pan and display of the unfolded mesh geometry over the texture image. |
Hi Gabyxx7, |
Please @Gabryxx7 , how can i compile it on my side ?
What can i do to build Meshlabjs with this feature ? |
I was having the same issue and I had to merge it with the updated master branch. Furthermore, the vcglib has been updated and some functions had a different name or were declared in other classes. It required way longer than expected but right now it is compiling again on my side and it looks fine, although I am sure there will be issues with the latest changes (e.g unod/redo, even though it looks like is working just fine, the code is not consistent and clean). Could you please pull and let me know? :) I also uploaded a build.bat file I use to compile, along with a texture.zip file in mesh/textured/textured.zip where you will find this cute bulbasaur mesh with its material and texture file. I created the .zip archive with winrar, no special options. As you can see the texture panel works fine, you can enable/disable the texture in the rendering panel (where you also find smooth/flat rendering). As I previously mentioned, multi texture is not supported yet, even though the texture files are properly read and extracted, I still couldn't figure out a way to render them both in a mesh. |
You're welcome @btchouston ! :) I hope this branch will eventually be merged in the master branch; Along with the undo/redo, I think is a quite interesting and requested feature! |
Hi @Gabryxx7, I am getting the following error when I try to generate MeshLabCppCore.js:
I am not sure how to solve the issue. Could you please push the content of folder I tried to use MeshLabCppCore.js file from
If I try to import
|
Hi @Gabryxx7, @btchouston. I managed to solve the issue with build but when I access index page I am getting errors: THREE.WebGLRenderer 71
THREE.WebGLRenderer 71
missing function: _ZNSt3__16locale7classicEv
-1
-1 [Console - before import]
Uncaught abort(-1) at Error
at jsStackTrace (http://localhost:1016/js/generated/MeshLabCppCore.js:1:17016) [Console - after import]
Uncaught UnboundTypeError {name: "UnboundTypeError", message: "Cannot call CppMesh.setMeshName due to unbound typ…c_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE", stack: "UnboundTypeError: Cannot call CppMesh.setMeshName …http://localhost:1016/js/mlj/core/File.js:116:19)"} and I am not able to import Have you had similar issue? Please suggest. P.S. I've pulled vcglib/master and meshlabjs/textureSupport branches.
Could you please check your versions? I would like to compare my versions with yours. Thanks. |
Hi @Gabryxx7 Thanks for adding texture support. In the other machine I'm getting an error before the model is even loaded (i.e. when typing "localhost" in the web browser) Both machines have the same following components:
I ran the build with The missing symbol is coming from muParserLib.bc Do you have an idea what could be the problem? |
Hi all,
when i open an .obj file associated to an .mtl file, the mtl file that contain information for texture is not opened. So my mesh file is not textured. Even those inside mesh/textured folder of Meshlabjs does not work.
You can test it by opening this file ( meshlabjs/mesh/textured/texturedknot.obj ) with http://www.meshlabjs.net/ , you will see that texture is not applied, and this message wil appear :
Am i missing something ?
What should i do to open an .obj file with texture from .mtl applied ?
Thank you for your help.
The text was updated successfully, but these errors were encountered: