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

Fix coil/lamp names, bugs, and improve asset library. #444

Closed
wants to merge 84 commits into from

Conversation

freezy
Copy link
Owner

@freezy freezy commented Oct 17, 2022

This PR supersedes #430 and adds the same feature for lamps. Switches are handled on PinMAME side, see VisualPinball/VisualPinball.Engine.PinMAME#29.

Apart from the GLE changes, the major part of this PR is asset library related. The following has been added:

  • The asset library repo now contains a project that is used to generate thumbnails. It uses some DXR features for maximal fidelity. For this, each asset now contains a preset dropdown of where the camera should be positioned for taking the screenshot.
  • "Material Variations" were introduced. This allows you to specify multiple materials per object and material slot. The browser will then show all combinations of those, which then can be easily added to the scene. The thumbnail IDs of the variations are calculated based on the asset GUID and the materials, so they are reproducible.
  • We now have an "add" button in the details view (as opposed to only drag+drop before). This allows us to do more than just dropping it into the scene, e.g. we can now also position the element where we want, and scale it correctly.
  • Talking about scaling, we still need to deal with scaling issues. On one hand, we want to model our assets in real-world measures, but we also have combinations of game items (which are in VPX measures), for example a flipper (where the model should be real-world, but the configuration is VPX world). So we ended up tagging assets for which system they are scaled. Everything non-gameitem related is tagged as World, while collidable elements on the playfield are tagged as Table. This allows us to add them to the right place in the hierarchy, and keep them scaled correctly.
  • We now have a "replace selected" button. This is useful when you want to swap existing assets in the scene with another one (specially if it's a variation).
  • The whole layout of the details view was rewritten. Instead of doing everything manually, we now use property drawers and Unity to bind to the data. The reason for that was that we can leverage Unity's standard controls for the edit view, which became too complex to handle for the material variations (even the standard controls seem to struggle with it).
  • We've also separated the asset data into a file per asset, which makes testing much easier (you also edit the asset in the inspector), and makes diffing for changes more obvious.
  • The asset grid is now correctly aligned, independently of the text label length.
  • The UI of the read-only asset data has changed (for the better). Instead of invisible links we now display toggle boxes, which make the filter options more evident.
  • Two additional options were added to the asset data: Quality and Unpack Prefab. Quality just indicates how the asset was created, and the latter provides an option to unpack the prefabs after instantiation. This is useful because we can only add prefabs to the asset library, and sometimes it doesn't make sense to keep them as such in the scene (e.g. a slingshot assembly).
  • The asset library can now be opened directly from the toolbox.
  • You can now unlock or lock the library directly by CTRL+clicking on the lock icon (or the name).
  • In edit mode, you can right-click on an attribute or tag value and have it applied to all selected elements in the library. This allows for quick batch-editing without having to select each asset individually.
  • Fix bug when handling quotes in the filter box. Now, searching for Size:1-1/16" works.
  • Thumbnails are cached for faster display.
  • When a part number is added under attributes, CTRL+Space under a McMaster-Carr or Marco Specialties URL will auto-complete the URL.

image

Additionally, there were a few minor features added that I made my life easier:

  • Drag points can now be easily reversed
  • When adding an object to the scene, you can now easily convert it to a collider by right-clicking it in the hierarchy.

Finally, I've written a new tutorial on how to re-topo a 3D scan.

Missing: The asset library documentation is still missing (or, at least not yet updated and moved to the doc folder). This PR will also need the asset repo to be updated. PR for this will be done when I'm through with the hardware assets.

@freezy freezy added documentation Improvements or additions to documentation editor Editor-related changes for Unity labels Oct 17, 2022
@freezy freezy self-assigned this Oct 17, 2022
@freezy freezy closed this in #447 Dec 23, 2022
@freezy freezy mentioned this pull request Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation editor Editor-related changes for Unity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant