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

Relax the assumption that the user's position is fixed #2

Open
halileohalilei opened this issue Dec 21, 2017 · 2 comments
Open

Relax the assumption that the user's position is fixed #2

halileohalilei opened this issue Dec 21, 2017 · 2 comments
Assignees

Comments

@halileohalilei
Copy link

halileohalilei commented Dec 21, 2017

Determine an outer radius, which encloses the environment of the user, and an inner radius in which the user can move. Handle the viewport projections accordingly.

@ghoshaw
Copy link

ghoshaw commented Dec 17, 2018

Hi, halileohalilei:
How did you relax the assumption that the user's position is fixed? I am new to swift and ARkit, I did not find the code related. In 'private func setupCoordinateConversionTexture()' in ARKitEnvironmentMapper.swift, this line 'let x = UInt8(((sin(theta) * cos(phi) + 1.0) / 2.0) * 255)' means? why * 255?
It would be great if you can explain your whole method in detail. Thanks!

@halileohalilei
Copy link
Author

Hey @ghoshaw, I haven't had time to handle this issue, so the assumption is still there. I had a couple of ideas to resolve this. I was planning on either 1) storing multiple environment maps so that the user could switch between the maps if they moved farther from the initial position, or 2) assume that the user is inside a fixed size room and adjust the size of camera feed on the resulting environment map texture, or 3) use both.

I multiply the value by 255 to map a floating point value between 0 and 1 to an integer value between 0 and 255, which is the range of a UInt8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants