klepto2 mod

BlitzMax Forums/MiniB3D Module/klepto2 mod

Kev(Posted 2007) [#1]
Im working on something using klepto2 MiniB3D module, as far as im aware this version is optimized to only render what is visable.

now my game requires a large number of cube's but at any one time theres no more that 50 display'd now i wonder would there be an speed increase if i only create the sides of a cube that would be visable.

once these cubes are positioned in the level they would not be moved and the camera moves along them in a straight line.

kev


klepto2(Posted 2007) [#2]
First I have to clarify something: My mod doesn't do anything more than simons minib3d in the context of culling.
With simons 0.40 Version the culling was automated so there is no need to specify an entitys' cull radius.
The clue why my version is sometimes faster in comparison to simons version is the use of so called 'Verttex Buffer Objects' . This will increase the speed on trisheavy objects enourmous but will stay the same as simons mod when using smaller objects like cubes. Thats due the fact that VBOs are 'overriding' the pass, where the engine has to pass the vertexdata to the graphics card. Instead Vertexbufferobjects have stored their data directly on the Graphicscard and so the engine has just to call the buffer instead of sending all the data every loop.

If you want a big speed increase and your cubes are static, then try to build them into one surface instead of creating a lot of single cubes.


Kev(Posted 2007) [#3]
thanks for that info klepto2.

Yes im aware that combining all my cube entity's into one surface would give a great amount of speed back. BUT is it not the case that once ive textured the original level cubes that there textures will be lost when creating the new single surface mesh? does only one surface allow only one texture?

would i need to VertexTexCoords with some form of uv mapping?

any ideas if thats the case.

kev


simonh(Posted 2007) [#4]
If you use AddMesh then MiniB3D will automatically combine any surfaces which have the same texture.

If you want to use just one surface you would have to create one big texture containing all the normal textures, then set the UV coords for each cube so that the right part of the texture appears - a lot of hassle though.


Kev(Posted 2007) [#5]
thanks simonh, AddMesh might do what i require.

kev