Wish: improved Match perspective projection tool

Big wish for significant improvement of Match perspective projection tool with camera lens distortion analyzer.

Match perspective that works in this direction:

Another example: http://www.youtube.com/watch?v=rswNzZoVLh8
Camera lens distortion analyzer info: http://www.spot3d.com/vray/help/200R1/tools_lens.htm#use_vrlens

Is it realistic to ask for V6? Thanks!

1 Like

I found a script by Andrei Kletskov for 3ds max that may help for developing, don’t know,
here’s the link: http://andklv2.narod.ru/maxscripts/111_cameraMatch_v0.4.ms
Here’s a Python script by Per Gantelius for Blender: https://github.com/downloads/stuffmatic/blam/blam_0.4.zip
I hope it will help developers.

Thanks violine for your suggestions on improving this command. I’ll add this thread now as a feature request for this command.

1 Like

Many thanks Brian, Rhino progress is unstoppable:)

This is also a good example:

Cinema 4D camera match example:

This video match example is just amazing:

I have no experience in scripting, is it possible to script this kind of improvement in Rhino currently (to match Sketchup example level)?

Hi everyone,
this is probably the best example which shows functionality of this tool in SketchUp:

I think perspective match in Rhino works relatively well, if you have an appropriate photo and reference model.

After using lens corrected images, I don’t think, lens correction should be an integral part of the perspective match command. There are several tools around that do a decent job at that. The main problem is to actually keep the reference database for lenses and cameras up to date. This is a job, McNeel should stay away from.

Still there are ways to improve Rhino’s perspective matching:
Image resolution depends on the video card capabilities and current viewport size. So even if I have a 5k image of my reference, I am limited to the downscaled displayed image. The images are sized to fit the viewport, which limits the usable image resolution even more as photos are generally shot in about 4:3 and monitors nowadays display in 16:9 aspect ratio.

SketchUp and C4D provide tools to zoom in or magnify the areas where you pick your photo reference point. Rhino could use something similar to more accurately pick image references. The most flexible way seems to be SketchUp’s zooming and panning into the actual camera picture.

With Rhino, you can easily build a quick reference volume and snap to relevant points. So if your measurements were correct and the photo quality is good, your match will be good. If you don’t have reference measurements, it’s basically impossible to find a match. C4D and SketchUp use a set of parallel lines with perspective distortion. So you just don’t need any exact measurement to get started. And handling the ends of four lines is probably way more intuitive than picking a few seemingly unrelated points.
At the very least, you should be able to readjust the image reference points after or during the match. Right now you will just have to pick them all again, hoping to get a better result.
A preview of the matching result would be nice too.

That said, it’s pretty easy and fast to find a perspective match manually. You can easily read the lens length from the EXIF data of your (properly lens distortion fixed) photo and use that to adjust the viewport lens. Then roughly adjust the position and size of your model. Use the keys to manipulate the viewport with really small increments and scale factors. You will probably have to fine tune the automatic fit anyway…

1 Like

I have wished for this before, and will again:
The need to keep both height AND width of the render view visible in the perspective view.

Rhino now only focuses on the height, and ignores the width, so the “safe frame” will be clipped, this is also a big issue with perspective matching, where either going from one machine to an other, or adding a toolbar, or altering the layouts, or going from full screen to normal 4 view, or even moving Rhino to a smaller monitor, will cause issues.


Perspective match:

Altering the views messes this up.
Notice how the selected “building” no longer matches the wallpaper:


Off topic: regjeringskvartalet?

Hi wim, we are working on a street, and I just tested out the perspective match as it had not tried it for many years.
(Still no good for this kind of use, I do it faster manually, but it reminded me of the issue, so I took the time to make post)

Well, the current command is highly unreliable, and to my knowledge users do not use it in their work precisely because of this, furthermore in videotutorials about perspective match this command is avoided. The conclusion is that this command should be improved and there are many examples in which direction to go. Thanks to everyone for constructive ideas.

I wouldn’t expect any sort of automatic perspective match to work reliably in your example. You get very short, basically parallel lines there. Just a single pixel difference means a world for the result here.

I agree to a certain point here. Since you need to have a pretty exact model to fit for your photo, the margin for errors can grow a lot. And then, as I said, the control and precision over picking reference points on the image needs a lot of improvement. Still, if you have well defined geometry and a matching photo, I find the results to be surprisingly consistent and good. Considering you just need to match 6 measured points instead of finding two sets of parallel lines, on faces that happen to be orthogonal, as in SketchUp…

Do you have any examples, where you would think PerspectiveMatch should work, but it miserably fails?

You “just” need to take accurate measures of entire building and just for that spend infinitely more time, not knowing whether it would actually work(spending additional time to manually adjust the scene when you give up trying using it because you have no more time to waste)

Well, you have to make sacrifices somewhere.

So for planning on a site, you generally have a site plan. In an ideal case, the terrain is reasonably flat and you instantly have 4 points on the ground. If not, you should have at least the four corners of your site surveyed. That means you need the position and height of two additional points in order to match the picture.

If you are trying to recreate an existing object, you probably have reasonably exact measurements of at least 6 different points in space relative to each other. How else would you build anything close to reality?

Let’s say, you 're looking at a corner of a building and have a site plan. All you need a single reference height measurement in order to construct a reference for a SketchUp like configuration of parallel lines. …and you would need that measure for SketchUp too, if you were modelling in real world units.

SketchUp goes a different route with it’s parallel lines in a 90° configuration. You can ignore the site plan for the assumption of 90° corners. And you can skip the second height measurement if you assume level features on the façade. Just try to fit a building that doesn’t have a 90° corner or a horizontal façade structure. I tried and got frustrated really fast, because you can never have an exact match in this case.

If you don’t have any height measurement but just a site plan, Rhino cannot solve the perspective. It could, if you were able to provide the focal length. That’s probably the way FormZ works. Here’s another spot for improvement apart from the precision issues mention earlier…

What I’m saying is: crap in - crap out. If your object doesn’t match the scene, you will not find a match whatever tools you use. If you have six points with no more than 4 in the same plane, the fit will work. If you don’t trust me, just generate a random object, capture the viewport and try to match the perspective again. Experiment with distorting the objet a bit, get a feel for the tolerences.

Here we talk about improving this command that is currently avoided by the users, not about accepting the current condition as is. There is no ideal case in real life and with Sketchup and other photo match tools is enough to know 1 dimension on the building to scale your model when you’re done. Buildings and houses with an angle other than 90° are rare and do not represent the general average.

I’m not advertising to accept the current conditions. I think I described several points of where and how the current way can be improved in functionality as well as intuitiveness.

Still I am a firm believer in knowing the intent and limits of your tools. Surely you agree, Rhino is not in the first place a photo modeler, while SketchUp was specifically made as a tool to quickly create a 3d model from a street view image. So in my option, perspective matching in rhino is more of a tool for visualizing an already created model in a real world context. Still, with only a few additional measures, it can be used to model from photo reference.

If people avoid a certain tool, there may be several reasons. Often, the tool is not perfect, not intuitive or just lacks documentation. But more often than not, I just find people complaining about the hammer because it’s so hard to drive a screw with…

Concerning SketchUp and right angle, that depends on where you’re from and what kind of projects you are doing. In my experience, rectangular grid city blocks are more of an exception than a rule in European cities. I guess that’s different in the U.S.

Thank you for any advice that goes towards improving this tool. I currently, as many can’t use this tool because of its unreliability. I hope that the experienced development team will find the proper way to improve this 12 years old? tool so it can be used in the daily workflow, furthermore, to publish some interesting tutorials, examples etc. Thank you!