STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
281
IN-GAME
1,670
ONLINE
Founded
8 November, 2013
All Discussions > Help > Topic Details
Kris 14 Feb, 2022 @ 5:45pm
VTA file not exporting properly?
I've been completely stumped on what I should do when it comes to this error. It's been happening on only one model that I've been trying to export. Anytime I try to export this model's body, the SMD exports just fine, but the software gives me this when it goes to export the VTA:


- C:\Users\Colton\Documents\ena for sfm port\Body.vta
Array iterator out of range: (index 9129)
Python: Traceback (most recent call last):
File "C:\Users\Colton\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_valvesource\export_smd.py", line 213, in execute
self.exportId(context, exportable.get_id())
File "C:\Users\Colton\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_valvesource\export_smd.py", line 549, in exportId
self.files_exported += write_func(id, bake_results, self.sanitiseFilename(export_name), path)
File "C:\Users\Colton\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_valvesource\export_smd.py", line 1223, in writeSMD
written += self.writeSMD(id,bake_results,name,filepath,filetype='vta')
File "C:\Users\Colton\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_valvesource\export_smd.py", line 1203, in writeSMD
shape_loop = shape.loops[mesh_loop.index]
IndexError: bpy_prop_collection[index]: index 9129 out of range, size 9129

location: <unknown location>:-1
Error: Python: Traceback (most recent call last):
File "C:\Users\Colton\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_valvesource\export_smd.py", line 213, in execute
self.exportId(context, exportable.get_id())
File "C:\Users\Colton\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_valvesource\export_smd.py", line 549, in exportId
self.files_exported += write_func(id, bake_results, self.sanitiseFilename(export_name), path)
File "C:\Users\Colton\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_valvesource\export_smd.py", line 1223, in writeSMD
written += self.writeSMD(id,bake_results,name,filepath,filetype='vta')
File "C:\Users\Colton\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\io_scene_valvesource\export_smd.py", line 1203, in writeSMD
shape_loop = shape.loops[mesh_loop.index]
IndexError: bpy_prop_collection[index]: index 9129 out of range, size 9129

location: <unknown location>:-1
Originally posted by squidiskool:
Originally posted by Artfunkel:
Looks like corrupt geometry to me. Your shape has fewer vertices than the mesh.
well, I did some more messing around and I found out that triangulating the mesh made it export correctly. thanks for the help :D
< >
Showing 1-13 of 13 comments
Artfunkel 15 Feb, 2022 @ 8:57am 
Sounds like a bug. Can you upload your .blend file, please?

https://pasteall.org/blend/

You could also try exporting a DMX file.
Kris 15 Feb, 2022 @ 10:06am 
Originally posted by Artfunkel:
Sounds like a bug. Can you upload your .blend file, please?

https://pasteall.org/blend/

You could also try exporting a DMX file.

I don't think I can really upload the blender file anywhere as it was a paid model

DMX seemingly gives the same results + can't be compiled in crowbar because of "too many bone influences per vertex" error
Artfunkel 16 Feb, 2022 @ 11:42am 
I can't tell what is happening without the model. But AFAIK a shape's vertices and faces are always 1:1 with the base mesh. It could be that the Blender model is corrupt somehow.
Kris 16 Feb, 2022 @ 12:05pm 
Originally posted by Artfunkel:
I can't tell what is happening without the model. But AFAIK a shape's vertices and faces are always 1:1 with the base mesh. It could be that the Blender model is corrupt somehow.

I could possibly send it to you thru steam dms???
Nyama 16 Feb, 2022 @ 1:18pm 
Same issue as well on my end. No matter if the poly count is 40k or 10k
Nyama 16 Feb, 2022 @ 1:32pm 
I might have narrowed it down to being a mirror modifier issue when using shape keys and they end up merging when they get too close. Disabling mirror lets it export normally. I will do a bit more testing to confirm if that's the true issue. I don't know if this is the same issue as the OP is having.
Nyama 16 Feb, 2022 @ 2:06pm 
Alright so I solved it for my case. When any of the verts end up clipping into each other and merge due to mirror mod when making the shape keys. The exporter throws that error. I fixed it by hunting down verts that merged during movement of the shape key and it fixed it. So not exactly an issue as it can be easily worked around. Just was confusing at first.
Kris 17 Feb, 2022 @ 12:13am 
If it helps any I checked the VTA itself and it seems to be halting while trying to export time 0?
CORRECTION: time 1 # Ah
Last edited by Kris; 17 Feb, 2022 @ 12:32am
Artfunkel 20 Feb, 2022 @ 7:00am 
Originally posted by Nyama:
Alright so I solved it for my case. When any of the verts end up clipping into each other and merge due to mirror mod when making the shape keys. The exporter throws that error. I fixed it by hunting down verts that merged during movement of the shape key and it fixed it. So not exactly an issue as it can be easily worked around. Just was confusing at first.

Thanks for reporting this. It is indeed a difficult problem to solve, and perhaps even impossible given the way Blender currently works.

I could add a more descriptive error message when this happens, but I don't see anything that can be done programatically to avoid the problem. It's up to the user to fix their input data.
hey, uh. im sorry for the bump but I have the same issue occurring, and im on the latest version.

- D:\Resources\Stuff I Made\Garry's Mod Stuff\Playermodels\RUBI\Sourcefiles\compile\RubiMeshPC.vta
Traceback (most recent call last):
File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_scene_valvesource\export_smd.py", line 219, in execute
self.exportId(context, id)
File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_scene_valvesource\export_smd.py", line 568, in exportId
self.files_exported += write_func(id, bake_results, self.sanitiseFilename(export_name), path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_scene_valvesource\export_smd.py", line 1239, in writeSMD
written += self.writeSMD(id,bake_results,name,filepath,filetype='vta')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_scene_valvesource\export_smd.py", line 1219, in writeSMD
shape_loop = shape.loops[mesh_loop.index]
~~~~~~~~~~~^^^^^^^^^^^^^^^^^
IndexError: bpy_prop_collection[index]: index 53064 out of range, size 53064
Error: Python: Traceback (most recent call last):
File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_scene_valvesource\export_smd.py", line 219, in execute
self.exportId(context, id)
File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_scene_valvesource\export_smd.py", line 568, in exportId
self.files_exported += write_func(id, bake_results, self.sanitiseFilename(export_name), path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_scene_valvesource\export_smd.py", line 1239, in writeSMD
written += self.writeSMD(id,bake_results,name,filepath,filetype='vta')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\squid\AppData\Roaming\Blender Foundation\Blender\4.4\scripts\addons\io_scene_valvesource\export_smd.py", line 1219, in writeSMD
shape_loop = shape.loops[mesh_loop.index]
~~~~~~~~~~~^^^^^^^^^^^^^^^^^
IndexError: bpy_prop_collection[index]: index 53064 out of range, size 53064

i dont have any modifiers on my model and im..uh not sure what could be causing it.

the model is a paid vrchat avatar (which has turned free) so im able to give you the blend file if you need to look into it.
Last edited by squidiskool; 20 Apr @ 3:30pm
(edited) well I did some more looking into it and at first I thought it was because of loose geometry that was making it fail, but it's the first shape key after basis (any shape key) that's making it crap out. if I have the shape key enabled and I export, it exports just fine (but the model will always look like it's screaming which is not ideal...) so now im wondering what to do to fix it. for now I will just leave the model without shape keys until a fix can be found. im willing to give out anything that can help my case..
Last edited by squidiskool; 20 Apr @ 4:26pm
Artfunkel 20 Apr @ 11:48pm 
Looks like corrupt geometry to me. Your shape has fewer vertices than the mesh.
A moderator of this forum has indicated that this post answers the original topic.
Originally posted by Artfunkel:
Looks like corrupt geometry to me. Your shape has fewer vertices than the mesh.
well, I did some more messing around and I found out that triangulating the mesh made it export correctly. thanks for the help :D
Last edited by squidiskool; 21 Apr @ 4:39pm
< >
Showing 1-13 of 13 comments
Per page: 1530 50

All Discussions > Help > Topic Details