Bad Input Size loading 3DS files

Software: Away3D 4.x

Andrew R, Newbie
Posted: 16 September 2011 02:27 PM   Total Posts: 11

Using latest download…

Almost every 3ds file I try to use has problems when adding it to the parent container to get it rendered.

RangeError: Error #3669: Bad input size.
at flash.display3D::VertexBuffer3D/uploadFromVector()
at away3d.core.base::SubGeometry/getUVBuffer()[C:FlashExamplesaway3d-awayphysics-examples-fp11-e7cd5baaway3d-awayphysics-examples-fp11-e7cd5basrcaway3dcorebaseSubGeometry.as:186]
at away3d.core.base::SubMesh/getUVBuffer()[C:FlashExamplesaway3d-awayphysics-examples-fp11-e7cd5baaway3d-awayphysics-examples-fp11-e7cd5basrcaway3dcorebaseSubMesh.as:219]
at away3d.materials.passes::DefaultScreenPass/render()[C:FlashExamplesaway3d-awayphysics-examples-fp11-e7cd5baaway3d-awayphysics-examples-fp11-e7cd5basrcaway3dmaterialspassesDefaultScreenPass.as:424]

Even on a very simple file that I created in Blender that is just a stretched cylinder.  I’ve tried to attach the simple 3ds but your forum software doesn’t allow it.

   

Andrew R, Newbie
Posted: 16 September 2011 04:09 PM   Total Posts: 11   [ # 1 ]

Is there a place we can send files that cannot be loaded for someone to test?  By putting in some try/catches in the away3d library I was able to get some of the files to display.  However, I don’t know what objects in the file are causing the real problems, so I’d rather the away3d code was more bulletproof.

   

Avatar
Alejandro Santander, Administrator
Posted: 16 September 2011 04:39 PM   Total Posts: 414   [ # 2 ]

Hey Andrew,

Please note that FP11’s Stage3D functionality (in which Away3D 4.x is based of course) has resource limitations. One of those is the maximum number of vertices a single vertex buffer can have (i.e. SubGeometry in Away3D 4.x) which should be around 65000.

I don’t know exactly how, but our 3DS parser transforms mesh elements from your 3ds file into sub geometry elements and it appears to assume that you are considering those limitations when you design your models.

So I would say that you should try to regroup your models into entities of this size and if you think our parser should try to do this automatically, please file a feature request. We would be happy to consider it!

hth

   

Richard Olsson, Administrator
Posted: 16 September 2011 05:59 PM   Total Posts: 1192   [ # 3 ]

Actually, the vertex limit is rather ca 22000 (65536 divided by three, as in the number of components per vertex.)

   

Andrew R, Newbie
Posted: 17 September 2011 01:26 AM   Total Posts: 11   [ # 4 ]

I don’t believe these are size limitations.  I’m finding many things that fail to render correctly after loading.  It would be nice if there was a way to get away3d or even adobe to try to fix these problems.

I cannot tell which software is having the problems.

   

Richard Olsson, Administrator
Posted: 17 September 2011 07:44 AM   Total Posts: 1192   [ # 5 ]

Why do you not believe they are size limitations? The error is thrown when the vertex buffer is uploaded, and the error message tells you that it’s a problem with the buffer’s size.

You can send the file to me if you want me to try it when I have time. But honestly, it really sounds as if the model is too complex, and while waiting for a fix you should be able to simply split it up before you export it from whatever tool you’re using.

   

Andrew R, Newbie
Posted: 19 September 2011 03:14 PM   Total Posts: 11   [ # 6 ]

It seems there is the opposite error.  There is a buffer of 0 size.

If I add in a check for 0 in the following function, then it seems to get past this problem.  This is in the file SubGeometry.

public function getUVBuffer(stage3DProxy : Stage3DProxy) : VertexBuffer3D
  {
  var contextIndex : int = stage3DProxy._stage3DIndex;
  if (contextIndex > _maxIndex) _maxIndex = contextIndex;

  if (!_listeningForDispose[contextIndex]) initDisposeListener(stage3DProxy);

  if (_uvBufferDirty[contextIndex] || !_uvBuffer[contextIndex]) {
  if (_uvs.length > 0)
  {
  (_uvBuffer[contextIndex] ||= stage3DProxy._context3D.createVertexBuffer(_numVertices, 2)).uploadFromVector(_uvs, 0, _numVertices);
  _uvBufferDirty[contextIndex] = false;
  }
  }

  return _uvBuffer[contextIndex];
  }


But I don’t know if that is a reasonable check or not.  I’m not an expert on this.

My object still doesn’t fully work because I get another error which I described in another post.  I don’t know if they are related.

Error: Error #3611: Stream 1 is read by the current vertex program but not set.
at flash.display3D::Context3D/drawTriangles()
at away3d.materials.passes::MaterialPassBase/render()[C:\FlashExamples\away3d-awayphysics-examples-fp11-e7cd5ba\away3d-awayphysics-examples-fp11-e7cd5ba\src\away3d\materials\passes\MaterialPassBase.as:212]
at away3d.materials.passes::DefaultScreenPass/render()[C:\FlashExamples\away3d-awayphysics-examples-fp11-e7cd5ba\away3d-awayphysics-examples-fp11-e7cd5ba\src\away3d\materials\passes\DefaultScreenPass.as:467]


I’d be happy to send you some of the files.  How should I do that?  I cannot attach them in this forum.

   

Avatar
Alejandro Santander, Administrator
Posted: 20 September 2011 12:00 AM   Total Posts: 414   [ # 7 ]

Andrew,

I think I gave you an answer to this in another thread already. Apparently, you are not giving normal or uv data to the geometry you are trying to import. Hence, your problem is not related to this one. The problem here is that the limits are exceded, whereas in your case, the data is missing.

Was that not a valid solution/answer to you? If so, feel free to explain the problem to me in an email and send me the models so I can test on them.
.(JavaScript must be enabled to view this email address)

   

r4icards, Newbie
Posted: 28 September 2011 10:25 AM   Total Posts: 1   [ # 8 ]

Actually, the vertex limit is rather ca 22000 (65536 divided by three, as in the number of components per vertex.)

 


__________________________________________________________
nintendo 3ds r4 buy r4i card r4i gold

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X