LinePick Bug

BlitzMax Forums/MiniB3D Module/LinePick Bug

Stu_ovine(Posted 2008) [#1]
Im getting an exception error when using LinePick on a mesh.

The mesh has 10 surfaces which comprises of 927238 verts.


Entity setup using

	EntityPickMode ent1, 2



Ive tracked it down to

class tPick
..
.
Method TreeCheck(mesh:TMesh)
..
.
c_col_tree = C_CreateColTree(mesh_info) <--- bombs here



Is there too many verts? - Is there a setting somewhere that can expand the amount of verts ?


making sure its not the model -> Ive just tried it in B3D and linepick works fine in there.


klepto2(Posted 2008) [#2]
as in B3D a Surface can't have more than 65535 Vertices.
All C functions use short pointers so it is limited to this amount. In my xurrent version i've changed this behaviour, but this is not the correct way. In my Version I will add an option to enable large meshes. But for now you should split your model into more surfaces.


Stu_ovine(Posted 2008) [#3]
Hmmm thanks for the info.

I'll have to find a quick way of splitting the mesh up programatically.

Whens your new version out Klepto ?


Stu_ovine(Posted 2008) [#4]
I took the vert count from the Method TreeCheck(mesh:TMesh) function, where I was reporting what was in total_verts.


There it says mesh.CountSurfaces() is 10 and the total of the verts is 580805.

Loading into the 3d package - says its only got 9,000 verts and 13,000 surfaces. Im a bit confused. -also B3d is loading in the model and working ok with it too....


klepto2(Posted 2008) [#5]
Maybe you have a lot of equal surfaces (with the same texture), in minib3d you may get just 1 surface per brush.


Stu_ovine(Posted 2008) [#6]
I always use Fragmotion to convert to B3D, but it seems that its unwelding the verts on multi-surface-texture objects. This multiplies the amount of verts to a silly level :S

As a workaround for this Ive loaded into Gile and resaved so now its working again.