# teutoburger

Member

33

176 Neutral

• Rank
Member

• Interests
Art
Audio
Design
DevOps
Production
Programming
QA

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## Dynamic Dismemberment and slicing through limbs

That gets my brain into a knot. You'd have to order the triangles by projected-distance on the vector going from origin to plane. So for each triangle, you project each vertex on to the vector going from origin to plane. This gives you a Vmin, and Vmax for each triangle. Corresponding to the zMin and zMax of the 1D approach outlined above. The preordering here is more costly. There's the projection (actually not sure how that is accomplished exactly, something with dot product maybe?) and the length involves a square root, which maybe you can avoid by using the squared length? Edit: or perhaps I'm missing completely out on what you meant by the best fit 3 axis approach...
2. ## Dynamic Dismemberment and slicing through limbs

Not for the original mesh. But you now have two new split meshes, each one having an open section, where the plane cut through. That will have to be closed up still. This means, clockwise-ordering the segments, that make up the 2d polygon (which is a convex one, if you had a convex mesh to begin with) and then triangulizing the 2d-polygon (splitting it into clockwise triangles). And lastly adding the new triangles to each of the new split meshes to close the open section. Edit: Actually its a 3d polygon, in terms of data (made up of 3d vertices) but it "lives" in the slicing plane.
3. ## Dynamic Dismemberment and slicing through limbs

Yup, none but the adjacency structure, which can be built offline, so who cares.
4. ## Dynamic Dismemberment and slicing through limbs

I see.. so you split up a mesh into its convex sub-meshes (with all triangles clockwise), and you have a winged-edge-equivalent structure (that's exactly what you mean by the adjacency information for each vertex, edge and face).Yes so, the problem remains with finding the first intersecting edge. If you randomize the picking of the first vertex, then you have the best average case performance, but it can still happen that it's the worst case.The algorithm I used so far, needs a preordered mesh as input mesh. For each Triangle you note its zMin and zMax. That's simply the smallest (largest) z component of the triangles vertices. Then you order the triangles by their zMin. (You could also save the mesh to file in that face order) Then you can intersect the mesh with any plane in distance D parallel to the xy-plane (meaning the plane containing the x and y-axis), pretty optimally, by disregarding all triangles that either have zMax < D or zMin > D. You only have to check those triangles for which zMin < D < zMax. Pretty restrictive because it works only for planes that are parallel to the xy plane, right? But you can rotate any arbitrary plane to be parallel to xy and rotate the mesh the same way. Of course, then you have to recalculate the zMin and zMax for each triangle (but should be faster than checking for intersection). This works for concave too. Not sure how this compares to your approach, though, regarding performance. I'd have to implement and compare. That'll take some time.
5. ## Dynamic Dismemberment and slicing through limbs

wait.... I think it would work for all convex meshes and also for those concave meshes without inner holes.
6. ## Dynamic Dismemberment and slicing through limbs

just to remove any ambiguity here, convex(?), you probably meant to say convex here, right?
7. ## Dynamic Dismemberment and slicing through limbs

Regarding ClipTexmapPolygon (const TexmapPolygon *pin, const vec &plane, TexmapPolygon *pout, const int32_t space) This routine constructs the intersection polygon of mesh and plane, right? Its a 2d polygon. Viewing the parameter list, why is one vec enough to define the plane? Shouldn't there be a distance and a normal? Or a Point-on-plane and a normal?
8. ## Dynamic Dismemberment and slicing through limbs

something like a winged edge structure, right? I think I get the idea of how the triangle adjacency information allows you to disregard the majority of triangles. Correct me if I'm wrong.. (1)Make an empty Set L of triangles (edges) T that intersect the plane. (2) Pick any triangle (or edge) T that intersects the plane. (I have questions about this step actually*..) (3) Add T to L. (4) Regard each adjacent triangle (edge) of T and check if it is intersecting the plane. If it isn't, you can disregard all its adjacent triangles (edges) (herein lies the major part of the optimisation for this algorithm). If one of them does intersect the plane, you take it as your current T and repeat the step. *How do you find the very first T, that intersects, without looking up every triangle in the mesh until you hit one that intersects the plane? So the worst case is you check them all, the average case is somewhere around 1/2'N checks? Or is there a much better way that I'm missing here?
9. ## 3D Dynamic Dismemberment and slicing through limbs

TL;DR Mesh slicing... Anyone try to venture that way? So I'm aware of this thread: But since it's from 2004, I wanted to ask.. are there any games since (or ever) that actually have real dynamic mesh slicing? The only one that I know of that kind of does this is Metal Gear Rising Revenge..? Anyone know / can guess, how they did this? Is this mesh slicing in real time? It doesn't seem precomputed at least.. I tried myself at programming a mesh slicing algorithm, the other day, but for my routine, at about 200 Vertices it gets too slow for real time. Using this paper here: http://www.dainf.ct.utfpr.edu.br/~murilo/public/CAD-slicing.pdf (Obviously some bugs, face orientation messes up, and I have to say it was completely on the CPU, and didn't spend much effort optimizing anything)
10. ## More than 2 influence bones on one vertex?

that's a fun fact! :-)  I always wondered why WoW avatars have entire towers including battlements, on their shoulders.     So it's maybe caused by the degrees of freedom a shoulder and a hip joint allow.
11. ## More than 2 influence bones on one vertex?

Thanks! Very insightful. Interesting to cancel out bones in an LOD scheme.        Can you give an example of which bones / vertices that would be? i.e. in which area of anatomy? By bendy parts, you mean knees and elbows?   Which bones would be used to have influence on a knee.. I can see how it would be a "knee bone" and perhaps a "hip bone"(?) But which other bones ? Or did you specify more than one bone placed inside the knee itself? (i.e. one for rotation and one for translation or something?)
12. ## More than 2 influence bones on one vertex?

Does it ever happen in day-to-day animation skinning, that you'd want a particular vertex to be influenced by more than two bones?  If so, does that happen quite a lot, or rather rarely?
13. ## skeletal / bone animation with matrices: Need help with understanding

I got it to work now.   Mainly where I got stuck was... I didn't realise that for each bone, it's TransformationMatrix needs to encode not only the bone's rotation relative to its parent, but also its translation, relative to its parent.   Somehow I had thought that its translation was already given by its toParent Matrix, which was wrong. Not wrong per se.. but basically the toParent matrices yield the toRoot matrices which again are used to calculate the offset matrices. They bring the bones to their local spaces. Now animated state can be applied to them. This includes not only rotation, but also translation relative to parent bone.   On the whole, implementing this was quite tough and took me a while, because there were so many concepts in play that needed to be understood. At first I tried hacking through it, trying to get it to work without really understanding it. But looking back, poking the system, also helped me understand it better bit by bit, until finally I felt everything falling into place.   If you attempt this, using this article remember that the order of matrices is indeed important, and that you need to encode the rotation AND the translation (in that order) inside each bones TransformationMatrix. And don't despair, you'll get through it, in time. :-)    [attachment=34301:torso-4.jpg]
14. ## Does Catmull Clark Subdivision work for Meshes consisting of only triangles?

Cool thanks! I'll try it out this weekend. :-)
15. ## skeletal / bone animation with matrices: Need help with understanding

thanks, had a look at it.. wow looks pretty involved code. When I get more time, I'll inspect it more.   Using my assumptions about the matrices I got to a spot where all the bone-connected vertices are transformed to be positioned at (0,0,0) in World space. Like so:   [attachment=34253:torso-3.png]   it seems like at this position they are just ready to be transformed according to animation, and then they need to be placed back "where they belong".   But: I followed the description, outlined in that article, to the iota (in my perception at least), so it seems, at render time, the bones should be already transformed back to where they belong. Why are they persisting to stay at world origin.. No dice. There must be a bug.