Model too big? Or what...
Blitz3D Forums/Blitz3D Beginners Area/Model too big? Or what...
| ||
Ok, I'm sorry I'm pretty new at Blitz3D and basically everything I'm doing right now. So here's what I did: I downloaded a file for Google Sketchup, the file was an entire city, so of course it's a big file. When I go into Model Info, it says 16848 Faces. So then I exported it to a .3ds file, and copied all the textures and the model into one folder. Then a friend gave me a small thing to test it to see if it would work, when I ran it, it gave me the error "Memory access violation". Previously to running it, I had saved it in the same folder as all the textures and the model. Here's the script if it helps: Graphics3D 800,600 SetBuffer BackBuffer() camera=CreateCamera() CameraViewport camera,0,0,800,600 light=CreateLight() city=LoadMesh( "city.3DS" ) PositionEntity city,0,0,7 While Not KeyHit(1) If KeyDown(200) Then MoveEntity city,0,0.05,0 EndIf If KeyDown(203) Then TurnEntity city,0,0,1.0 EndIf If KeyDown(205) Then TurnEntity city,0,0,-1.0 EndIf UpdateWorld RenderWorld Flip Wend End Oh, and in the debug it highlights "RenderWorld" when the error pops up. So if anyone can tell me what's wrong or how to fix it, that would be great. Thanks, Ryan |
| ||
Enable Debug mode and then let us know what the exact error is. |
| ||
It is enabled, nothing shows up in the Debug Log. |
| ||
You'll get this error if the model contains too many vertices/triangles - I think it's a DX7 limitation. You'll have to break the model up into manageble chunks, I'm afraid. |
| ||
16k faces is over the dx7 limit?? 0 RLY? |
| ||
Thanks for the replies, I appreciate the help. Do you have any suggestions for breaking it into parts? Or limiting the number of faces? |
| ||
I know 3ds max has an optimize modifier, lower the # of faces dramatically while still maintaining the basic shape...If you could manage to load it onto blitz3d, there's a way to use LOD in blitz... |
| ||
16k shouldn't be a problem. THe limit is somewhere at 31000. There's also a limit for Vertices, in the worst hardware case at 31k too, usually 63k. That' the limit for a single surface, btw. Try this: city=LoadMesh( "city.3DS" ) print city if city=0 then runtimeerror "couldn't even load the mesh" for s=1 to countsurfaces(city) surf=getsurface(city,s) print "Surface number "+s print "Tris: "+ counttriangles(surf) print "Vertices: "+countvertices(surf) next |
| ||
Ok, when I ran the program jfk EO-11110 posted, like 20 sets of Tris, Vertices, and Surface numbers show up. Most of them are around 100, but one of them must have been the file. There was one that had 62k Tris, and 73k Vertices. There was also one with 15k of each, but that must have been like the main texture file. But I have 3ds max 9, how would I use that optimize modifier? |
| ||
I can't imagine a poly-reducer would work too well on a city mesh from sketchup. Try breaking it up into smaller chunks in sketchup or 3ds max. |
| ||
you may write a little mesh fragger. Just fragment it right after loading. If a surface has more than 31k tri or verts then reconstruct it in parts and get rid of the original one (See params of ClearSurface, reuse the exisiting surface brush fr the first one, create a brush clone with GetSurfaceBrush). See the original ClusterizeMesh Code in the archives about how to reconstruct a mesh at runtime. |
| ||
chwaga, i read your post i want to reduce the poly of a mesh in 3ds max, how i can do? I am a newbie remeber this :) |