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

Image mosaicing and back-face culling #1882

Open
os-gabe opened this issue Jun 30, 2020 · 2 comments
Open

Image mosaicing and back-face culling #1882

os-gabe opened this issue Jun 30, 2020 · 2 comments

Comments

@os-gabe
Copy link
Contributor

os-gabe commented Jun 30, 2020

I am attempting to put together a bunch of reprojected images to form sort of a dollhouse view of a structure. At the moment I am just using one ImageVisual for each image and applying a MatrixTransform to give it the correct pose and scale. This is, of course, quite slow since I am using > 100 individual ImageVisuals.

I was hoping for some advise on what direction I might go in to solve this problem. I think this is typically done by using a mesh and providing face textures but I wasn't sure if VisPy supported this.

The other thing I want to do is something like back-face culling such that images are only visible from the "front". So if you move the camera around to the back the image is transparent.

@djhoese
Copy link
Member

djhoese commented Jun 30, 2020

I've done something almost similar with a custom version of the ImageVisual. In my case I was showing a large image but only storing "sub-tiles" of the image in a Texture object. This involves defining vertex coordinates and texture coordinates for each sub-image and passing those to the GPU. You can see a simplified version of this in the ImageVisual when you tell it to subdivide your image in the methods that compute the coordinates.

I'm not sure how the culling would behave in these cases so maybe try one thing at a time?

@os-gabe
Copy link
Contributor Author

os-gabe commented Jul 1, 2020

Thanks @djhoese, this is helpful! I'll check that out. This wound up being deprioritized though so I may not be able to do so for a while. Will follow up here or PR if I find anything generally useful.

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