Code Monkey home page Code Monkey logo

worldlockingtools-unreal's Introduction

What is World Locking Tools

World Locking Tools provides a stable and reliable world-locked coordinate system, binding the virtual/holographic world to the physical world.

World Locking Tools locks the holographic space of your application to the physical world. A hologram put in position relative to physical world features will stay fixed relative to those features, and remain fixed relative to other holograms.

World Locking Tools also includes Space Pins, which reposition the scene to match real-world features like QRCodes.

Using the Plugin

Add the plugin to your project from either GitHub or the Marketplace and enable it in the Plugins window. Call the "StartWorldLockingTools" function to start using world locking tools with the given parameters.

This plugin was written for HoloLens, and is meant to be used with the Microsoft OpenXR plugin. The underlying FrozenWorld binaries that world locking tools depends on are available for Android and iOS, and this plugin uses ARBlueprintLibrary when using core AR features like ARPins, so this can be modified to build for ARKit and ARCore as well.

From GitHub source

Copy the WLT_Project/Plugins/WorldLockingTools directory into your game's Plugins directory. Reopen your project and enable the World Locking Tools plugin in your Plugins window.

World Locking Tools Pawn

World Locking Tools works by repositioning the users' head to match a pose the underlying frozen world system is generating from nearby anchors that have been created while walking around. To do this, the camera on the pawn must have a parent and grandparent component that are children of the DefaultSceneRoot. The sample's WLTPawn is setup this way, and one is also included in the plugin under Source/WorldLockingTools/Public/WorldLockingToolsPawn.h.

Space Pins

Space Pins have a virtual position in your scene and need to be given a physical position in your world to reposition the scene to match the real-world. This is accomplished by calling SetSpongyPose on a SpacePin with a transform in the device's tracking space. When multiple space pins are locked in a scene, the relative real-world offsets between them should closely match how they are setup in the virtual scene to minimize drift as you walk from one space pin to another.

Try the example project

The sample project has two levels which demonstrate starting world locking tools, and using space pins with either hand manipulation in one level or QRCodes in the other level. Both levels have an 8 meter long hologram with a space pin on either side. Build, deploy, and run the sample on a HoloLens and take note of the direction the hologram is facing. Close the application, rotate your body to face a different direction, then relaunch the application.

Without using world locking tools, the scene will face the new direction you are facing. With world locking tools, the scene will be oriented based on the first saved launch.

Test the space pins by grabbing the cube on one end of the 8 meter hologram. It will turn pink when it can be interacted with. Face the direction of the white arrow off of this cube and move your hand around while gripped to move the space pin around. The entire scene will move around as the space pin moves. Walk to the other space pin, face the same direction as its white arrow, grip and move this space pin around too. Once both space pins have been positioned, walk between the two and observe that the scene will shift into place to match the space pin's locked real-world position as you get closer to it.

The second scene does the same thing, but positions the space pins based on the QRCodes in the Images directory.

See Also

World Locking Tools

Space Pins

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

worldlockingtools-unreal's People

Contributors

fieldsjacksong avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

worldlockingtools-unreal's Issues

LumenReflections.h(54): fatal error C1001: Internal compiler error.

I'm currently unable to build WLT_Project for the Hololens to test QR Space Pins.

Unreal Engine - Version 5.0.3
Binary Configuration - Development, Release
Microsoft Visual Studio Community 2022 (64-bit) - Version 17.3.5
Windows 10 SDK - Version 10.0.22000.0

UATHelper: Packaging (HoloLens): [3/11] Compile Module.Renderer.9_of_22.cpp
UATHelper: Packaging (HoloLens): N:\UnrealEngine-5.0.3-release\Engine\Source\Runtime\Renderer\Private\Lumen\LumenReflections.h(54): fatal error C1001: Internal compiler error.
UATHelper: Packaging (HoloLens): (compiler file 'D:\a_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\trees.c', line 11371)
UATHelper: Packaging (HoloLens): To work around this problem, try simplifying or changing the program near the locations listed above.
UATHelper: Packaging (HoloLens): If possible please provide a repro here: https://developercommunity.visualstudio.com
UATHelper: Packaging (HoloLens): Please choose the Technical Support command on the Visual C++
UATHelper: Packaging (HoloLens): Help menu, or open the Technical Support help file for more information
UATHelper: Packaging (HoloLens): [4/11] Compile Module.Renderer.7_of_22.cpp
UATHelper: Packaging (HoloLens): N:\UnrealEngine-5.0.3-release\Engine\Source\Runtime\Renderer\Private\Lumen\LumenReflections.h(54): fatal error C1001: Internal compiler error.
UATHelper: Packaging (HoloLens): (compiler file 'D:\a_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\trees.c', line 11371)
UATHelper: Packaging (HoloLens): To work around this problem, try simplifying or changing the program near the locations listed above.
UATHelper: Packaging (HoloLens): If possible please provide a repro here: https://developercommunity.visualstudio.com
UATHelper: Packaging (HoloLens): Please choose the Technical Support command on the Visual C++
UATHelper: Packaging (HoloLens): Help menu, or open the Technical Support help file for more information
UATHelper: Packaging (HoloLens): BUILD FAILED
PackagingResults: Error: Unknown Error

This pop up when opening sample project

image

after Yes

image

crashed error..

I'm doing on UE5.1

could you let me know what should i do?

I was actually doing with Local Spatial Anchor in hololens2 on ue5.1
but now i can't use that because i should create anchor in a place composed of moving videos on three sides,
then the anchor moves along with the motion of the video instead of being fixed.

So, I can't use local spatial anchors.

I am trying to use world locking tool, but I am wondering how to use it because there is an error that the sample project does not open.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.