ecksile Posted June 21, 2010 Share Posted June 21, 2010 Im doing some collision box work and I'm curious about how much the poly count of the collision box matters? Seeing as how the game doesn't actually have to visually render the collision box only refrence to it. Should i still reduce the collision vertices as much as possible or can i leave them dense? Will it impact performance and how much if so? Link to comment Share on other sites More sharing options...
Ghogiel Posted June 21, 2010 Share Posted June 21, 2010 Im doing some collision box work and I'm curious about how much the poly count of the collision box matters? Seeing as how the game doesn't actually have to visually render the collision box only refrence to it. Should i still reduce the collision vertices as much as possible or can i leave them dense? Will it impact performance and how much if so?Dude. collision is actually very demanding. really. even though it doesn't actually have to be rendered. it is more than referanced... your cpu basically has to make real time physics calculations, per face of the collision object. the more faces the collision has, the more faces collision detection has to test against. "dense" in any sense of the word would impact performace. It would be very possible to get noticable lag and probably easily drop 10fps or if you had a large-ish interior with "dense" collision meshes. Oddly I was reading a thread on gamedev. and someone was going on about how modern games don't use collision meshes, the physics is tested against the real time geometry, citing GTA4 and F3.... both of which I know for a fact use various forms of collision objects. the thread was over 6 months old, so I didn't bother telling these game programers they should get a clue. Name any of these realistic nextgen games, and I can probably find out that they do use primitive collision objects. at any rate, dense anything is going to impact performance more than optimized. ideally you should always have this concern in the back of your mind when creating game assets. Link to comment Share on other sites More sharing options...
ecksile Posted June 21, 2010 Author Share Posted June 21, 2010 meh i figured. i was hoping id get a response from you or skree, I wasnt sure how demanding it was but i figured it was up there doesnt hurt to double check though ty very much kind sir. :thumbsup: Link to comment Share on other sites More sharing options...
Skree000 Posted October 5, 2010 Share Posted October 5, 2010 There are 2 kinds of collision: Raycast and Volume Collision Raycast: Bullets, tracers, Visibility rays (from npcs), Light raysVolume Collision: Physics Interactions (objects, ragdolls etc) Now, there are several different ways a game object can produce such collision: Graphics Mesh (per polygon, every face is a collidable surface) (EXPENSIVE)Collision Shapes (specially named primitives or simple shapes ie. convexes placed invisibly within or around the mesh)Bounding Box (the outermost points on the model form a large invisible box which encapsulates everything. Usually this is used for large cube shaped objects such as buildings, but also cylinders like telephone poles or tree trunks. Depending on the game engine, you can often mix and match what kind of collision is generated by what game object's attribute. Ie. Raycast is almost always Graphics Mesh by default. When you shoot at stuff the bullet holes usually appear on the polygons. Also AI use vis rays to see around the graphics meshes shapes.Volume Collisions default is (in most engiens) set to Collision Shapes by default. So, when you import a mesh into the editor/engine it will automatically detect pre-named objects in the scene and use those for collision. Some engines such as Evolution engine allow you to cross-wire your collision options, such as using Bounding Box for VolCol but Collision Shapes for Raytrace... etc... (wouldnt usually do that but there are always exceptions) Link to comment Share on other sites More sharing options...
ecksile Posted October 5, 2010 Author Share Posted October 5, 2010 Necromancy! Just kidding :thumbsup: Thanks for this, when you told me raycast on msn i was like uhhh :wacko: Thank you for the explanation. So in terms of vehicle skeletons which can be shot through (windows ect) id want to do Graphics mesh? Is there anyway to combine graphics mesh with collision shapes? So that the outside wouldn't be to taxed but you could toss a grenade inside the car or shoot through the open windows? Or would i just go really low face count on the outside? Link to comment Share on other sites More sharing options...
Skree000 Posted October 5, 2010 Share Posted October 5, 2010 Collision is usually done on the whole mesh however some entities are a collection of seperate meshes.ie. Windows on a vehicle would be more like attachments (seperate meshes) with mesh raycast and boundingbox volcol.once destroyed the collision is destroyed too trouble is setting that up in nifskope is confusinger than it should be most if not all the cars in Fo3 are Collision Shape VolCol. They mostly use Convexes and Capsules. The naming is the key. As long as your objects fit the criteria for a valid CollisionShape and fit the naming conventions the engine will detect and accept them Link to comment Share on other sites More sharing options...
Ghogiel Posted October 6, 2010 Share Posted October 6, 2010 In regards to F3. actors appear to use the skeleton bounding box when alive as their collision/hit box. no havok, thus none of the havok collision shapes are enabled. when they are dead the ragdoll collision and constraint setup in enabled. afaik the bounding box is only ever used with actors. everything else will be collision shapes, primarily Mopp for all statics, then convex or havok primitives for moving physics and anim-statics. Link to comment Share on other sites More sharing options...
Skree000 Posted October 6, 2010 Share Posted October 6, 2010 the characters likely use a bounding box aligned collision capsule instead rather than a bounding box itself. bounding pose (T-pose) for characters is a lot bigger than the idle anim poses, so a bounding box would not be ideal. Link to comment Share on other sites More sharing options...
Ghogiel Posted October 6, 2010 Share Posted October 6, 2010 Ah yes.. thats right.It's a hard coded capsule. also appears that the skeleton collision capsules might actually be in effect while the actor is alive as well. But I haven't tested that, and am not really sure how to do so, I guess I could try shooting someones foot. I think I might be recalling something saiden might or might not have said on the subject.. Link to comment Share on other sites More sharing options...
Skree000 Posted October 7, 2010 Share Posted October 7, 2010 Raytrace on ragdoll or skeletal actors in most games are done by invisible regions or segments, damagedeformer volumes etc. (think a humanoid made of linked sausages). Not in all games, but in some. It's a lot faster to calc trace hits on capsule collections rather than 'if i shot him in the toe polygon' or not. Each labelled as a bodypart. Afa Fo3 is concerned i recall when making my deformable characters the damage modifier allowed sectioning off the polygons themselves into limb sections, im curious if they use perpoly raytrace on skellies Good excercise would be to grab I think it's the PhysX Visual Debugger (PVD) which can display realtime collision shapes as wireframe while you play. Compatible w/ Havok collision afaik b/c its just analyzing the coll calcs Link to comment Share on other sites More sharing options...
Recommended Posts