Soooo...this bullshit is happening when the CombineInstance function executes
Athough an error is being thrown, my limited knowledge of code is preventing me from truly understanding why this is happening. I suspect it has something to do with material IDs and the fact that they are sometimes swapped on any given fractured piece. Visually, each individual fractured piece looks as it should, which you can see in the image below; however, upon running the CombineInstance function, the artifacting happens.
I thought that disabling CombineFrags would solve this particular issue, but it does not. I can instead increase the value of the CombineMeshesDelay to an integer that is greater than the amount of game time, and while that would technically solve this particular problem, I would be surprised to encounter performance related issues as a result of this particular "solution."
Regarding the swapped material IDs, I think that this is somehow the result of the Cell Fracturing process, and that somehow when assigning the secondary material ID, the nature (concave vs convex) of the fractured shape might be responsible. For example, previously the entire mesh was fractured. Notice how in the image below the 3 removed pieces reveal that the interior of the mesh is completely solid, which makes every fracture piece convex and ensures the entire mesh can be fractured apart.
However, in this instance, I do not want the entire mesh to break apart, but instead I wanted there to be an underlying piece of geometry that would recognize shot collision, but would not itself break apart, and to do this, the Cell Fracturing can account for interior (child) geometry and will fracture accordingly, giving the following results
Notice how the fractured piece is now concave due to the fact that the fracturing algorithm has conformed to the interior mesh. You can also see examples of this in the 2nd image of this post (the one that displays the actual fracturing).
Still, this is all just a hypothesis and I currently do not have an adequate solution.
No comments:
Post a Comment