Coder Social home page Coder Social logo

tiltfivegodot4's People

Contributors

bastiaanolij avatar malcolmnixon avatar patrickdown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tiltfivegodot4's Issues

IPD issues with world_scale

One of the issues I seem to have run into while streaming, though I could be wrong, is that when I changed world scale the IPD seemed wrong.

I'll investigate more soon

Add functionality to get the video stream from the tangible tracking camera.

The Tilt Five glasses have a tangible tracking camera. The intent of this camera is to allow mixing of physical media, like cards or figures, with the digital game. The frame capture from this camera is exposed via the NDK. This functionality should be exposed to Godot.

Special consideration should be given to feeding this video stream to libraries like OpenCV for image processing.

Restructure initialisation to match other XRInterfaces

This is absolutely a nitpicking issue and I'll find an hour somewhere to polish this up. Just recording this as something to remind me :)

The design of the XRServer is such that XRInterfaces are registered early, and the initialize/uninitialize function build up/tear down the system. For TiltFive its the other way around.

Big oops in swap chain and other issues.

// t5 exclusivity group 3 - serialized in main thread
T5_Result result = t5SendFrameToGlasses(_glasses_handle, &frameInfo);
LOG_TOGGLE(false, result == T5_SUCCESS, "Started sending frames", "Stoped sending frames");
if (result == T5_SUCCESS)
return;
LOG_T5_ERROR(result);
if (result == T5_ERROR_NOT_CONNECTED) {
_state.clear(GlassesState::CONNECTED);
}
// not sure how we might get here
else if (result == T5_ERROR_GFX_CONTEXT_INIT_FAIL || result == T5_ERROR_INVALID_GFX_CONTEXT) {
_state.clear(GlassesState::GRAPHICS_INIT);
}
else {
_state.reset(GlassesState::ERROR);
}
_current_frame_idx = (_current_frame_idx + 1) % _swap_chain_frames.size();

There is a bug here that is actually producing better looking results.

These lines revel a bug where the system was not advancing though the swap chain. the line _current_frame_idx = (_current_frame_idx + 1) % _swap_chain_frames.size(); really needs to be moved to just under the t5SendFrameToGlasses call.

I did try this fix but discovered that weird tracking distortions appeared in the Vulkan output. I'm not sure what the problem is yet. It could be that something about this config is fighting with the predictive pose estimation in the glasses or it could be that we need to set up some Vulkan barrier before submitting the frames.

So as it stands only one frame in the swap chain is being used and that bug actually produces the best results under Vulkan. There is still some small jitter in the Vulkan output so it seems there is still some sort of problem there.

Android support

Make whatever code and build changes to support Android devices.

Linux build

Make whatever changes to the code and build to support Linux.
I've got a Linux version building but Tilt Five doesn't have drivers for Linux that match the NDK 1.4 beta yet.

Add signals when glasses scene is added/removed

Will be experimenting with this more but one thing I really missed was a way to react when a glasses scene was added and/or removed. We should probably emit a signal from the T5 manager.

We also need to look into easier ways for the glasses scene to communicate with the main playing logic.

Introduce our own camera class for glasses

To correctly place the camera node in the world XRCamera3D binds itself to the head tracker (which is missing from the plugin). Other than that its near and far is used when rendering. In Godot 3 it had further functionality that has now been removed so it doesn't do that much more than the normal camera, all the real magic happens in the XRInterface.

So for correctly placing the camera nodes we could introduce trackers for each glasses and create a T5Camera3D node that simply inherits Camera3D, binds to the correct tracker and updates its position accordingly.

Whether this will have a lot of benefit I don't know, it doesn't seem common for the form factor to have elements childed to the glasses, but it will allow us to show glasses (optionally) in a spectator view.

Support Godot 4 Vulkan renderer

Going to need to be able to fill out this T5 structure

void GodotT5Service::use_vulkan_api() {
    LOG_ERROR("Vulkan is not implemented yet");
    T5_GraphicsContextVulkan graphics_context;
    // graphics_context.instance = 
    // graphics_context.physicalDevice =
    // graphics_context.device =
    // graphics_context.queue =
    // graphics_context.queueFamilyIndex =
    set_graphics_context(graphics_context);
}

Also going to need to get vkImage handles for left and right views. I'm guessing that Godot 4 uses whatever is the GL texture array equivalent for Vulkan. So either there is a way to create these vkImage from layers or we need to communicate the VkImage format to T5 to see if they will support it.

Exporting project as binary with the entension enabled

Thank you for creating the GDExtension for the Tilt Five glasses. It is working great!

How do you export the project with the extension enabled? The extension works fine in development mode, but when I export the project and run the binary file, the rendering does not happen with the glasses. The same happens with and without the "debug" export option. Thanks.

Error deallocating textures used for render targets

These errors are listed when the app using the extension closes. The renderer marks the created textures as render targets. Because of this they can't be deallocated as normal so they leak when the app exits.

ERROR: Condition "t->is_render_target" is true.
   at: GLES3::TextureStorage::texture_free (drivers\gles3\storage\texture_storage.cpp:706)
ERROR: 1 RID allocations of type 'struct GLES3::Texture' were leaked at exit.
ERROR: Texture Layered: 82: leaked 9961416 bytes.
   at: GLES3::Utilities::~Utilities (drivers\gles3\storage\utilities.cpp:75)

Audio for multi-glasses play

Audio for muli-glasses play in the same application is still a subject that is not really handled yet. Tilt Five doesn't even handle it yet on other officially supported engines. Each pair for glasses is exposed to the OS as an audio device. However, how to correlate these devices with the glasses in game is still an open question.

Can the Godot engine support different simultaneous audio listeners per scene?
Can the output from one listener be multiplexed to different audio outputs?

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.