FBXSharpie icon indicating copy to clipboard operation
FBXSharpie copied to clipboard

LayerElementUV

Open sjc9999 opened this issue 4 years ago • 3 comments

I have a file using this: LayerElementUV: 0 { Version: 101 Name: "uv" MappingInformationType: "ByPolygonVertex" ReferenceInformationType: "IndexToDirect"

Which means the UV has it's own set of indexes does your code work with this? The GetTexCoords don't seem to be right.

sjc9999 avatar Mar 04 '20 19:03 sjc9999

The problem appears to be this line in your code:

texCoords.Add(ParseVertexAsVector2(layerValues, layerIndices, mappingMode, referenceMode, vertexIndex));

the line vertexIndex++; needs to be inside the inner for loop.

sjc9999 avatar Mar 04 '20 22:03 sjc9999

@sjc1832 sorry for such a long delay in replying shoudl be able to go full swing again now. I think the issue may be in

private int ParseVertexIndex(int[] layerIndices, string mappingNode, string referenceMode, int controlPointIndex, int vertexindex)

Would you be able to send a test file so that i can try diagnose...

UkooLabs avatar Jun 09 '20 04:06 UkooLabs

@sjc9999 I am running into the same problem but with all of them including normals and such. Did you find a final solution? I moved the counter to inside but it gives me a out of bounds index. I know this is from quite awhile ago but was hoping you could still dig it up :).

BradChase2011 avatar Nov 25 '22 00:11 BradChase2011