acceptable polygon count

Blitz3D Forums/Blitz3D Beginners Area/acceptable polygon count

mrjh(Posted 2006) [#1]
To try to get used to blitz, I am working on a first person shooter. I want to make it as complicated and good looking as possible so that I can master many techniques and solve as many issues as possible. Right now I have some programing in place and am working on improving the models/textures/good looking effects in the game. I was wondering, what is a good number of triangles for the player, for the landscape, and for vehicles/weapons/other misc. stuff on an adverage vidio card. I know that this is probably a very common question, but please be patient with me.


John J.(Posted 2006) [#2]
That would depend on how many players/vehicles/weapons you plan to have on the screen. Usually you should try to keep vehicles/players <3000 polys for what I would consider a "average" video card.

For the landscape, Blitz3D's terrain system allows you to set how many polys you want, and it automatically performs dynamic LOD optimizations.

If you are planning on including large indoor levels, you may need to divide the level models into a grid of sectors, where you can hide sectors that aren't visible to optimize performance.


Matty(Posted 2006) [#3]
A lot of this depends on how efficiently you manage entities that are out of view. Blitz3d culls entities that are not in the camera view, but it does not prevent overdraw due to a monster being behind a door for instance.

On my development machine which to give you an idea of what it is like, it can play Doom3 on the lowest settings at between 30 and 60 frames per second. Alternatively it plays the Unreal Tournament 2004 Demo at no less than 50 frames per second.

On this machine I can get away with levels having multiple 10s of thousands of polygons rendered by blitz3d and around 40-60 animated 'creature' entities with around 500-700 polygons each.

In my experience, blitz3d can handle static geometry fine, large polycounts are not a problem for that. However if you want lots of animated entities (ie more than 20-30 humanoids) on screen at once then they will have to be fairly low polygon.

If you want things like real time lighting and shadowing that will be a large performance hit - if you want it to be accurate. If you are happy to use a silhoutte of your characters viewed from above mapped to the floor for shadows then that can be done quite easily with much less of a performance hit.

Those are my thoughts anyway.


Ross C(Posted 2006) [#4]
The hiding of entities not near the camera is important. As mentioned above, entities not in view of the camera, are not rendered, but still taken into account by blitz's collision routines, so not hiding entities in a large level could cause some speed issues. On thing you can do, is set up invisible doorways, as i like to think of them, called portals.

Portals, well, the way i use them, contain entities to be hidden and/or shown. I use them in sets of two, very close to each other.

LAB | | FACTORY

| = a portal

When passing through the left portal, what will happen is, i SHOW the LAB, and HIDE the FACTORY. When passing through the portal to the right, i SHOW the FACTORY and HIDE the LAB. That way, no matter which way you pass through a portal, the correct entities get shown and hidden, and as a result you only keep the things in view you need. The draw back to this, is you will need some sort of editor to place portals and attach entities to be hidden and shown to it.


Mustang(Posted 2006) [#5]
I'd use pivots - one "master parent pivot" (root null) per portal area, and I would then dynamically parent monsters etc to correct pivots if/when they move from area to area.

Simple "HideEntity PivotFactory" line of code would then disable rendering of the "factory" area together with all the monsters and stuff in that area (if they were correctly parented to the PivotFactory pivot) because "HideEntity affects the specified entity and all of its child entities, if any exist."

http://www.blitzbasic.com/b3ddocs/command.php?name=HideEntity&ref=3d_cat

http://www.blitzbasic.com/b3ddocs/command.php?name=CreatePivot&ref=3d_cat

http://www.blitzbasic.com/b3ddocs/command.php?name=EntityParent&ref=3d_cat


Ross C(Posted 2006) [#6]
EDIT - mis-information, REMOVED


OJay(Posted 2006) [#7]
Ross C said:
...you generate errors if you hide a pivot...


what errors? can't remember ever had any with that...


Beaker(Posted 2006) [#8]
You will only get errors with Pivots if you try and do mesh commands (CountSurfaces() etc) on them. You can avoid this by using:
If EntityClass(ent)="Mesh"
..before you try and do any mesh commands.


Ross C(Posted 2006) [#9]
Sincere apology for that bit of miss-information... :S Sorry guys!


mrjh(Posted 2006) [#10]
Thanks for the advice. For terrains, I would like to use meshes instead for arches, ect. I have some Mesh LOD code from the code archives, is this as good as the blitz terrain system? What would you recomend doing in my situation?