StjerneIdioten / I3D-Blender-Addon

Rewriting the I3D blender addon from scratch and adding long-sought community features
GNU General Public License v3.0
66 stars 18 forks source link

[Bug Report] Exporting issue #151

Closed mikindwa closed 10 months ago

mikindwa commented 2 years ago

Hi, first time modder (apart from a couple of small addons to other equipment). I have managed to use your exporter successfully in the past, however I have now come across an issue I cannot seem to resolve. I did try the discord however when I use your link I get the "Invite Invalid" error.

I have spent a few months drawing and detailing my mod, I managed to export it at several stages however my final blend file will not convert over. Any suggestions of where the error may be would be greatly appreciated. I cannot figure out the object being referred to in the log.

Extract from log console (unable to google how to "Output logfile" in your exporter;

i3dio.exporter:_add_object_to_i3d:DEBUG: [ai] no more children to process in object i3dio.exporter:_add_object_to_i3d:DEBUG: [skinnedMeshes] is of type 'ARMATURE' i3dio.node_classes.node.SkinnedMeshRootNode:_create_xml_element:DEBUG: [skinnedMeshes] Filling out basic attributes, {name='skinnedMeshes', nodeId='283'} i3dio.xml_i3d:write_i3d_properties:INFO: Writing non-default properties from propertygroup: 'I3DNodeObjectAttributes' i3dio.xml_i3d:write_i3d_properties:INFO: Wrote '0' properties i3dio.node_classes.node.SkinnedMeshRootNode:_write_properties:DEBUG: [skinnedMeshes] Has no data specific attributes i3dio.node_classes.node.SkinnedMeshRootNode:_add_transform_to_xml_element:DEBUG: [skinnedMeshes] transforming to new transform-basis with <Matrix 4x4 (1.0000, 0.0000, 0.0000, 0.0000) (0.0000, 1.0000, 0.0000, 0.0000) (0.0000, 0.0000, 1.0000, 0.0000) (0.0000, 0.0000, 0.0000, 1.0000)> i3dio.node_classes.node.SkinnedMeshRootNode:_add_transform_to_xml_element:DEBUG: [skinnedMeshes] translation is <Vector (0.0000, 0.0000, 0.0000)> i3dio.node_classes.node.SkinnedMeshRootNode:_add_transform_to_xml_element:DEBUG: [skinnedMeshes] translation is default i3dio.node_classes.node.SkinnedMeshRootNode:init:DEBUG: [skinnedMeshes] Initialized as a 'SkinnedMeshRootNode' i3dio.node_classes.node.SkinnedMeshBoneNode:_create_xml_element:DEBUG: [rootBone] Filling out basic attributes, {name='rootBone', nodeId='284'} i3dio.node_classes.node.SkinnedMeshBoneNode:_create_xml_element:DEBUG: [rootBone] has parent element with name [skinnedMeshes] i3dio.node_classes.node.SkinnedMeshBoneNode:_write_properties:DEBUG: [rootBone] Is a "Bone", which does not have "data" i3dio.node_classes.node.SkinnedMeshBoneNode:_add_transform_to_xml_element:DEBUG: [rootBone] transforming to new transform-basis with <Matrix 4x4 (1.0000, 0.0000, 0.0000, 0.0000) (0.0000, 1.0000, 0.0000, 0.0000) (0.0000, -0.0000, 1.0000, 0.0000) (0.0000, 0.0000, 0.0000, 1.0000)> i3dio.node_classes.node.SkinnedMeshBoneNode:_add_transform_to_xml_element:DEBUG: [rootBone] translation is <Vector (0.0000, 0.0000, 0.0000)> i3dio.node_classes.node.SkinnedMeshBoneNode:_add_transform_to_xml_element:DEBUG: [rootBone] translation is default i3dio.node_classes.node.SkinnedMeshBoneNode:_add_transform_to_xml_element:DEBUG: [rootBone] has rotation(degrees): [-2.50448e-06 -0 0] i3dio.node_classes.node.SkinnedMeshBoneNode:init:DEBUG: [rootBone] Initialized as a 'SkinnedMeshBoneNode' i3dio.exporter:_add_object_to_i3d:DEBUG: [skinnedMeshes] processing objects children i3dio.exporter:_add_object_to_i3d:DEBUG: [hoses] is of type 'MESH' i3dio.node_classes.node.SkinnedMeshShapeNode:_create_xml_element:DEBUG: [hoses] Filling out basic attributes, {name='hoses', nodeId='285'} i3dio.node_classes.node.SkinnedMeshShapeNode:_create_xml_element:DEBUG: [hoses] has parent element with name [skinnedMeshes] i3dio.node_classes.shape.EvaluatedMesh:generate_evaluated_mesh:DEBUG: [hoses] is exported with modifiers applied i3dio.node_classes.shape.EvaluatedMesh:generate_evaluated_mesh:DEBUG: [hoses] applying unit scaling i3dio.node_classes.node.IndexedTriangleSet:_create_xml_element:DEBUG: [SkinnedMesh_hoses] Filling out basic attributes, {name='SkinnedMesh_hoses', nodeId='101'} i3dio.node_classes.node.IndexedTriangleSet:populate_from_evaluated_mesh:INFO: [SkinnedMesh_hoses] Has material 'skinnedMesh_mat' i3dio.i3d.I3D:add_material:DEBUG: [MP315_i3d_issue] New Material i3dio.node_classes.node.Material:_create_xml_element:DEBUG: [skinnedMesh_mat] Filling out basic attributes, {name='skinnedMesh_mat', nodeId='50'} i3dio.node_classes.node.Material:_normal_from_nodes:DEBUG: [skinnedMesh_mat] Has no Normalmap i3dio.node_classes.node.Material:_emissive_from_nodes:DEBUG: [skinnedMesh_mat] Has no Emissivemap i3dio.node_classes.node.Material:_resolve_with_nodes:DEBUG: [skinnedMesh_mat] Has no Glossmap i3dio.node_classes.node.IndexedTriangleSet:process_subsets:DEBUG: [SkinnedMesh_hoses] Subset with index [0] based on material 'skinnedMesh_mat' i3dio.node_classes.node.IndexedTriangleSet:process_subset:DEBUG: [SkinnedMesh_hoses] Processing subset: materialId="50" numTriangles="46088" firstIndex="0" firstVertex="0" numIndices="0" numVertices="0" i3dio.node_classes.node.IndexedTriangleSet:process_subset:DEBUG: [SkinnedMesh_hoses] Has subset 'skinnedMesh_mat' with '46088' triangles and materialId="50" numTriangles="46088" firstIndex="0" firstVertex="0" numIndices="138264" numVertices="51575" i3dio.node_classes.node.IndexedTriangleSet:populate_xml_element:DEBUG: [SkinnedMesh_hoses] Has '1' subsets, '46088' triangles and '51575' vertices i3dio.node_classes.node.SkinnedMeshShapeNode:populate_xml_element:DEBUG: [hoses] has shape ID '101' i3dio.xml_i3d:write_i3d_properties:INFO: Writing non-default properties from propertygroup: 'I3DNodeObjectAttributes' i3dio.xml_i3d:write_i3d_properties:INFO: Wrote '0' properties i3dio.xml_i3d:write_i3d_properties:INFO: Writing non-default properties from propertygroup: 'I3DNodeShapeAttributes' i3dio.xml_i3d:write_i3d_properties:INFO: Wrote '0' properties i3dio.node_classes.node.SkinnedMeshShapeNode:_add_transform_to_xml_element:DEBUG: [hoses] transforming to new transform-basis with <Matrix 4x4 (1.0000, 0.0000, 0.0000, 0.0000) (0.0000, 1.0000, 0.0000, 0.0000) (0.0000, 0.0000, 1.0000, 0.0000) (0.0000, 0.0000, 0.0000, 1.0000)> i3dio.node_classes.node.SkinnedMeshShapeNode:_add_transform_to_xml_element:DEBUG: [hoses] translation is <Vector (0.0000, 0.0000, 0.0000)> i3dio.node_classes.node.SkinnedMeshShapeNode:_add_transform_to_xml_element:DEBUG: [hoses] translation is default i3dio.node_classes.node.SkinnedMeshShapeNode:populate_xml_element:DEBUG: [hoses] Skinned groups: {0: 0, 1: 1, 15: 2, 6: 3, 4: 4, 7: 5, 9: 6, 13: 7, 11: 8, 2: 9, 5: 10, 8: 11, 10: 12, 14: 13, 12: 14, 3: 15} i3dio.node_classes.node.SkinnedMeshShapeNode:init:DEBUG: [hoses] Initialized as a 'SkinnedMeshShapeNode' i3dio.exporter:_add_object_to_i3d:DEBUG: [hoses] processing objects children i3dio.exporter:_add_object_to_i3d:DEBUG: [hoses] no more children to process in object i3dio.exporter:_add_object_to_i3d:DEBUG: [rearHitchSM] is of type 'MESH' i3dio.node_classes.node.SkinnedMeshShapeNode:_create_xml_element:DEBUG: [rearHitchSM] Filling out basic attributes, {name='rearHitchSM', nodeId='286'} i3dio.node_classes.node.SkinnedMeshShapeNode:_create_xml_element:DEBUG: [rearHitchSM] has parent element with name [skinnedMeshes] i3dio.node_classes.shape.EvaluatedMesh:generate_evaluated_mesh:DEBUG: [rearHitchSM] is exported with modifiers applied i3dio.node_classes.shape.EvaluatedMesh:generate_evaluated_mesh:DEBUG: [rearHitchSM] applying unit scaling i3dio.node_classes.node.IndexedTriangleSet:_create_xml_element:DEBUG: [SkinnedMesh_rearHitchSM] Filling out basic attributes, {name='SkinnedMesh_rearHitchSM', nodeId='102'} i3dio.node_classes.node.IndexedTriangleSet:populate_from_evaluated_mesh:INFO: [SkinnedMesh_rearHitchSM] Has material 'rearHitchSM_mat' i3dio.i3d.I3D:add_material:DEBUG: [MP315_i3d_issue] New Material i3dio.node_classes.node.Material:_create_xml_element:DEBUG: [rearHitchSM_mat] Filling out basic attributes, {name='rearHitchSM_mat', nodeId='51'} i3dio.node_classes.node.Material:_normal_from_nodes:DEBUG: [rearHitchSM_mat] Has no Normalmap i3dio.node_classes.node.Material:_emissive_from_nodes:DEBUG: [rearHitchSM_mat] Has no Emissivemap i3dio.node_classes.node.Material:_resolve_with_nodes:DEBUG: [rearHitchSM_mat] Has no Glossmap i3dio.node_classes.node.IndexedTriangleSet:process_subsets:DEBUG: [SkinnedMesh_rearHitchSM] Subset with index [0] based on material 'rearHitchSM_mat' i3dio.node_classes.node.IndexedTriangleSet:process_subset:DEBUG: [SkinnedMesh_rearHitchSM] Processing subset: materialId="51" numTriangles="6052" firstIndex="0" firstVertex="0" numIndices="0" numVertices="0" i3dio.node_classes.node.IndexedTriangleSet:process_subset:DEBUG: [SkinnedMesh_rearHitchSM] Has subset 'rearHitchSM_mat' with '6052' triangles and materialId="51" numTriangles="6052" firstIndex="0" firstVertex="0" numIndices="18156" numVertices="6668" i3dio.node_classes.node.IndexedTriangleSet:populate_xml_element:DEBUG: [SkinnedMesh_rearHitchSM] Has '1' subsets, '6052' triangles and '6668' vertices i3dio.node_classes.node.SkinnedMeshShapeNode:populate_xml_element:DEBUG: [rearHitchSM] has shape ID '102' i3dio.xml_i3d:write_i3d_properties:INFO: Writing non-default properties from propertygroup: 'I3DNodeObjectAttributes' i3dio.xml_i3d:write_i3d_properties:INFO: Wrote '0' properties i3dio.xml_i3d:write_i3d_properties:INFO: Writing non-default properties from propertygroup: 'I3DNodeShapeAttributes' i3dio.xml_i3d:write_i3d_properties:INFO: Wrote '0' properties i3dio.node_classes.node.SkinnedMeshShapeNode:_add_transform_to_xml_element:DEBUG: [rearHitchSM] transforming to new transform-basis with <Matrix 4x4 (1.0000, 0.0000, 0.0000, 0.0000) (0.0000, 1.0000, 0.0000, 0.0000) (0.0000, 0.0000, 1.0000, 0.0000) (0.0000, 0.0000, 0.0000, 1.0000)> i3dio.node_classes.node.SkinnedMeshShapeNode:_add_transform_to_xml_element:DEBUG: [rearHitchSM] translation is <Vector (0.0000, 0.0000, 0.0000)> i3dio.node_classes.node.SkinnedMeshShapeNode:_add_transform_to_xml_element:DEBUG: [rearHitchSM] translation is default i3dio.node_classes.node.SkinnedMeshShapeNode:populate_xml_element:DEBUG: [rearHitchSM] Skinned groups: {2: 0, 1: 1, 0: 2} i3dio.node_classes.node.SkinnedMeshShapeNode:init:DEBUG: [rearHitchSM] Initialized as a 'SkinnedMeshShapeNode' i3dio.exporter:_add_object_to_i3d:DEBUG: [rearHitchSM] processing objects children i3dio.exporter:_add_object_to_i3d:DEBUG: [rearHitchSM] no more children to process in object i3dio.exporter:_add_object_to_i3d:DEBUG: [skinnedMeshes] no more children to process in object i3dio.exporter:_add_object_to_i3d:DEBUG: [workAreas] is of type 'EMPTY'

i3dio.exporter:export_blend_to_i3d:ERROR: Exception that stopped the exporter Traceback (most recent call last): File "C:\Users\61410\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\i3dio\exporter.py", line 74, in export_blend_to_i3d i3d.export_to_i3d_file() File "C:\Users\61410\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\i3dio\i3d.py", line 259, in export_to_i3d_file self.export_i3d_mapping() File "C:\Users\61410\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\i3dio\i3d.py", line 290, in export_i3d_mapping attributes = {'id': name, 'node': build_index_string(mapping_node)} File "C:\Users\61410\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\i3dio\i3d.py", line 278, in build_index_string index = build_index_string(node_to_index.parent) File "C:\Users\61410\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\i3dio\i3d.py", line 276, in build_index_string index = f"{self.scene_root_nodes.index(node_to_index):d}>" ValueError: <i3dio.node_classes.skinned_mesh.SkinnedMeshRootNode object at 0x000001F9803EA4F0> is not in list Export took 38.621 seconds Dependency cycle detected: OBrearAssyCylinder/Transform Component/TRANSFORM_CONSTRAINTS() depends on OBrearAssyHydPunch/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBrearAssyHydPunch/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' OBrearAssyCylinder/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBrearAssyCylinder/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' Dependency cycle detected: OBrearFoldoutHydraulicRH/Transform Component/TRANSFORM_CONSTRAINTS() depends on OBrightArmRearHydRef/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBrightArmRearHydRef/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' OBrearFoldoutHydraulicRH/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBrearFoldoutHydraulicRH/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' Dependency cycle detected: OBrearFoldoutHydraulicLH/Transform Component/TRANSFORM_CONSTRAINTS() depends on OBleftArmRearHydRef/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBleftArmRearHydRef/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' OBrearFoldoutHydraulicLH/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBrearFoldoutHydraulicLH/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' Dependency cycle detected: OBfrontFoldoutHydraulicRH/Transform Component/TRANSFORM_CONSTRAINTS() depends on OBrightArmFrontHydRef/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBrightArmFrontHydRef/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' OBfrontFoldoutHydraulicRH/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBfrontFoldoutHydraulicRH/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' Dependency cycle detected: OBfrontFoldoutHydraulicLH/Transform Component/TRANSFORM_CONSTRAINTS() depends on OBleftArmFrontHydRef/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBleftArmFrontHydRef/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' OBfrontFoldoutHydraulicLH/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBfrontFoldoutHydraulicLH/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' Dependency cycle detected: OBmulcherRHfoldingCylinder/Transform Component/TRANSFORM_CONSTRAINTS() depends on OBmulcherRightHydPunch/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBmulcherRightHydPunch/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' OBmulcherRHfoldingCylinder/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBmulcherRHfoldingCylinder/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' Dependency cycle detected: OBmulcherLHfoldingCylinder/Transform Component/TRANSFORM_CONSTRAINTS() depends on OBmulcherLeftHydPunch/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBmulcherLeftHydPunch/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' OBmulcherLHfoldingCylinder/Transform Component/TRANSFORM_FINAL() via 'Damped Track' OBmulcherLHfoldingCylinder/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done' Detected 7 dependency cycles

I am happy to send you my blend file if you contact me directly via email.

Perhaps there is an attribute I have not selected properly, or incorrectly applied the 2 skinned meshes (although deleting both still flags the same error).

Thankyou so much for this exporter, and thankyou for your help in advance.

StjerneIdioten commented 2 years ago

In the description for the bug report it describes that you need to check "Output logfile" in the exporter. It's part of the export settings window you get when you export your file, same place where you control the rest of the export settings. It then generates a log file next to your .i3d file, that's called something like "_export_log" if I recall correctly.

I can't tell you what goes wrong exactly, but it errors out because of a skinned mesh root not being in it's index of nodes, when it tries to do the i3d mapping and why that is I can't tell you at the moment, I will have to have a look at specific part of the code later.

Does it export just fine if you turn of the export of i3d mappings? (It can be toggled in the export menu)

StjerneIdioten commented 2 years ago

I will also fix the discord link, thanks for notifying me :-)

mikindwa commented 2 years ago

Thanks mate, I hadn't started the mapping to xml part. I will give that a try after I figure out how to get my 2 point hitch drawbar to work. I can't find anything online, and the ingame ones are all done differently lol Going to be playing with armatures for a while I think, but thank you for replying so quickly. Excellent support. I have noticed some Vertex Design mods, are they yours?

Sent from Yahoo Mail on Android

On Wed, 9 Mar 2022 at 8:24 pm, @.***> wrote:

I will also fix the discord link, thanks for notifying me :-)

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

StjerneIdioten commented 2 years ago

I have noticed some Vertex Design mods, are they yours?

Nah, I am not that talented at actual modding😄 But they have been my "testers" since more or less the beginning of this exporter. They provide feedback and suggestions and sometimes help figuring how certain things need to be done, since there isn't really any documentation for a lot of the things that go into an I3D file.

I am a little confused as to whether your issue was resolved with my suggestion (Turning off i3d mappings) or if you still need help with that? 😉

StjerneIdioten commented 10 months ago

Closing this issue due to lack of response