Possible bug in OBJ importer ?

Feb 26, 2014 at 2:12 PM
Edited Feb 26, 2014 at 2:18 PM
I've touched on this before, but thought I would start a fresh thread.

I have an .OBJ model with 5 groups.
The five groups use a combination of materials.
One group may refer to more than one material.
The .OBJ file contains 33 references to these materials within the 5 groups.

When I load the OBJ file via Helix I end up with a model with 33 groups rather than the expected and desired 5 groups.

It seems the importer is making groups/children from each material rather than the OBJ file group.

Is this behaviour intended ?

It makes it impossible to run code on a single group, because its been split up.

When viewed in the model viewer the model appears as desired so there is no problem with mapping the textures.
Feb 26, 2014 at 2:43 PM
P.S. The model loads fine in MeshLab
Feb 26, 2014 at 5:19 PM
Edited Feb 26, 2014 at 5:20 PM
Just pulling the old topic in here : https://helixtoolkit.codeplex.com/discussions/528072

I changed my mind again. I think I was on track when I was suggesting the importer was making too many groups.

Because I can now answer this question :

objo wrote:
Can a group contain meshes with different materials?
In that case it is possible that the importer adds a new model for each mesh. The output model could be changed to a hierarchy, where the first level correspond to the groups.
The answer is yes a group can contain meshes with different materials :)

If that could be be changed to a hierarchy as you suggest then that may work for the best.
Feb 26, 2014 at 9:35 PM
Edited Feb 27, 2014 at 8:39 PM
Was thinking... yeah I do that !

I was concerned that implementing the hierarchy might break a lot of people's code.

I overcame my problem with multiple groups by de-fragmenting my model before I import it into Helix.

I think I have to live with a mesh being broken into groups to suit the materials.

So really it's up to you if you want to change the way it works, though my vote would go for a hierarchy.