Commit Graph

12 Commits

Author SHA1 Message Date
Danny McGee 1687bfd6ed BVH animation loading / retargeting (#25)
This PR adds support for BVH animation files, with a custom animation
player and retargeting solution for our Blender Rigify-based skeletal
meshes.

---------

Co-authored-by: Brooks Palin <brookspalin710@gmail.com>
2024-01-18 17:28:25 -05:00
rewin a7d1f80554 First try to add undo 2024-01-09 23:24:51 +03:00
Danny McGee 155272a5ba Upgrade to Bevy v0.12 (#12)
* Migrate `System::pipe(...)` calls to `System::map(...)`
* Migrate `EventReader::iter()` and `EventReader::into_iter()` calls to
  `EventReader::read()`
* Migrate asset handling
* Generate `*.meta` files for assets
* Migrate a shader import
* Fix emissive materials double-applying their emissive strength
* Fix non-normalized bone weights resulting in incorrect vertex positions
* Set shadow filtering to `Hardware2x2` to mitigate increase in shader
  compilation times
2023-11-22 23:05:42 -05:00
Danny McGee 06751e54f6 Object picking (#8)
This PR implements basic object selection, with help from `bevy_mod_picking` and
`bevy_mod_outline`.

### Work Done
 * Click to select objects in the world
 * Selected objects become visually highlighted
 * The selected entity is available globally on the `Res<Selection>` resource
 * Selected entities can also be queried via the `Selected` marker component
 * Pressing `F` will "focus" the camera on the selected entity
 * Pressing `Esc` will clear the active selection

### Known Issues
 * We're currently using `bevy_mod_picking`'s "Selection" feature, which isn't 
   aware of our own input events. As a consequence, it will select the object
   under the cursor when releasing `LMB` after orbiting the camera, which is not
   what we want. This should be pretty easily fixable by dropping
   `bevy_mod_picking`'s selection feature and reading the object under the
   cursor in our own click listener that only runs if the LMB event is
   unhandled.
 * The skinned mesh is not currently selectable. This is likely fixable by
   adjusting the logic in `scene::mark_scene_objects`... somehow. The `Gltf`
   data structure is kind of a nightmare to work with, so this will take some
   investigation.

### Future Enhancements
 * For parity with other DCC apps, the "Focus" action should also adjust the
   camera zoom level to "frame" the selected object in the view. Punting on that
   for now because I'm not super confident about the math involved.
 * Group selection with Shift/Ctrl and/or marquee selection would be really nice
   to have, but probably not critical for now.
2023-11-02 13:32:58 -04:00
Danny McGee 4b9ea61495 New test scene, better render quality (#6)
* Updated test scene
* Adjusted lighting, tonemapping
* Replaced skybox
* Added bloom and FXAA
* [meta] Added assets folder to build dependencies
2023-10-25 17:45:24 -04:00
Danny McGee e97c14c5da Upgrade bevy to 0.11.3; Switch to WebGL backend 2023-10-02 21:51:05 -04:00
Danny McGee 64133de881 Workflow fixes 2023-10-02 20:05:42 -04:00
Danny McGee bed97cff47 Rename projects 2023-09-29 18:33:00 -04:00
Danny McGee bc8994a780 Get wasm build running in browser 2023-09-28 23:33:08 -04:00
Danny McGee 9482cfb794 Setup wasm config for Bevy app 2023-09-27 15:33:55 -04:00
Danny McGee cf4c851ceb Add bevy, setup fast compiles 2023-09-27 11:04:23 -04:00
Danny McGee eb28b9bbad Bootstrap hello-world app 2023-09-27 10:48:41 -04:00