Archived

This topic is now archived and is closed to further replies.

Wymsical

Getting my 3D facts straight

Recommended Posts

Wymsical    122
K, its been a while since I programmed last and i''m just jumping back in but into 3D now. I have a few questions for you all: 1. A concave/convex polygon is: a) a polygon that is flat but who''s perimeter has concave parts b) a polygon that isn''t flat (for the rest of this, i''m assuming the answer to 1. is a) ) 2. Does ACTC consolidate triangles on the same plane into larger polygons? 3. Are triangle strips and fans limited to flat surfaces? 4. BSP is best for static scenery right? 5. Are octrees better for dynamic stuff? 6. Whats teh best form of collision detection for use between a bsp scenery and a dynamic object? ( for like an FPS ) 7. Can you use octrees along with bsp? would it be wise? 8. How are character animations stored in FPSs? That should straighten me up for a while. Thx in advance The wymsical wyvern

Share this post


Link to post
Share on other sites
TerranFury    142
#1 - Didn't know there was such a thing. A polygon is within a plane. Either its convex or it isn't. A shape that isn't contained within a plane - and therefore flat - is not a polygon by definition, at least geometrically speaking. If you mean creating a mesh from a set of points floating in 3D space, then there ARE algorithms to do this.

#2 - To be honest, I don't recognize the acronym ACTC.

#3 - Both can be used for non-flat objects. Terrain, for example, is often made of triangle strips.

#4 - BSP can ONLY do static scenery. Is it the BEST way to do it? I don't know. I don't think there's one answer to that question.

#5 - I believe so, but I'm not TOO familiar with octrees.

#6 - Generally there will be a seperate collision map which contains not triangles but convex volumes. Each dynamic object is generally represented in the collision map as a box. Before movement, it is checked to see if that movement will cause the dynamic volume being moved to intersect with any other volumes. If it will, that movement is not performed, or is redirected (in many games, you don't stop when you hit a wall at an angle, but slide depending on the angle at which you hit it, for example.) Note that the collision map is in the form of a BSP tree, though it is important to realize that "movement blocking" and "vis blocking," being two seperate things, will generate two different BSP trees. Only the nodes that the player is in are checked for collisions.

#7 - You could use a form of dynamic vis in conjunction with BSP trees. Whether octrees would be the best choice or not for this is another question, though, that I don't know the answer to, because, as I mentioned before, I'm not TOO familiar with octrees.

#8 - Depending on the engine, different methods are used. Generally, animation is stored as frames (animation frames not to be confused with rendered frames), each of which contains the rotation and location of each part of a model, and this information is linearly interpolated betwen actual, rendered frames. Alternatively, if not all models have rigid bodies and joints, then animation frames would store the location of each vertex (essentially a different model each animation frame). A move complex system would be based more like #1, but would actuallly be a TRUE skeletal animation system, with bones and joints. That's more complicated, but the animation would STILL probably be stored in animation frames which would be interpolated, if not linearly, then according to some curve.


Hope I didn't just tell you everything you already knew!

Edited by - TerranFury on March 18, 2001 7:15:29 PM

Share this post


Link to post
Share on other sites
Countach    122
The face-chunk in a 3DS file is a collection of index triplets that refer to a vertex array that precedes it. So yes, it is a collection of polygons (triangles to be precise).

Now the previous questions:
1. A concave/convex polygon is nonexistant. Only a mesh (=3d model) can be concave or convex. Basically convex means that a mesh is closed (the mesh has no holes that allow you to see the polygons from the back). Convex meshes are the base of Binary Space Partitions (BSP's).

2. Dunno, never heard of it. If you can find some more info on this post it here please.

3. No they are not. You can make a cube, sphere or other mesh with triangle strips/fans as well.

4. Traditionally, yes. There are certain adaptions of this algorithm that are more dynamic though. Red Faction, an upcoming PS2 game sports a Geo-Mod (geometry modification) engine which I believe is based on a BSP.

5. Overall, yes. A clever combination of octrees and BSP's might suit your needs. Just play around with it a bit.

6. (Multiple) oriented bounding box collision tests, I think. It kindof depends on how the mesh is build though.

7. Yes, yes. You can make an octree that has tiny BSP's as leafs. You may think that building those BSP's will take a long time but thats not the case. A BSP takes exponentially more time for every polygon. So with few polygons they are build very quickly. This is particulary usefull to decrease collision detection overhead.

8. Quaternion keyframe interpolation for skeleton based animation, usually. The Quake engine only supports vertex-based animations though.

[edit] spelling check [/edit]




Some people say: 'Life sucks, then you die'.
I disagree.
I say: 'Life sucks, then you get cancer, go into chemotherapy, you lose all your hair and you feel bad about yourself, then the cancer goes into remission but you get a stroke and you can't move your right side anymore, you get hit by a truck and then, MAYBE , you die.
Dennis Leary - Comedy Routine.

Edited by - Countach on March 19, 2001 8:44:03 AM

Share this post


Link to post
Share on other sites