admin管理员组文章数量:1386813
In my project, I have several nodes (SCNNode) with some levels of detail (SCNLevelOfDetail) and everything works correctly, but when I add animation using morphing (SCNMorpher), the animation works correctly but without the levels of detail. Note: the entire scene is created in Autodesk 3D Studio Max and then exported in (.ASE) format.
The goal is to make animations using morphing that have some levels of detail.
Does anyone know if SCNMorpher supports geometry with some levels of detail?
I appreciate any information about this case.
Thanks everyone!!!
Part of the code I use to load geometries (SCNGeometry) with some levels of detail (SCNLevelOfDetail) using morphing (SCNMorpher).
node.morpher = [SCNMorpher new];
SCNGeometry *geometry = [self geometryWithMesh:mesh];
NSMutableArray <SCNLevelOfDetail*> *mutLevelOfDetail = [NSMutableArray arrayWithCapacity:self.mutLevelsOfDetail.count];
for (int i = 0; i < self.mutLevelsOfDetail.count; i++) {
ASCGeomObject *geomObject = self.mutLevelsOfDetail[i];
SCNGeometry *geometry = [self geometryWithMesh:geomObject.mesh.mutMeshAnimation[i]];
[mutLevelOfDetail addObject:[SCNLevelOfDetail levelOfDetailWithGeometry:geometry worldSpaceDistance:geomObject.worldSpaceDistance]];
}
geometry.levelsOfDetail = mutLevelOfDetail;
node.morpher.targets = [node.morpher.targets arrayByAddingObject:geometry];
In my project, I have several nodes (SCNNode) with some levels of detail (SCNLevelOfDetail) and everything works correctly, but when I add animation using morphing (SCNMorpher), the animation works correctly but without the levels of detail. Note: the entire scene is created in Autodesk 3D Studio Max and then exported in (.ASE) format.
The goal is to make animations using morphing that have some levels of detail.
Does anyone know if SCNMorpher supports geometry with some levels of detail?
I appreciate any information about this case.
Thanks everyone!!!
Part of the code I use to load geometries (SCNGeometry) with some levels of detail (SCNLevelOfDetail) using morphing (SCNMorpher).
node.morpher = [SCNMorpher new];
SCNGeometry *geometry = [self geometryWithMesh:mesh];
NSMutableArray <SCNLevelOfDetail*> *mutLevelOfDetail = [NSMutableArray arrayWithCapacity:self.mutLevelsOfDetail.count];
for (int i = 0; i < self.mutLevelsOfDetail.count; i++) {
ASCGeomObject *geomObject = self.mutLevelsOfDetail[i];
SCNGeometry *geometry = [self geometryWithMesh:geomObject.mesh.mutMeshAnimation[i]];
[mutLevelOfDetail addObject:[SCNLevelOfDetail levelOfDetailWithGeometry:geometry worldSpaceDistance:geomObject.worldSpaceDistance]];
}
geometry.levelsOfDetail = mutLevelOfDetail;
node.morpher.targets = [node.morpher.targets arrayByAddingObject:geometry];
Share
Improve this question
asked Mar 18 at 6:59
Carlos EduardoCarlos Eduardo
1
0
1 Answer
Reset to default 0Regarding this issue, I checked with Apple engineers and Scenekit does not support this feature.
I added a suggestion for improvement and as soon as I have some feedback I will post it here.
Here is the link to the request.
https://developer.apple/forums/thread/776935?page=1#832672022
本文标签: SceneKit SCNMorpher Supports SCNGeometry with Some SCNLevelOfDetailStack Overflow
版权声明:本文标题:SceneKit SCNMorpher Supports SCNGeometry with Some SCNLevelOfDetail - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744521586a2610487.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论