.dae multiple Triangles nodes in one Geometry node cannot be displayed

.dae multiple Triangles nodes in one Geometry node cannot be displayed

jiaqzhao
Not applicable
753 Views
21 Replies
Message 1 of 22

.dae multiple Triangles nodes in one Geometry node cannot be displayed

jiaqzhao
Not applicable

[ FlexSim 24.0.1 ]

If there are multiple <triangles> nodes under the same <geometry> node, the .dae file cannot be displayed in flexsim. I have put a snapshot as follows, this file is not supported in flexsim.

1706886736944.png

0 Likes
Accepted solutions (1)
754 Views
21 Replies
Replies (21)
Message 2 of 22

philboboADSK
Autodesk
Autodesk
Accepted solution

I can find nothing in the collada specification to support your assertion that multiple <triangles> elements are allowed under the same <geometry> element.

Please provide supporting evidence from the specification if you want us to add an issue to the development list.

"The <triangles> element declares the binding of geometric primitives and vertex attributes for a <mesh> element."

COLLADA – Digital Asset Schema Release 1.5.0 Specification (khronos.org)



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 3 of 22

jiaqzhao
Not applicable

From 5-90 in the document it mentions that the <triangles> can be more than 1 under the node of <geometry>. The purpose is that different triangle groups can be defined different material (color).

1706890467015.png

0 Likes
Message 4 of 22

philboboADSK
Autodesk
Autodesk
Please post an example dae file with screenshots showing how it should render vs how it does render currently.


Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 5 of 22

jiaqzhao
Not applicable

Please check this post, https://dev.gorilla3d.de/view.php?id=61. It is exactly the same question as I asked.

0 Likes
Message 6 of 22

philboboADSK
Autodesk
Autodesk
That link, like your question, only has a snippet of dae data, not an actual example file or screenshots demonstrating the expected result.


Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 7 of 22

jiaqzhao
Not applicable

I don't have relevant models either. However, I think it should be supported as it is mentioned in the document that the <Triangles> nodes can be more than 1 under the <Geometry> node.

0 Likes
Message 8 of 22

philboboADSK
Autodesk
Autodesk

If you don't have relevant models, how do you know it "cannot be displayed in flexsim" and why would you ask this question on this site?



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 9 of 22

jiaqzhao
Not applicable

The .dae file with multi triangles is created by my plug-in, and I tried to refer to it and it could not be displayed. Then I tracked and found that the problem is about multi-Triangle nodes. I can provide you the .dae file I generated, but I am not 100% sure how it should be looked like..

0 Likes
Message 10 of 22

philboboADSK
Autodesk
Autodesk

If you are writing the plug-in to purposefully make it appear in FlexSim, then adjust your code so that you output in a format that works with FlexSim's importer. Write each set of triangles to its own <mesh> element if necessary. <triangle> elements aren't even children of <geometry> elements in the specification; they are children of <mesh> elements. This sounds more like a problem with your exporter than FlexSim's importer.

Adjust your plug-in until it does what you want. Test it with multiple applications that can import collada files.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 11 of 22

jiaqzhao
Not applicable
Yes, <Triangles> node is the child of <mesh>, I also did it in this way. Don't you think multi <Triangles> nodes under the same <mesh> should be supported in FlexSim?
0 Likes
Message 12 of 22

philboboADSK
Autodesk
Autodesk

What I "think" is irrelevant. You haven't provided enough information to demonstrate an actual issue that can be investigated. Only snippets of data written by your own plugin without an example demonstrating that FlexSim's importer is working incorrectly.

And even if you do produce a working example demonstrating an issue, the answer will be that we will add a case to our development list to look into it, and if you want to resolve it in the meantime, then you'll need to adjust your data so that it works with the current importer. Possibly by adjusting your code so that you have one material and set of triangles per mesh.

FlexSim's renderer doesn't support multiple materials per mesh anyways, so it would need to split meshes up by material. You might as well just adjust your plugin to do that directly.

Modern 3D applications don't support the old OpenGL fixed-function pipeline mechanisms of adjusting the material state in the middle of geometry specifications with deprecated glBegin() and glEnd() calls; they use frame buffer objects and vertex buffer objects to optimize the draw calls for the graphics driver.

Are you trying to find a solution or are you just trying to complain?



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 13 of 22

jiaqzhao
Not applicable
Thank you for your detailed answer. Of course I am trying to solve the problem. I can change it in my code, but I still want to have multi <Triangles>. The reason is these triangles come from the same Geometry block, if I split it into several geometries in collada it will change the structure when I import it into another software, as there are more geometries than before. That's why I ask this question. Besides, I think multi <Triangles> is allowed in one <mesh> as the specification illustrated. So maybe it is better to support this in FlexSim.
0 Likes
Message 14 of 22

Jeanette_Fullmer
Community Manager
Community Manager

Hi @royjuventus29, was Phil BoBo's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes
Message 15 of 22

jiaqzhao
Not applicable

Hi, I have changed my codes to make only one <Triangles> in the <mesh>, but it still does not work in FlexSim. It can be successfully displayed in OpenRAVE software. I have attached both Collada file and its display picture. Can you have a check and solve this issue? Thank you!

CNCmachine.dae

cnc.jpg

0 Likes
Message 16 of 22

philboboADSK
Autodesk
Autodesk

Your dae file does not pass the Kronos Group's COLLADA Coherency Test available from sourceforce.

1707854259469.png



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 17 of 22

jiaqzhao
Not applicable

I have downloaded it but it can not be installed in my laptop. It seems it does not support the version 1.5.0. I have changed it into version 1.4.1. Can you try this new file and tell me what it indicates from the verification. Thank you!cncmachine2.dae

0 Likes
Message 18 of 22

philboboADSK
Autodesk
Autodesk

Below is the output for cncmachine2.dae:

1707855363187.png



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 19 of 22

jiaqzhao
Not applicable
It seems that this software does not support "Normal" in <mesh>. All the errors are going to the "Normal" definition in the <mesh>. The range 66 is no problem actually. Can you please check this issue?
0 Likes
Message 20 of 22

philboboADSK
Autodesk
Autodesk

I tried importing the file into other software packages, and it came in so poorly with so many errors and warnings (see below for an example in 3ds Max) that I assumed your exporter wasn't following the schema properly.

1707857224678.png

That's why I tried using tools from Kronos Group to try to debug what is wrong with your file. The Coherency Test reports tons of errors and their COLLADA2GLTF program just fails completely (as FlexSim's importer also does on your shape).

"Checking this issue" for you is beyond the scope of FlexSim technical support. Updating your exporter to write collada files that are properly composed is up to you.



Phil BoBo
Sr. Manager, Software Development
0 Likes