LoadMesh vs LoadAnimMesh

Blitz3D Forums/Blitz3D Programming/LoadMesh vs LoadAnimMesh

xmlspy(Posted 2007) [#1]
Does LoadAnimMesh produce faster FPS than LoadMesh for static (not animated) models? If so why?


Naughty Alien(Posted 2007) [#2]
I'm using LoadAnimMesh even for static geometry..In 3DSMAX I split whole levevel in to small chunks/surfaces and then within B3D there is some kind of oclusion system whats working quite okay...difference in speed I notice when I reach polycount over 50K..LoadAnimMesh is then faster than rendering whole geometry as a one chunk..I do belive becouse of reasons I mentioned...thats my experiance with it anyway..and appart from that, for me is better becouse I can access every part of geometry with LoadAnimMesh and set it up purposely, if I want to..


IPete2(Posted 2007) [#3]
John Blackledge is probably better placed to answer this but...

...as far as I understand Loadmesh loads every mesh in a single file, as one mesh, which means every part of it is rendered even if you can only see one small section of it. Where as LoadAnimmesh allows B3d to 'see' indivual meshes as individual meshes in its culling list.

So if you have a village, made up of lots of houses and you use a loadmesh command the whole village is 'seen' and rendered because the camera 'sees' it as one object always in front of the camera, even if you stand in the centre and look north the camera will still include those meshes behind you to the south which are out of the cameras view.

However if you use LoadAnimMesh, any separate meshes can be culled automatically by Blitz once out of alignment of the camera, so if you look north you the camera will only 'see' and render those houses which are in front of the camera, the rest get culled.

It should be noted that if you have a hill and then some houses beyond the hill and the camera looks in that direction, everything will be rendered, as Blitz does not cull like a visibility system would. Anything 'in front' of the camera is rendered.

So hide entitys which you cannot see.


IPete2.


jfk EO-11110(Posted 2007) [#4]
Personally I used LoadMesh for the main level mesh because I thought it's faster than LoadAnimMesh. But it's a dead end in many aspects. Example given:

If your Map has trees with leafes made of masked textures then you may want the leafes to be unpickable and allow any decal handler to look trough it etc. (to prevent bullet decals floating in the "air" between the leafes). When you use LoadAnimMesh then you may use special strings in the entitynames to trigger certain settings, eg. to set some parts unpickable. Accessing a child or surface is much easier when loaded with LoadAnimMesh. With LoadMesh you will only be able to do that via recognizing surfaces by their texture paths.

I still have to make some benchmark tests to see if LoadAninmMesh is really slower.