Page 1 of 3

PostPosted: Wed Jul 19, 2006 8:42 am
by zib_redlektab
How do I fix the infamous USHRT_MAX error? from what I remember it means that there are too many verteces, is this correct? and does that mean too many verteces total or on one mesh?

I'm hoping to release Galamay v2.0 today or tomorrow morning, but I have yet to get around this stupid USHRT_MAX... :(

PostPosted: Wed Jul 19, 2006 8:48 am
by Aloys
I personally encountered it only once but I remember it was because of too many vertices on a single mesh. I fixed it by cutting up the mesh into several objects.

What is the total number of faces in your scene?

PostPosted: Wed Jul 19, 2006 4:25 pm
by zib_redlektab
in my scene!? a ton....how do i find that out?

oh and i don't think it can be faces on one mesh, i dont have anything ridiculously detailed...

PostPosted: Wed Jul 19, 2006 6:53 pm
by Aloys
Display all layers and look here:

Image
The 'Fa:' part.

'Ve' is the vertex count, 'Fa' is Faces, and 'Ob' objects. 'La' I don't know. :ph34r:

I've noticed most Cyan Ages are between 100 and 200 thousand faces. (with the notable exception of the City, which is above 500,000). Ahra Pahts is a bit above 150,000 right now and it exports fine.

If that isn't the source of your problem I have no idea how to fix it.

PostPosted: Wed Jul 19, 2006 7:06 pm
by zib_redlektab
O.O

Ve:59253 | Fa:83140 | Ob:86-1 | LA:3 | Mem:47.27m

Uh-oh...well that can't be right there's no chance this has more faces than the city. I'll check which layer they're all on....

edit: well one layer has 13,000 and one has about 10,000... the others are tiny. these two layers are the biggest, but there must be something raising the count so high...

PostPosted: Thu Jul 20, 2006 8:54 am
by zib_redlektab
oooohhh now i see :P i mis-counted. i thought it was in the 800,000's :P

ok well i got it down to 60,000ish, but it still won't export-even with the new plugin.

PostPosted: Thu Jul 20, 2006 10:37 am
by Robert The Rebuilder
I've never seen this error before. Zib: would you mind pasting it into your reply? It might help me deduce what to fix.

PostPosted: Thu Jul 20, 2006 1:04 pm
by zib_redlektab
Sure here it is:
Code: Select all
Traceback (most recent call last):
  File "<string>", line 168, in open_file
  File "<string>", line 90, in export_age
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcresmanag
er.py", line 137, in save
    self.prp.write(f)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcprpfile.
py", line 551, in write
    o.writeobjects(buf)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcprpfile.
py", line 292, in writeobjects
    o.write(buf)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcprpfile.
py", line 210, in write
    self.data.write(buf)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcdraw.py"
, line 778, in write
    bufferGroup.write(buf)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcdraw.py"
, line 445, in write
    buf.Write16(count)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_hsStrea
m.py", line 110, in Write16
    self.fs.write(struct.pack("H",data))
struct.error: short format requires 0<=number<=USHRT_MAX


Check the COBBS forums, too. There was some technical stuff posted there I think, but all I remember was that it has to do with too many faces on on object...i think...

PostPosted: Fri Jul 21, 2006 7:09 am
by Robert The Rebuilder
Zib:

Note that the complaint is not about the number of faces, but rather the number of vertices. The size of that object's vertex array is apparently larger than 65535.

[Yes - ideally, the plugin should split up the vertex array into multiple ones when it encounters such a large number. However, in the ages we've seen so far, all the plBufferGroups (where the vertices are stored) only have 1 vertex array. So, even if this feature was added to the plugin, it is unclear whether the Uru engine would support it.]

PostPosted: Fri Jul 21, 2006 7:23 am
by zib_redlektab
oh....does anyone know of a quick way to find out what object has such a huge amount of vertices? 'cuz i don't think any of my objects are that big O.o