View Full Version : What entities are counted as primitives?
Joonas
04-16-2004, 12:44 PM
You know, when an exit is visible, all the primitives in that room are loaded...
... but what exactly are they?
Enemies, level items, prefabs?
Does anyone know? http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
Kozak
04-16-2004, 12:47 PM
Well I had a strange exit prob in mp1 a long time ago. And then I couldn't see the enemies because they were in an other room and I was not facing the exit ( a weird maxed error gave me this).
theHunted
04-16-2004, 02:15 PM
there happens to be this command
maxpayne_gamemode->gm_drawprimitives(true/false);
if i'm not mistaken, it draws each primitive in a different colour. same primitives get same colours. but i'm not completely sure of that is correct. however, after you enter the command and then (important) reload any level you'll get something like this:
original:
http://maxpayne.gamigo.de/screens/nicht_public/manor1.jpg
draw_primitives:
http://maxpayne.gamigo.de/screens/nicht_public/manor2.jpg
i unfortunately forgot to take the shot with enemies, as i'm not sure if those are seperate primitives as well. you'll be best to try out that command by yourself.
but even if my first words are wrong (and each face would be a different primitive, no matter what colour), i think this should give you a slight overview of the count of primitives.
Joonas
04-16-2004, 03:08 PM
... wouldn't that mean that all objects are primitives? http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
ExNihilo
04-16-2004, 04:55 PM
... wouldn't that mean that all objects are primitives? http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
Im pretty sure all physical objects in MP2 are counted as primitives, which would be level geometry, prefabs charecters and level items. I might be wrong;the only reason i think that is because the basis of the MP2 engine is only the objects(primitives) that are in rooms the player can see are drawn, all primitives in non-visible rooms arnt drawn.
aavenr
04-16-2004, 11:29 PM
From what I have gathered of my conversations with Remedy's Mixuk and Marvel, a primitive is:
- A texture (or an instance of it, remember, you can have multiple copies of what's essentially the same material on the MaxED Texture Browser). And this is not just limited to the level design, even skins count as primitives.
- A DO. The entire object counts as one primitive.
- A 256x256 _combined_ lightmap (all lightmaps are ultimately pieced together in the video memory).
And then when you split stuff with an exit, you are essentially creating new primitives for the room geometry's textures, it doesn't matter if those materials are the same as in other rooms, they still count as new primitives.
Paraphrasing Marvel, every time you split stuff with exits, the textures in each room become different/new primitives. For example, if you have a space that uses 15 textures, has 10 DOs and is split into 4 parts, you most likely have something like 45 primitives. Not that that is much as is but still avoiding making a load of them is good, i.e. something like 400 can be quite alarming already.
And then you are of course free to turn on the primitives render filter like TheHunted explained and test for yourself what counts and doesn't count as a primitive.
The more exits you have the more primitives you'll end up so on small-medium areas, it might be a bigger mistake to put too many exits than too few of them. Ultimately, the amount of primitives is a very significant factor on your FPS speeds.
Also, and this is not directly related to the primitive but just how the engine reacts to other factors (not necessarily primitives), the biggest burdens on the frame rate are first and foremost the characters (enemies and NPC's) and then the DO's and havok objects. After that you have other stuff like amount of textures, triangles, etc. So really guys, it is the actual gameplay what you need to put most attention on when optimizing level speeds.
My two cents (thank TheHunted for them though, he was the one that asked me to post this http://forums.3drealms.com/ubbthreads/images/graemlins/grin.gif).
Joonas
04-16-2004, 11:34 PM
Much appreciated. http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif
theHunted
04-17-2004, 04:53 AM
awesome! thanks http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.