Breaking the 64k limit.
Blitz3D Forums/Blitz3D Programming/Breaking the 64k limit.
| ||
Hello folks... I was curious if any of you guys had a clue about this one. Say I have a mesh that is 146,000 poly's give or take. The mesh is in OBJ format. Now if one were to load this to a surface it would be fine.. until the renderworld() function is called... at which point blitz mav's. So my question to you guys is it possible to manipulate a large mesh(> that blitz's display limit)? The said object is a terrain mesh. Without using an external editor(yeah mel scripting in maya didnt pan out for this one due to remainders and offsets) is it possible to take a large mesh, divide it up into a grid of 16x16 separate meshes retaining UV coords during the object's load and have this take place in less than say 30 seconds? Thanks, Scott |
| ||
There's a clusterisemesh function in the archives that does this. NOt sure who wrote it though. Stevie |
| ||
The 64k limitation is defined by the surface not the mesh entity. So you rebuild the mesh in 64k vertex/poly chunks, and each time duplicating the original surface. This way it looks the same but is internally split up into multiple surfaces within the same mesh. When copying vertices & poly's you copy the vertex normals as well as the uvw coordinates, so textures remain intact... Since you import an OBJ - and therefor have to build the mesh manually anyway - you can implement this into the loader, this way it shouldn't take any additional time at all. It will only cost you additional surfaces. In your case 146k/64k = 2.3 = 3 surfaces in stead of the original 1 surface. Hope this helps, :Danny |