-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
base: master
Are you sure you want to change the base?
Update the passthrough documentation to reflect the changes in Godot 4.3 #9311
Conversation
Ok added the chapter |
ab56dc0
to
c97281c
Compare
@DanielSnd any chance you have a screengrab of your AR project we can use to show the use of shadow to opacity? |
38f164c
to
b6071aa
Compare
There was a problem hiding this 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
I can take one with a "on/off" comparison. |
Yup, but I didn't know how to do that so some advise here is welcome :) |
b6071aa
to
5152822
Compare
Still todo before this can be merged:
|
5152822
to
a68d8de
Compare
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 :) |
8c3da9e
to
f4741bb
Compare
Ok, also added the redirect, I don't know if I did this right or how to test it, but it's in there :) |
f4741bb
to
91294f7
Compare
tutorials/xr/ar_passthrough.rst
Outdated
- 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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.
tutorials/xr/ar_passthrough.rst
Outdated
This is supported on devices that can fully obscure the real world | ||
and generally the preferred way to do AR. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
tutorials/xr/ar_passthrough.rst
Outdated
It is advisable to do the same with ``XR_ENV_BLEND_MODE_ADDITIVE`` however here you | ||
can alternatively set your background color to black. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
There was a problem hiding this 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
91294f7
to
17f7f17
Compare
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?