DragonFF icon indicating copy to clipboard operation
DragonFF copied to clipboard

errors when exporting

Open mlndev opened this issue 3 years ago • 20 comments

when exporting me and my friends get this error message:

`Python: Traceback (most recent call last): File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\gui\dff_ot.py", line 122, in execute dff_exporter.export_dff( File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\ops\dff_exporter.py", line 840, in export_dff dff_exporter.export_dff(options['file_name']) File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\ops\dff_exporter.py", line 828, in export_dff self.export_objects(objects) File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\ops\dff_exporter.py", line 784, in export_objects self.dff.write_file(self.file_name, self.version ) File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\gtaLib\dff.py", line 2075, in write_file content = self.write_memory(version) File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\gtaLib\dff.py", line 2067, in write_memory data += self.write_clump() File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\gtaLib\dff.py", line 2047, in write_clump data += self.write_geometry_list() File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\gtaLib\dff.py", line 1989, in write_geometry_list data += geometry.to_mem() File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\gtaLib\dff.py", line 1337, in to_mem data += Sections.write(Triangle, triangle) File "C:\Users\Milka\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\DragonFF-master\gtaLib\dff.py", line 189, in write _data = pack(packer, *data) struct.error: ushort format requires 0 <= number <= 0xffff

location: :-1`

mlndev avatar Nov 10 '21 17:11 mlndev

Your model contains too many vertices/polygons

Parik27 avatar Nov 11 '21 10:11 Parik27

Thank you for your answer!

mlndev avatar Nov 11 '21 11:11 mlndev

I had the same issue, I deleted half of the model but it works, thanks!

milcsu avatar Nov 11 '21 12:11 milcsu

What is the polygon limit before it goes haywire?

umustbeloggedintododat avatar Nov 12 '21 19:11 umustbeloggedintododat

CRAP. i cant export my bus : ( all that work for nothing, now I feel really sad

umustbeloggedintododat avatar Jan 25 '22 01:01 umustbeloggedintododat

but I see many other modded models with way more vertices than what I have, so why is dragonff freaking out over this?

umustbeloggedintododat avatar Jan 25 '22 02:01 umustbeloggedintododat

You can only have 65535 vertices in a model.

Parik27 avatar Jan 25 '22 02:01 Parik27

This confuses me because I've been working with cars around 150000 verts and they export just fine...

ThePortuguesePlayer avatar Feb 06 '22 19:02 ThePortuguesePlayer

Is that spread across objects? You can have more than 65535 overall, but not in a single mesh.

Parik27 avatar Feb 06 '22 19:02 Parik27

I did one export in the past where a single object had about 37000 verts to stress test MTA once, but yeah, I meant spread across various objects. If the limit is per object, that's not so bad then. Maybe the error message should be a bit more human readable. I wonder how a model of a bus looks like to have such vert counts in a single mesh, I am curious...

btw, Enable Lighting and Enable Modulate Material Color are still undocumented in the Wiki.

ThePortuguesePlayer avatar Feb 06 '22 21:02 ThePortuguesePlayer

@Parik27 Is there any way to remove this limitation?

FlorinPT avatar Aug 30 '23 09:08 FlorinPT

@FlorinPT No

Parik27 avatar Aug 30 '23 20:08 Parik27

why no?

FlorinPT avatar Aug 31 '23 18:08 FlorinPT

I've looked through the codes and it's not impossible we need to remove a few limitations dff.py and dff_exporter.py

FlorinPT avatar Aug 31 '23 18:08 FlorinPT

@Parik27

class Sections:

# Unpack/pack format for above data types
   formats =  {
    Chunk       : "<3I",
    Clump       : "<3I",
    Vector      : "<3f",
    HAnimHeader : "<3i",
    Bone        : "<3i",
    RGBA        : "<4B",
    GeomSurfPro : "<3f",
    Sphere      : "<4f",
    Triangle    : "<4I",
    Atomic      : "<4I",
    TexCoords   : "<2f",
    ReflMat     : "<5f4x",
    SpecularMat : "<f24s"
}

FlorinPT avatar Sep 01 '23 10:09 FlorinPT

If we make changes here, we can remove the limitation and I did, but after exporting, the model is corrupted.

FlorinPT avatar Sep 01 '23 10:09 FlorinPT

:facepalm:

Might as well just use a different file format to remove the limitation, right? Like I said, you CANNOT remove this limitation. It will not be a DFF file anymore.

Parik27 avatar Sep 02 '23 01:09 Parik27

🤦

Might as well just use a different file format to remove the limitation, right? Like I said, you CANNOT remove this limitation. It will not be a DFF file anymore.

back when using kam's script I was able to export very high poly models more than 65535 vertices Give me wonder reason why you made this limitations in first place otherwise optimize the file format  at least it should be optional. 

HalanoSiblee avatar Feb 20 '24 15:02 HalanoSiblee

🤦

Might as well just use a different file format to remove the limitation, right? Like I said, you CANNOT remove this limitation. It will not be a DFF file anymore.

back when using kam's script I was able to export very high poly models

more than 65535 vertices

Give me wonder reason why you made this limitations in first place otherwise optimize the file format 

at least it should be optional. 

Can you provide such a high poly model after export?

Psycrow101 avatar Feb 20 '24 15:02 Psycrow101

🤦

Might as well just use a different file format to remove the limitation, right? Like I said, you CANNOT remove this limitation. It will not be a DFF file anymore.

back when using kam's script I was able to export very high poly models more than 65535 vertices Give me wonder reason why you made this limitations in first place otherwise optimize the file format at least it should be optional.

Can you provide such a high poly model after export?

I assume it uses the same method as described in #264

Parik27 avatar Feb 20 '24 15:02 Parik27