- Home /
How to find symmetry plane of an object
Hello. I need a script able to find the symmetry of a given object inside the Unity 3D space.
The idea is the following (I simply drawn a plane wich divides in half a car, just to give an hint):
Any idea on how to do this? I would like to exploit the points of the mesh and check wether each point has a simmetrical counterpart.
this is a pretty non-trivial problem.
one approach might be to try to identify the points farthest from the object origin, and do reasoning about those. in the simple case there would be only two, but there could be an arbitrary number, which makes it difficult.
How should a script know what symmetry you mean? There are 3 ways at least. You could ho from the center point but still it depends on the model. Reflecting the vertices to check the opposite might work but you might an origin
$$anonymous$$aybe an idea could be to divide in half the 3D Bounding Box of an object. I had alreay implemented AABB in my project. Is this a good plan, according to your opinion?
Answer by elenzil · Dec 21, 2019 at 04:52 PM
what assumptions can you make about the objects ?
it sounds like:
has at least one symmetry plane.
but what about these ?
is already centered on the local origin ?
the symmetry plane is the same as one of the coordinate planes ? eg, xy, yz, or zx.
the symmetry plane is known to be one of the coordinate planes, eg yz.
i assume 3) is not true, since that's your question. if 1) is not true, it's easy to center it yourself. just compute the average vertex position and subtract that from each vertex. if 2) is true, the problem seems trivial.
if 2) is not true, the problem is very non-trivial.
what is AABB ? oh axis aligned bb. i have to admit i don't understand your suggestion.
Your answer
Follow this Question
Related Questions
Detecting object inside an area. 1 Answer
Number of mesh vertices increase when imported into unity 1 Answer
Problems importing plane mesh from blender to unity 1 Answer
Rendering Issue 1 Answer