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

Equirectangular sketch #129

Open
JuanIrache opened this issue Jun 10, 2021 · 2 comments
Open

Equirectangular sketch #129

JuanIrache opened this issue Jun 10, 2021 · 2 comments

Comments

@JuanIrache
Copy link

Hi, thanks for the super interesting library.

This is not a bug or feature request, rather a question that relates to this library tangentially. So I appreciate any pointers you may have, but feel free to close this if you don't.

I'm trying to draw p5 elements on top of a canvas that has a VR (equirectangular) image as a background. I'm not sure if your library has explored how p5 shapes have to be transformed when projected in a 360 space, or if this is handled separately by some other module. Of course if I use the standard p5 methods, shapes look fine on screen but are warped when viewed in VR. Would you know where I can find information on the topic? Is this a problem you have faced?

Really appreciated.

@stalgiag
Copy link
Owner

Hi! If I understand correctly you have an equirectangular image that you are using for a background and you are drawing p5 elements on top of it. The image itself is likely already warped for equirectangular perspective but the p5 elements are not so there is disonnance in their relative perspectives. Is this correct?

If so would it be possible to use the equirectangular texture as the background while drawing the p5 elements on a second layer as graphics object textures on a quad or plane? This way the perspective of the geometry will be applied to the rendering of the p5 elements.

This is definitely not my domain but definitely will experiment with it as I work on this library this summer.

@JuanIrache
Copy link
Author

Yes. That's it.

I have thought about rendering each element to a hidden graphics, applying any geometric transformations there (I don't know how to do this step, maybe with a separate library?) and then drawing the result to the main canvas.

I don't understand how you intend to apply the geometric perspective to the rendering of the elements, but if you think there's a way, great!

Thanks

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

No branches or pull requests

2 participants