cnr-isti-vclab / meshlab

The open source mesh processing system
http://www.meshlab.net
GNU General Public License v3.0
4.55k stars 816 forks source link

VRML export does not support multiple textures #156

Open 3DLIRIOUS opened 7 years ago

3DLIRIOUS commented 7 years ago

When saving to VRML (.wrl) format, multiple textures are not supported, although it correctly lists all of the texture files in the export box. Multiple textures are supported in the successor x3d format, however I require actual VRML files.

Attached is a sample 2 texture file for testing purposes.

sphere_2_texture.zip

mcallieri commented 7 years ago

I'm not sure it can be done... as the texture coordinate object does not have a field for texture index, it is possible that we need to split the object in sub-elements, which is a pain, especially for such an old format

3DLIRIOUS commented 7 years ago

I've discovered that Wings3D can export VRML files with multiple textures; see attached for a conversion of the above file. Perhaps MeshLab would be able to use a similar approach.

I understand that VRML is an old format, but unfortunately it is still relied on by certain software. For example, VRML seems to be the only open format that supports textures and is accepted by 3D Systems' 3D Print software (slicing and control software for ProJet CJP x60 full color 3D printers).

sphere_2_tex_Wings3D(1Y).zip

mcallieri commented 7 years ago

seems to me the solution used in this example is to split the object in multiple shape/geometry entities. Blender, for example, loads it as two separate entities.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jonathanrswift commented 3 years ago

I just wanted to add weight to this issue - stale as it apparently is.

I came up against the exact problem described above - after importing an .obj with multiple texture files, I could not export a .wrl without gaps in the texture because Meshlab could only accept one of them.

I was able to workaround the issue by using Wings3D (thanks @3DLIRIOUS !) - so it's clearly possible within the file format!