Hi folks,
I originally posted this in the SketchUp Discussions, but at Gaieus' suggestion, I'm copying it over here in the Ruby thread-group.
I've been thinking about a problem for a while -- if I had a generic solution there are several placed I could apply it.
The issue is using PhotoMatch with photos that just do not have enough straight lines or maybe no lines that can be counted on to be vertical or level. Like making a SketchUp model of the Mystery House at Knott's Berry Farm, or The Santa Cruz Mystery Spot -- or worse, trying to form terrain from photographs.
I assume it would require there to be lots and lots of common points in the photographs that you can match up. But just points, probably not many lines, horizontal or not. Very much the kind of thing that the standard PhotoMatch perspective tools are really bad at.
What I keep coming back to is being able to pick the same point in two or 3 photos and construct lines through the photo image to the camera. The actual 3D point has to lie on that ray from the camera center through the point in the PhotoMatch image, out to infinity. Two or three photos let you find the intersection of the rays.
To play with how the geometry of this works out, to start getting a handle on what the rules of this game have to be, it would be nice to be able to place a PhotoMatch image into a model as a photo texture on a surface, oriented perpendicular to the line to camera for that PM scene. And then, from the viewpoint of that scene, pick a point in the image and run a ruby script that would construct the ray from the camera through that image point.
So has anyone created a script like that, to generate a ray from the camera through a point chosen on a surface or simply through the cursor position?
If no one has done it yet, I'd be willing to hack at it, if someone could toss out hints of what objects and methods would have to be used.
Thanks for any suggestions,
August