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

Update the passthrough documentation to reflect the changes in Godot 4.3 #9311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BastiaanOlij
Copy link
Contributor

We had some major changes in the way we handle AR and passthrough in Godot 4.3, this PR updates the documentation to reflect this.

The page has also been changes from an OpenXR centric page to more core focussed documentation. I don't know if there is a way once this becomes stable that it redirect the old page to the new?

@BastiaanOlij BastiaanOlij added enhancement topic:xr Related to XR documentation area:manual Issues and PRs related to the Manual/Tutorials section of the documentation labels May 2, 2024
@BastiaanOlij BastiaanOlij added this to the 4.3 milestone May 2, 2024
@BastiaanOlij BastiaanOlij marked this pull request as draft May 2, 2024 04:01
@BastiaanOlij
Copy link
Contributor Author

BastiaanOlij commented May 2, 2024

Marked it as draft as I want to add one more chapter around "hole punching", but got an arrand to run first :)

Ok added the chapter

@BastiaanOlij BastiaanOlij marked this pull request as ready for review May 2, 2024 06:28
@BastiaanOlij
Copy link
Contributor Author

@DanielSnd any chance you have a screengrab of your AR project we can use to show the use of shadow to opacity?

@BastiaanOlij BastiaanOlij force-pushed the update_ar_passthrough branch 2 times, most recently from 38f164c to b6071aa Compare May 2, 2024 06:32
Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add a redirect from openxr_passthrough to ar_passthrough

tutorials/xr/ar_passthrough.rst Outdated Show resolved Hide resolved
tutorials/xr/ar_passthrough.rst Outdated Show resolved Hide resolved
@DanielSnd
Copy link

@DanielSnd any chance you have a screengrab of your AR project we can use to show the use of shadow to opacity?

I can take one with a "on/off" comparison.

@BastiaanOlij
Copy link
Contributor Author

We should probably add a redirect from openxr_passthrough to ar_passthrough

Yup, but I didn't know how to do that so some advise here is welcome :)

@BastiaanOlij
Copy link
Contributor Author

BastiaanOlij commented May 3, 2024

Still todo before this can be merged:

  • add redirect
  • add image for shadow to opacity

@DanielSnd
Copy link

  • add image for shadow to opacity

ScreenshotHolePunch3_1 1 1
ScreenshotHolePunch1_1 1 3
ScreenshotHolePunch2_1 1 2

Took a few screenshots today, are those good? I can try taking it differently if you have something specific in mind.

@BastiaanOlij
Copy link
Contributor Author

Thanks @DanielSnd , I added the middle one in. The hand is really cool but I think its harder to see what is going on. Just with the desk in front of the pitstop while there are some aliens standing on the desks... Shame we didn't have shadows working properly yet :)

@BastiaanOlij BastiaanOlij force-pushed the update_ar_passthrough branch 3 times, most recently from 8c3da9e to f4741bb Compare May 6, 2024 06:05
@BastiaanOlij
Copy link
Contributor Author

Ok, also added the redirect, I don't know if I did this right or how to test it, but it's in there :)

tutorials/xr/ar_passthrough.rst Outdated Show resolved Hide resolved
Comment on lines 46 to 52
- The rendered image is added to the real world. This mode generally applies to AR only devices
such as the Hololens where the optics are not able to obscure the real world.
This will turn on passthrough if passthrough is used.
* - XR_ENV_BLEND_MODE_ALPHA_BLEND
- The rendered image is alpha blended with the real world.
This is supported on devices that can fully obscure the real world
and generally the preferred way to do AR.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on my comment about terminology confusion, the use of AR only devices and AR throughout can get confusing to developers new with the apis, capabilities.

My suggestion would be that we use the terms see-through devices to refer to devices like Magic Leap, Hololens, and video passthrough devices to refer to devices like Quest, HTC Elite; unless OpenXR has another term for how to refer to either types of devices.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree on the two term, I'll see what I can write better to make good use of those terms.

On a whole though it is important to note that this part of the documentations main goal is to create a foundation where it shouldn't matter whether AR is created with see-through devices or video passthrough devices, so that if you stick to this guide you create an application that works on any AR device.

The moment you start looking at APIs that only work on a subset of devices, or often just work for one vendor, that has to be a conscious choice on the developer. "Is using this feature worth tying myself into this eco system".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, rewrote part of this section, let me know if you agree with the changes.

Comment on lines 51 to 52
This is supported on devices that can fully obscure the real world
and generally the preferred way to do AR.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence is a bit confusing; the first section states This is supported on devices that can fully obscure the real world leading to the assumption it's only supported on video-passthrough devices.
But the second section asserts this is generally the preferred way to do AR, leading to the assumption it can be used on both types of devices.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is an assumption on your part, there are see-through devices that can fully obscure the real world.

Comment on lines 66 to 67
It is advisable to do the same with ``XR_ENV_BLEND_MODE_ADDITIVE`` however here you
can alternatively set your background color to black.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to assume that XR_ENV_BLEND_MODE_ADDITIVE is only used on see-through devices (otherwise setting the background color to black would hide the real world on video-passthrough devices) but we don't mention it so in the section above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additive will add the color, and as with black you are adding zeros to whatever is underneath, you'll just see the real world. So if this is implemented properly on video passthrough, you should still see the background, it should not turn the background black.
Alpha in this case is ignored and in there lies a minor danger if you're relying on alpha as colors will actually be brighter than you expect.

Actually thinking about this now, I think I should say exactly that here and just recommend the user sets the background to black, and leave it there.

In reality, a device reporting whether it supports additive, or alpha, or both, is what informs you about the limitation of the AR technology being used and whether you as a developer want to do something with that (in many cases you don't and just accept the limitation).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, changed this, let me know what you think.

Comment on lines +75 to +81
Some AR SDKs do provide ambient lighting information or even provide a full radiance
map to allow for real world reflections in your virtual objects.
The core Godot XR functionality doesn't currently have support for this, however this
functionality can be exposed through plugins.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note sure if this is relevant to this documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As more and more vendors are working on this, and it is a question I've been asked a few times, I think it is handy to have a reference to this. But maybe it's overkill :)

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some grammar suggestions

tutorials/xr/ar_passthrough.rst Outdated Show resolved Hide resolved
tutorials/xr/ar_passthrough.rst Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:xr Related to XR documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants