Game Development Community

Struct.error in Export log

by William Shellman · in Artist Corner · 08/28/2007 (6:42 pm) · 8 replies

I am sorry that I haven't posted anything lately, but I've been busy as you may have guessed. Anyway,
I have been studying the various Blender documentation, viewing the videos tutorials, and practicing the
instructions to the best of my abilities. I have managed to complete a model (fully textured) and set up my
Empty's and such. I still don't have the full grasp of the materials and textures aspects, but I did manage to texture an entire model (The Model is a Pontiac Firebird). I have the UV's unwrapped and the names of the textures correct. I did everything the HTML Documentation said to do. I finished up the details for exporting and double-checked my settings. I did check each textures image within the exporter panel.
I thought I had everything right and proceeded to send the model to the game, But I received this message in the Python log :

Compiled with Python version 2.5.
Checking for installed Python... got it!
created image prv
Dumping output to file 'C:\Torque\SDK\.log'
Exporting...
Dumping traceback to log...
Dumping output to console
Traceback (most recent call last):
File "", line 37, in
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\Dts_Blender
.py", line 2526, in entryPoint
export()
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\Dts_Blender
.py", line 829, in export
export_tree.process(cur_progress)
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\Dts_Blender
.py", line 489, in process
c.process(progressBar)
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\Dts_Blender
.py", line 736, in process
self.Shape.write(Stream)
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython\D
ts_Shape.py", line 799, in write
self.write_end(dstream) # And write the rest of the story
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython\D
ts_Shape.py", line 808, in write_end
self.materials.write(dstream.fs)
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython\D
ts_Shape.py", line 180, in write
fs.write(struct.pack('i', mat.flags))
File "C:\Python25\Lib\struct.py", line 63, in pack
return o.pack(*args)
struct.error: long too large to convert to int

What did I do wrong? Anyone! Thanks for any responses.

#1
08/28/2007 (8:10 pm)
...
#2
08/28/2007 (8:26 pm)
@ Joseph:
Thanks for looking into it. I'm waiting to hear the good news :D
#3
08/28/2007 (8:31 pm)
...
#4
08/28/2007 (8:37 pm)
@ Joseph;
Awesome! Thank you for your super-quick response. I was indeed playing around with those settings before exporting out.
#5
08/28/2007 (8:56 pm)
...
#6
08/30/2007 (3:47 am)
Joseph! I have taken off all the reflectance maps for the model, but I still get the error message. I re-loaded the model and started from scratch and I still got the error, even without the reflectance maps on.
I do have 36 different textures on the model, but none of them have a reflectance map. I want the metallic parts of the model to have a slight reflection in their textures. Especially the Rims of the vehicle.
And I want the Windows to be Transparent, including the Headlights, Taillights, ect...
I also wish to have the mirrors texture to be extremely reflective. I am sorry that I have not quite learned how to E-mail the model itself to anyone, but I am working on that. In the mean time, I can send the latest .log file from the Python script. I have changed the "Bold Line" which you advised, but I have yet to attempt an export with it. I am still working on re-doing the model textures. I will have it done by the end of the day. The one I tried to export earlier is the .log I am sending you. It is basically the same .log I sent you before, with the exception that the reflectance, (and most of the other "Map to" settings), are off. I don't know what I am doing wrong, so I will try to texture a new model of it using the changes in the Python Dts_Shape.py script. I'll update you on the progress. Thanks for any help you have for the export .log file.

Here is the .log file :

Torque Exporter 0.949
Using blender, version 244
Processing Scene...
Cleaning Preference Keys
Exporting...
Writing shape to 'C:\Program Files\Blender Foundation\Blender\.blender\Models\Blend Files\Vehicles\MyFirebird.dts'.
Processing...
Warning: Material (Chrome) is using environment mapping with a detail map, strange things may happen!
Warning: Material (Gold) is using environment mapping with a detail map, strange things may happen!
Warning: Material (Red) is using environment mapping with a detail map, strange things may happen!
Error: Mesh vertex index limit exceeded, truncating mesh!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.020' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.021' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.022' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.023' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.024' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.025' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.026' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.027' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.028' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.029' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.030' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.031' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.032' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.033' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.034' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.035' skipped!
Warning: Too many clone's of mesh found in detail level, object 'Mesh.036' skipped!
> Shape Details
> Nodes
^^ Bone [Exp-Catch-Root] (parent -1)
> Objects
'FrontLamp Housings' : Standard Null
'Mesh' : Standard Standard
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
'Mesh' : Standard Null
> Materials
Chrome
Chrome
Chrome
Chrome
DarkRed
DarkRed
DarkRed
Gold
Gold
Gold
Gold
DarkGlass
DarkGlass
Instrument
Instrument
Instrument
TireTread_1
TireTread_1
TireTread_1
DarkOrange
DarkOrange
DarkOrange
Glass
Glass
Black
Black
Black
Red
Red
Red
Red
> Detail Levels
Detail-1 (size : 128)
Detail-2 (size : 32)
Smallest : Detail-2 (size : 32)
> Internal Sequences
Writing out DTS...
Writing scriptC:\Program Files\Blender Foundation\Blender\.blender\Models\Blend Files\Vehicles\MyFirebird.cs
Error: Exception encountered, bailing out.

Traceback (most recent call last):
File "", line 736, in process
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython\Dts_Shape.py", line 799, in write
self.write_end(dstream) # And write the rest of the story
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython\Dts_Shape.py", line 808, in write_end
self.materials.write(dstream.fs)
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\DTSPython\Dts_Shape.py", line 180, in write
fs.write(struct.pack('i', mat.flags))
File "C:\Python25\Lib\struct.py", line 63, in pack
return o.pack(*args)
error: long too large to convert to int

Update! When I exported this one, it did not invoke the changes I made to the texture mapping files.
I changed the "Chrome" textures reflectance and mirror settings (as well as all the other textures) to off, but when I exported, it remained. I believe this is why the export failed again after removing the map settings. For some reason, it won't let me remove the settings. This is why I re-started the new model.
#7
08/30/2007 (7:35 am)
...
#8
08/30/2007 (6:56 pm)
Acknowledged! I will try the instructions you have given me. I am puzzled by the amount of poly's that the mesh you mentioned has. I didn't realize it was so detailed. I do intend to use the model personally, but I don't need it desperately. It really is just a practice model. I still have quite a way to go before making my own original vehicles. I will continue to work with it though. I nearly have it complete. Thanks for all your help.