I am trying to find an addon/solution for mapping image textures to 3d objects to recreate the space as seen in a photograph.
I had been working on this problem in openframeworks by creating planes within a scene, but they never had textures applied to them. I also had some difficulty with the depth of the various planes, since the image was being drawn and then the 3d space created overtop.
I switched to Unity to rework this project, mostly because of the shadows and such, but I discovered how easy it was to work on these kinds of spatial recreations by using a virtual projector tied to a static camera.
You can see an image here, where the lower part is the the view from the camera, and the upper part is how that 3d space has been recreated to fit the image, with textures on the various objects.
I have tried searching for addons/solutions, but most seem to imply projection mapping, which this kind of is, but my result is never meant to be used in the real world. I would ‘like’ to use openframeworks, since the earlier projects compile well on the raspberry pi (images will be displayed on multiple monitors, and pi’s are cheaper than multiple laptops/computers).
Even with the ease of using shadows, reflections and collisions in unity, there is less ability to do deeper things in unity like have vines linking the objects and objects adhering to surfaces.
I was thinking using the image coordinates, normalized, to find the vertices of the object/plane created would allow for proper mapping, at least for rectangular items and surfaces facing the image origin (projector?) My earlier attempts in openframeworks saved the coordinates of a planes vertices in an xml file, but they never had an texture applied to them. In more complicated images the depth of the scene could become quite compressed and that created it’s own complications. For example, a distant narrow pillar would be the same, visually, as a close wide pillar, since neither was tied to the image.
Let me know if I am not using the proper terminology, which may have affected my search results.