Closed jirisamek closed 6 years ago
@jirisamek I am working on a fix for this problem, thanks for reporting this. See PR #59. I think I may have to split the elements into smaller buffers internally, as this fix works for #56, but right now not for #58; but this is the correct fix with more implementation tweaks required for your case.
Are you OK with me using the model you have provided as part of AssimpKit test cases? The AssimpKit licenses explicitly mention the usage of such files only for testing purpose. Let me know. Thanks!
@dmsurti thank you very much for quick response. The model is not mine. I have downloaded it from https://free3d.com/3d-model/cyprys-house-23761.html, and the licence tag says: "Commercial use License". I didn't find actual text of license so I don't know if it is possible to use it in open source as model in test cases. Also this specific dae seems to have broken textures/materials.
Fixed in #59. In addition to mallocing scene buffers, it also requires ignoring the faces which are not triangulated!
This model contains material colors and/or embedded textures, which is being fixed in #62 and #64.
With #64, the house now has textures as well.
Also this specific dae seems to have broken textures/materials.
@jirisamek Actually this file has all colors for material properties, #64 ensure correct texture and colors are applied to material properties.
Hi, I've same issue with newest code in master branch .
It's throw exc_bad_access in the makeTangentGeometrySourceForNode:
SCNGeometrySource *tangentSource = [SCNGeometrySource geometrySourceWithData:[NSData dataWithBytes:scnTangents length:nVertices * 3 * sizeof(float)] semantic:SCNGeometrySourceSemanticTangent vectorCount:nVertices floatComponents:YES componentsPerVector:3 bytesPerComponent:sizeof(float) dataOffset:0 dataStride:3 * sizeof(float)];
But this crash is only happen on iOS8, if I running it in iOS11, everything work fine
I'm using a model by obj+mtl+jpg
oh, I found the reason why it would crash on iOS 8, because in , it using a constant that only available after iOS 10, it is SCNGeometrySourceSemanticTangent
, here is the define:
FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticTangent API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
@azolyoung AssimpKit
minimum iOS requirement is iOS 10.0 or later, which is listed in the README.md
and in the project home page.
Hi @dmsurti,
I am trying to load house.dae with AssimpKit but during the loading there is an error. XCode stops in
in AssimpImporter
On the row
scnVertices[verticesCounter++] = aiVector3D->z;
withThread 27: EXC_BAD_ACCESS (code=2, address=0x1700fc000)
During loading, there is also message printed in the console:
[SceneKit] Error: C3DMeshElementSetPrimitives invalid index buffer size AssimpKit was compiled with optimization - stepping may behave oddly; variables may not be available.
I am able to open dae in Blender 2.79 and in Cinema4D R18. Command line
assimp info
can load the dae and give this result house_info.txt.I would appreciate any kind of clue. What could be wrong and where? Can it be fixed in model file, AssimpKit, or in Assimp library?