Jump to content

How does "mirror" symmetry really work?


Recommended Posts

In general, creating a mirror image of something cannot be done by a rotation. Mirror symmetry really means pulling something "inside out" through the mirror. There's no way to rotate your left hand to make it match your right hand.

However, there is an exception to this rule. If the object is already symmetrical, then you can rotate it to produce a "mirrored" copy. But then way you need to rotate it depends on which way it is oriented.

And there is a third possibility: if the part's plane of mirror symmetry is the same as the plane by which you are trying to mirror it, then you need to translate (not rotate) the part along the axis through that plane.

In the image below, you will see an example of this. The cockpit geometry (but not the texture!) is itself symmetrical: In its "natural" orientation You can cut it vertically lengthwise down the middle and produce two halves that are the same. So we can in fact produce a "mirrored" copy in the construction facility by performing the appropriate rotatin or translation.

Note: in principle, the game could theoretically create a true mirror. It could examine the model and textures and invert all of the coordinates along the axis through the desired symmetry plane, effectively creating a "new" (virtual) part. But the game doesn't appear to be doing this, because note how the cockpit door texture is not, in fact, mirrored. The part has been rotated.

But how does the game figure out which way to do the rotation? It depends on where the plane of symmetry of original shape is in its natural orientation, as well as depending on how I have subsequently rotated it before placing it onto the craft.

The reason why I ask is because I am making some custom "welded" parts, and ideally I would like to make them so that the game can correctly place them with mirror symmetry. But at the moment some of the parts end up being rotated the wrong way. Is there something in a part config file that can be set to tell the game what the "natural" plane of symmetry is (if any)?

LGKj1a7.png

Edited by allmhuran
Link to comment
Share on other sites

7 hours ago, Crzyrndm said:

https://github.com/Crzyrndm/B9-PWings-Fork/blob/master/GameData/B9_Aerospace_ProceduralWings/Parts/Aero_Wing_Procedural/wing_procedural_typeA.cfg#L42

Basically, a unit vector that tells KSP which axis to rotate the model around (and in this case, to turn it inside out by applying a negative scale factor)

Thanks very much, perfect answer and exactly the kind of thing I was expecting. I don't think I've ever seen that line in a config file I was playing with, perhaps because the welding mod drops it out! Super useful info!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...