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

ColladaExporter produces 6 nodes for each node in the original .dae #779

Closed
Blast545 opened this issue Apr 21, 2021 · 2 comments · Fixed by #802
Closed

ColladaExporter produces 6 nodes for each node in the original .dae #779

Blast545 opened this issue Apr 21, 2021 · 2 comments · Fixed by #802
Assignees
Labels
bug Something isn't working

Comments

@Blast545
Copy link
Contributor

Blast545 commented Apr 21, 2021

Environment

  • OS Version: Ubuntu 20.04
  • Source build

Description

  • Expected behavior:
    Generated output dae file with 1 node for each node in the input dae file.
  • Actual behavior:
    Generated output with repeated nodes.

Steps to reproduce

Working on top of #763 (mainly to have available the test file and submeshes fix).

On top of the environment files, I'm running:
ign gazebo -v 3 -s -r --iterations 1 src/ign-gazebo/test/worlds/collada_world_exporter_submesh.sdf

to get a exported .dae with the contents of the original tunnel_tile_6. I would expect the final result to have as many nodes as the original .dae file. However, the final result in this scenario has 6 nodes for each original node. They repeat in regular steps, that is, in the final result file:

node_0, node_5, node_10, node_15, node_20, node_25 are equivalent.
node_1, node_6, node_11, node_16, node_21, node_26 are equivalent.
And so forth.

Adding a video to show the problem:

bug_exported_nodes.mp4
@Blast545 Blast545 added the bug Something isn't working label Apr 21, 2021
@Blast545 Blast545 self-assigned this Apr 21, 2021
@Blast545
Copy link
Contributor Author

Blast545 commented May 3, 2021

The main cause of this issue is related to the fact that models in fuel like this one: Tunnel Tile 5 have in their model.sdf the meshes loaded once for a main visual and later the mesh is loaded several times, once per each sub-mesh. Attaching the model.sdf file of that model for reference (in.txt format, github reasons).
model.txt

#802 Addresses the submeshes being exported as the complete mesh of the file, now the only part exported is the submesh marked with the sdf tag .

I think the ObjLoader or the ColladaLoader shouldn't be importing the whole mesh file if a submesh is selected, although this can be considered a separated issue.

@Blast545
Copy link
Contributor Author

Blast545 commented May 5, 2021

I just realized the MeshManager is able to load meshes only once per file here, so I don't think there's an important issue loading the whole mesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant