Skip to content

Commit

Permalink
release 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkalinowski committed May 3, 2023
1 parent 14b3e1b commit 5e0a624
Show file tree
Hide file tree
Showing 17 changed files with 190 additions and 29 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Normalize line endings for all files that Git considers text files.
* text=auto eol=lf

# Only include the addons folder when downloading from the Asset Library.
/** export-ignore
/addons !export-ignore
/addons/** !export-ignore
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
.godot
*.import
# Godot 4+ specific ignores
.godot/

# Godot-specific ignores
.import/
*.import
export.cfg
export_presets.cfg

# Imported translations (automatically generated from CSV files)
*.translation

# Mono-specific ignores
.mono/
data_*/
mono_crash.*.json
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Patryk Kalinowski (patrykkalinowski.com)
Copyright (c) 2023 Patryk Kalinowski (patrykkalinowski.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
25 changes: 13 additions & 12 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Godot XR Kit is a set of addons providing various features for XR development in

Physics-based XR movement. Player hands collide with environment and can grab or push physics object in realistic manner. Player body can collide with physics objects and be moved around in space.

![Godot XR Kit - Physics Movement](/addons/xr-kit/physics-movement/showcase.gif)
![Godot XR Kit - Physics Movement](/screenshots/physics_movement.gif)

### Features

Expand All @@ -29,7 +29,7 @@ Physics-based XR movement. Player hands collide with environment and can grab or

Real-time recognition of hand poses based on predefined templates.

![Godot XR Kit - Hand Gesture Recognition](/addons/xr-kit/hand-gesture-recognition/showcase.gif)
![Godot XR Kit - Hand Gesture Recognition](/screenshots/hand_gesture_recognition.gif)

### Currently tracked hand poses:

Expand All @@ -46,7 +46,7 @@ Real-time recognition of hand poses based on predefined templates.

Applies smoothing to XR hand movement using [1€ filter](https://gery.casiez.net/1euro/). Supports hand and controller tracking. See [1€ filter demo](https://gery.casiez.net/1euro/InteractiveDemo/). Can be used to reduce microstutter or simulate fake weight by increasing hand movement lag.

![Godot XR Kit - Smooth Input Filter](/addons/xr-kit/smooth-input-filter/showcase.gif)
![Godot XR Kit - Smooth Input Filter](/screenshots/smooth_input_filter.gif)

### Features:

Expand All @@ -59,7 +59,7 @@ Applies smoothing to XR hand movement using [1€ filter](https://gery.casiez.ne

Smooth VR preview for recording in native monitor resolution.

![Godot XR Kit - Cinematic View](/addons/xr-kit/cinematic-view/showcase.gif)
![Godot XR Kit - Cinematic View](/screenshots/cinematic_view.gif)

*Raw preview (left) vs Cinematic View*

Expand All @@ -74,14 +74,15 @@ Smooth VR preview for recording in native monitor resolution.

## Getting started

Repository contains Godot v4.0.1 project with XR and main scene preconfigured.
Repository contains Godot 4.0.2 project with XR and main scene preconfigured. Releases are reduced to addon files only.

1. Download project using [this link](https://github.com/patrykkalinowski/godot-xr-kit/archive/refs/heads/master.zip).
2. Click `Run Project` or press F5
3. `Playground` scene from examples folder will be loaded
Latest release is available in Godot's Asset Library under the name [XR Kit](https://godotengine.org/asset-library/asset/1870) or on [releases page](https://github.com/patrykkalinowski/godot-xr-kit/releases/latest).

`xr-kit/examples/playground.tscn` implements Physics Movement and Hand Gesture Recognition.
`xr-kit/examples/smooth_input_filter.tscn` implements Smooth Input Filter.
To get most recent version of the whole project, [download from master branch](https://github.com/patrykkalinowski/godot-xr-kit/archive/refs/heads/master.zip).

`/addons/xr-kit/examples/playground.tscn` implements Physics Movement, Hand Gesture Recognition and Cinematic View.

`/addons/xr-kit/examples/smooth_input_filter.tscn` implements Smooth Input Filter.

## Compatibility

Expand Down Expand Up @@ -110,8 +111,8 @@ Source code contains multiple `TODO` comments with known issues and missing feat

### Showcase

Build something with the plugin and share an example scene or recorded video
Build something with the plugin and share an example scene or recorded video [here](https://github.com/patrykkalinowski/godot-xr-kit/discussions/categories/show-and-tell).

### Ideas

If you have some ideas how to improve the plugin, don't hesitate to [create an issue](https://github.com/patrykkalinowski/godot-xr-kit/issues/new) or message me directly at [patryk@patrykkalinowski.com](mailto:patryk@patrykkalinowski.com).
If you have some ideas how to improve the plugin, don't hesitate to [create new discussion](https://github.com/patrykkalinowski/godot-xr-kit/discussions/categories/ideas) or message me directly at [patryk@patrykkalinowski.com](mailto:patryk@patrykkalinowski.com).
21 changes: 21 additions & 0 deletions addons/xr-kit/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Patryk Kalinowski (patrykkalinowski.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
118 changes: 118 additions & 0 deletions addons/xr-kit/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Godot XR Kit

Godot XR Kit is a set of addons providing various features for XR development in Godot 4.

## Physics Movement

Physics-based XR movement. Player hands collide with environment and can grab or push physics object in realistic manner. Player body can collide with physics objects and be moved around in space.

![Godot XR Kit - Physics Movement](/screenshots/physics_movement.gif)

### Features

- Physics hand follows controller and can be blocked by world objects
- Players can grab and move objects
- Heavy objects are harder to move
- Grabbing heavy objects with two hands makes them easier to move
- Fingers curl around grabbed objects geometry
- Players can move themselves by pushing away from objects
- Heavier objects allow for stronger push
- Players can move in space with thrusters (button activated)
- Players can hit objects with their head and push themselves away
- Ghost hand appears when controller hand gets far from physics one
- Body snap rotation
- Body XYZ rotation around static object using hands (trigger activated)

[Read more](/addons/xr-kit/physics-movement/)

## Hand Gesture Recognition

Real-time recognition of hand poses based on predefined templates.

![Godot XR Kit - Hand Gesture Recognition](/screenshots/hand_gesture_recognition.gif)

### Currently tracked hand poses:

- open
- rest
- half_grip
- full_grip
- point
- thumb_up

[Read more](/addons/xr-kit/hand-gesture-recognition/)

## Smooth Input Filter

Applies smoothing to XR hand movement using [1€ filter](https://gery.casiez.net/1euro/). Supports hand and controller tracking. See [1€ filter demo](https://gery.casiez.net/1euro/InteractiveDemo/). Can be used to reduce microstutter or simulate fake weight by increasing hand movement lag.

![Godot XR Kit - Smooth Input Filter](/screenshots/smooth_input_filter.gif)

### Features:

- Supports smoothing movement for hand tracking Skeleton3D and Node3D (ex. XRController3D)
- Reduces jitter while keeping lag to minimum

[Read more](/addons/xr-kit/smooth-input-filter/)

## Cinematic View

Smooth VR preview for recording in native monitor resolution.

![Godot XR Kit - Cinematic View](/screenshots/cinematic_view.gif)

*Raw preview (left) vs Cinematic View*

## Features:

- Full screen VR preview in monitor native resolution
- Smooth preview can be rendered to another screen
- Smoothing parameters can be tuned
- Full range of Godot's camera settings is available

[Read more](/addons/xr-kit/cinematic-view/)

## Getting started

Repository contains Godot 4.0.2 project with XR and main scene preconfigured. Releases are reduced to addon files only.

Latest release is available in Godot's Asset Library under the name [XR Kit](https://godotengine.org/asset-library/asset/1870) or on [releases page](https://github.com/patrykkalinowski/godot-xr-kit/releases/latest).

To get most recent version of the whole project, [download from master branch](https://github.com/patrykkalinowski/godot-xr-kit/archive/refs/heads/master.zip).

`/addons/xr-kit/examples/playground.tscn` implements Physics Movement, Hand Gesture Recognition and Cinematic View.

`/addons/xr-kit/examples/smooth_input_filter.tscn` implements Smooth Input Filter.

## Compatibility

Plugin should work with every OpenXR runtime supporting Vulkan and using OpenXR hand tracking extension. It works best with SteamVR, as it simulates hand skeleton even when using controllers. In other runtimes, when using controllers, hands will not receive skeleton data and they will not work.

For plugin to be fully compatible with all OpenXR runtimes, it needs hand models with animations - which is planned, but not yet implemented.

| Headset | Runtime | Compatible |
|---|---|:---:|
| HP Reverb G2 | SteamVR | Yes |
| Pico 4 | Standalone | No hand tracking |
| Meta Quest 2 | Standalone | Hand tracking only (no controllers)
| Other | ? | ? |

## Contributing

If you'd like to improve the plugin, there are few options:

### Test compatibility with other headsets and runtimes

I don't have access to other headset than mine (HP Reverb G2). Compatibility checks with other headsets are more than welcome.

### Code improvements

Source code contains multiple `TODO` comments with known issues and missing features. You can also take a look at existing [Issues](https://github.com/patrykkalinowski/godot-xr-kit/issues).

### Showcase

Build something with the plugin and share an example scene or recorded video [here](https://github.com/patrykkalinowski/godot-xr-kit/discussions/categories/show-and-tell).

### Ideas

If you have some ideas how to improve the plugin, don't hesitate to [create new discussion](https://github.com/patrykkalinowski/godot-xr-kit/discussions/categories/ideas) or message me directly at [patryk@patrykkalinowski.com](mailto:patryk@patrykkalinowski.com).
6 changes: 3 additions & 3 deletions addons/xr-kit/cinematic-view/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Smooth VR preview for recording in native monitor resolution.

![Godot XR Kit - Cinematic View](showcase.gif)
![Godot XR Kit - Cinematic View](/screenshots/cinematic_view.gif)

*Raw preview (left) vs Cinematic View*

Expand All @@ -21,8 +21,8 @@ Cinematic View creates new separate window with player camera view smoothed out.

1. Go to Project Settings, toggle **Advanced settings** and disable **Embed Subwindows** option in **Display -> Window** tab
2. Add `cinematic_view.tscn` anywhere to your scene.
3. Assign your `XRCamera3D` to `CinematicView` node in property editor.
3. Assign your `XRCamera3D` node to `CinematicView` node in property editor.
4. Start a project. Cinematic View will appear as full screen window on your main screen.
5. Record videos using capture software such as OBS Studio or Nvidia Shadowplay.

Cinematic View is implemented in `examples/playground.tscn`.
Cinematic View is implemented in `/addons/xr-kit/examples/playground.tscn`.
File renamed without changes.
10 changes: 5 additions & 5 deletions addons/xr-kit/hand-gesture-recognition/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Real-time recognition of hand poses based on predefined templates.

![Godot XR Kit - Hand Gesture Recognition](showcase.gif)
![Godot XR Kit - Hand Gesture Recognition](/screenshots/hand_gesture_recognition.gif)

## Currently tracked poses:

Expand All @@ -20,15 +20,15 @@ Distance of every bone in skeleton to bone 0 (wrist) is compared with distances
## Getting started

1. Add `HandPoseRecognition.tscn` anywhere to your scene where hand skeleton is available.
2. Assign your `Skeleton3D` to `HandPoseRecognition` node in property editor.
2. Assign your `Skeleton3D` node to `HandPoseRecognition` node in property editor.
3. When new pose is recognized, `HandPoseRecognition` node will fire `new_pose` signal.
4. Current pose can also be queried from `HandPoseRecognition.pose` variable.

Predefined poses in template file (`hand_pose_templates.json`) were created with skeleton conforming to [OpenXR convention of hand joints](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#_conventions_of_hand_joints)
Predefined poses in template file (`hand_pose_templates.json`) were created using SteamVR and Valve hands, with skeleton conforming to [OpenXR convention of hand joints](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#_conventions_of_hand_joints)

## Adding new pose templates

1. Add `HandPoseSave.tscn` anywhere to your scene where hand skeleton is available.
2. Assign your `Skeleton3D` to `HandPoseSave` node.
3. During play, press **spacebar** to save skeleton pose as a template. By default, template will be named `custom_pose` and every press of spacebar will override it with current pose. You can change pose name in `HandPoseSave` property editor (right sidebar).
2. Assign your `Skeleton3D` node to `HandPoseSave` node.
3. During play, press **spacebar** to save skeleton pose as a template. By default, template will be named `custom_pose` and every press of spacebar will override it with current pose. You can change pose name in `HandPoseSave` property editor.
4. You will need to reload the game for new templates to be loaded for recognition.
8 changes: 4 additions & 4 deletions addons/xr-kit/physics-movement/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Scripts and scenes for physics-based XR movement. Player hands collide with environment and can grab or push physics object in realistic manner. Player body can collide with physics objects and be moved around in space.

*It is still a work in progress, not ready to be dropped in your game as-is.*
*Physics Movement is in alpha stage.*

![Godot XR Kit - Physics Movement](showcase.gif)
![Godot XR Kit - Physics Movement](/screenshots/physics_movement.gif)

## Features

Expand All @@ -31,12 +31,12 @@ To make sure physics hand works in predictable ways, only wrist bone is responsi

Provided hand models use OpenXR convention of 26 joints for hand tracking: 4 joints for the thumb finger, 5 joints for the other four fingers, and the wrist and palm of the hands.

![OpenXR Hands](openxr_hands.png)
![OpenXR Hands](/screenshots/openxr_hands.png)
*Source: https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#_conventions_of_hand_joints*

## Getting started

`player.tscn` contains everything needed for physics movement, including XR interface initialization.
`/addons/xr-kit/physics_movement/scenes/player.tscn` contains everything needed for physics movement, including XR interface initialization.

## Godot 3.5

Expand Down
4 changes: 2 additions & 2 deletions addons/xr-kit/smooth-input-filter/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Applies smoothing to XR hand movement using [1€ filter](https://gery.casiez.net/1euro/). Supports hand and controller tracking. See [1€ filter demo](https://gery.casiez.net/1euro/InteractiveDemo/). Can be used to reduce microstutter or simulate fake weight by increasing hand movement lag.

![Godot XR Kit - Smooth Input Filter](showcase.gif)
![Godot XR Kit - Smooth Input Filter](/screenshots/smooth_input_filter.gif)

## Features:

Expand All @@ -17,7 +17,7 @@ Every axis of source node global_transform's origin (`Vector3`) is passed throug

1. Add `smooth_open_xr_hand.tscn` anywhere to your scene.
2. You need to duplicate nodes you want to smooth, these duplicates will follow source nodes with filter applied.
2. If you are using hand tracking, assign `Skeleton3D` controlled by `OpenXRHand` as **Source Skeleton**. Assign `Skeleton3D` you want to have smoothed as **Destination Skeleton**.
2. If you are using hand tracking, assign `Skeleton3D` node controlled by `OpenXRHand` as **Source Skeleton**. Assign `Skeleton3D` node you want to have smoothed as **Destination Skeleton**.
3. If you are using controllers or want to smooth out movement of any other 3D node, assign nodes to **Source Node** and **Destination Node**.
4. Tune filter with **Allowed Jitter** and **Lag Reduction** parameters.

Expand Down
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 5e0a624

Please sign in to comment.