USHRT_MAX (and other problems)

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Postby zib_redlektab » Wed Jul 19, 2006 8:42 am

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... :(
Lurker extraordinaire!
http://www.zibland.com
User avatar
zib_redlektab
 
Posts: 240
Joined: Sat Sep 29, 2007 6:24 am
Location: Avoiding Direct Sunlight

Postby Aloys » Wed Jul 19, 2006 8:48 am

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?
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Postby zib_redlektab » Wed Jul 19, 2006 4:25 pm

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...
Lurker extraordinaire!
http://www.zibland.com
User avatar
zib_redlektab
 
Posts: 240
Joined: Sat Sep 29, 2007 6:24 am
Location: Avoiding Direct Sunlight

Postby Aloys » Wed Jul 19, 2006 6:53 pm

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.
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Postby zib_redlektab » Wed Jul 19, 2006 7:06 pm

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...
Lurker extraordinaire!
http://www.zibland.com
User avatar
zib_redlektab
 
Posts: 240
Joined: Sat Sep 29, 2007 6:24 am
Location: Avoiding Direct Sunlight

Postby zib_redlektab » Thu Jul 20, 2006 8:54 am

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.
Lurker extraordinaire!
http://www.zibland.com
User avatar
zib_redlektab
 
Posts: 240
Joined: Sat Sep 29, 2007 6:24 am
Location: Avoiding Direct Sunlight

Postby Robert The Rebuilder » Thu Jul 20, 2006 10:37 am

I've never seen this error before. Zib: would you mind pasting it into your reply? It might help me deduce what to fix.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Postby zib_redlektab » Thu Jul 20, 2006 1:04 pm

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...
Lurker extraordinaire!
http://www.zibland.com
User avatar
zib_redlektab
 
Posts: 240
Joined: Sat Sep 29, 2007 6:24 am
Location: Avoiding Direct Sunlight

Postby Robert The Rebuilder » Fri Jul 21, 2006 7:09 am

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.]
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Postby zib_redlektab » Fri Jul 21, 2006 7:23 am

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
Lurker extraordinaire!
http://www.zibland.com
User avatar
zib_redlektab
 
Posts: 240
Joined: Sat Sep 29, 2007 6:24 am
Location: Avoiding Direct Sunlight

Next

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 24 guests