Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symmetry #56

Open
tatjam opened this issue Feb 27, 2023 · 2 comments
Open

Symmetry #56

tatjam opened this issue Feb 27, 2023 · 2 comments
Assignees
Labels
editor Issues related to the vehicle editor enhancement New feature or request

Comments

@tatjam
Copy link
Collaborator

tatjam commented Feb 27, 2023

Some thinking into symmetry, which will be implemented in the coming commits:

Types of symmetry

  • Radial around piece: Pieces attached to the surface of a piece will get duplicated around the central axis of said piece, as long as the user has chosen this symmetry mode.
  • Radial around axis: Once this symmetry mode is chosen, the user must input an axis (think of how this would work in the GUI), which is used as the central axis for symmetry
  • Planar around piece: Same as before, but with planar symmetry around a given plane selected by the user from a list of axes specified by the piece. Only usable on certain pieces.
  • Planar around axis: Same as before, but the user specifies the axis around the piece (think how to implement the GUI)
  • Attachment list: This is not a true symmetry, but instead the user selects a list of attachment points and pieces are duplicated across them
  • Cluster: The user chooses a plane, radius and number of copies, and a "engine cluster" is built from the given piece.

Implementation

Each symmetry mode requires some custom GUI, both as widgets on the editor panel, and as 3D gizmos on the editor.
Symmetry is not directly stored in the vehicle, but in VehicleMeta.
Finally, wiring and plumbing will properly be duplicated if the user chooses so.

GUI

Symmetry will work by first choosing a symmetry mode, and then clicking an unattached root piece, which will make the symmetry apply to said piece and all children. Unattached root pieces will be highlighted during this editor mode.

Once a piece is affected by symmetry, any modification to it or its children will be mirrored, but if the piece itself is detached the symmetry will break, and all cloned pieces will disappear. Finally, the user may delete a symmetry group, but keep the symmetric pieces, via a button on the GUI.

Symmetry will be handled in the attach editor mode.

@tatjam tatjam self-assigned this Feb 27, 2023
@tatjam tatjam added enhancement New feature or request editor Issues related to the vehicle editor labels Feb 27, 2023
@tatjam
Copy link
Collaborator Author

tatjam commented Feb 27, 2023

Symmetry mode will be implemented in lua for user customization, although "vanilla" ones are going to be fairly exhaustive of all useful modes.

@tatjam
Copy link
Collaborator Author

tatjam commented Jul 9, 2023

Nested symmetry should be implemented by duplicating the symmetry groups. As this is a fairly generic thing, it would be wise to implement some kind of API that allows you to obtain a list of points where an action is needed in symmetry. This would also help implement auto-wiring and auto-plumbing

EDIT: Duplication meaning the application of the symmetry group in the different root pieces, with lua handling the transformation in space?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Issues related to the vehicle editor enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant