{REQ} lens shift image exporter
-
If this is hard to follow I apologize and will try to clarify as needed.
Some Architecture and photography people here may be familiar with the concept of a shift lens; basically a lens with an oversize image circle, allowing the photographer to place the film or image sensor in a specific part of the image circle.
This has a few practical applications; primarily to allow photographers to shoot with a level camera (keeping building verticals straight), while still framing above the horizon. See this link, and scroll down to "The Rising and Falling Front":
http://www.luminous-landscape.com/reviews/lenses/nikon_24_pc.shtml
Vray for sketchup simulates this effect through the "lens shift" control in the physical camera settings, but I find I don't make use of it because I almost always work on my renderings in photoshop, and part of that involves overlaying the renderings with sketchup hidden line output, which then doesn't line up with the render if I use the shift settings in Vray.
So I'd just like to chime in and say I would love to see a plugin that allows me get 'shifted' 2D output straight from sketchup that will overlay accurately with 'shifted' Vray output. If it can copy the shift/image size/ field of view settings from Vray, even better.
Thom - maybe the next addition to vray tools? (which I love)
Thanks for reading,
C. -
Don't believe that functionality is available in SketchUp...
-
@thomthom said:
Don't believe that functionality is available in SketchUp...
hmmm. was wondering how limiting the SU camera controls were.
Here's an idea:
Since this pretty much the same as rendering out a larger image (larger both in FOV and pixels) and then cropping it down to the FOV/ pixel dimensions of the vray camera settings, I'm wondering if it's possible to do some math on the vray camera settings and then script setting up a viewport / 2d export for that equivalent larger image. Provided that doesn't wind up with Sketchup trying to save out a ridiculously large image (it shouldn't, unless the vray settings are already pretty huge), the only thing left would be the appropriate cropping.
is it possible to rubyscript cropping an image after it's been exported? If not that isn't too hard to just do in photoshop.
I'll do some testing this weekend and see if I can describe the necessary math for figuring out that larger image.
-
Sketchup's native 2-point perspective is basically the same result as shift lens functions in many cases.
Best,
Jason -
@jason_maranto said:
Sketchup's native 2-point perspective is basically the same result as shift lens functions in many cases.
Best,
Jasonmaybe for some uses, but Vray doesn't render 2 point perspectives with the physical camera on - set one up, frame things above the horizon, and hit render. In the rendering things are framed with the horizon in the center.
Also - generally with a shift lens on an actual camera you don't want to make the verticals perfectly vertical - a very slight tilt reads more natural, so in practice you only correct MOST of the convergence with the shift functionality. Using 2pt perspective would eliminate that as a strategy.
-
I've been playing with this a little. Might be more complicated than I thought.
The real problem is that "lens shift" in Vray doesn't work like a shift lens in real life - which in my opinion is silly.
With a shift lens in real life, you keep the camera mostly level and shift the lens up to frame the subject.
with "lens shift" in Vray, you TILT the camera up to frame the subject, and then the "lens shift" value seems to have the effect of both tilting down and then shifting up to replicate the original tilted framing. I suppose that's easier for most people to understand, but it does make syncing output more of a puzzle.
Does anyone know what the "lens shift" value actually represents? Inches? percent?
If I knew exactly what that value did to the camera, it might be possible to translate it to an equivalent, near-level camera setting and resolution for SU output.
-
did any one found a solution for this problem yet...
i was thinking about a line procedural render, but getting just the outlines is a bit hard perhaps -
Well, where does the problem really lie? In SketchUp or in V-Ray? Sketchup has rudimentary shift capability with the 2 pt perspective. It would be cool if we could do more, but it is not possible through the ruby camera methods. It might be possible through a convoluted process of cutting up the model and warping it all, which would then only be accurate from one camera location, and it would destroy the model.
Or is it a V-Ray issue, do they just need to offer more useful controls?
Or is it really both softwares need to update their capabilities?
Chris
-
Well, It looks to me like the Vray folks made a decision about how the "lens shift" value works that makes it easier for most folks to understand and frame shots from the sketchup viewport.
That's perfectly understandable, even if it seems completely daft (not to mention horridly imprecise) to someone who knows and expects the usual functionality of lens shift on an actual camera.
I believe that if we knew exactly what the vray "lens shift" value was doing to the camera, it is probably possible to work backwards to produce the appropriate sketchup output, more specifically one that could be cropped to match.
...and I'm off to the vray forums to ask about that value.
Edit: as for what I'd like to see, I think there's multiple ways to get there, from either ASGVis or google. Easiest would be a "shift only" option for lens shift in Vray, which would not distort things as the value currently does and the value would then work like a real shift lens.
-
@manamana said:
...and I'm off to the vray forums to ask about that value.
Edit: as for what I'd like to see, I think there's multiple ways to get there, from either ASGVis or google. Easiest would be a "shift only" option for lens shift in Vray, which would not distort things as the value currently does and the value would then work like a real shift lens.
Remember that it's not ASGVis that makes V-Ray. ChaosGroup are the ones that develop V-Ray. ASGVis just makes the plugins that bridge V-Ray and SketchUp/Rhino.
-
Ah. Always wondered what that relationship was - Thanks.
I dug around the chaosgroup forums and found a few folks asking the same questions, also with no answers. How the hell does no one have a clue what that value does? But it also looks like the 3dsMax users have a Vray "film shift" which does pretty much what I'd like it to. Maybe it's just a matter of waiting for that to be implemented.
-
Yea, the ASGVis guys have trouble some time finding proper description of all the features they expose via their bridging plugins.
-
Definitely sounds like a Vray issue, or maybe a Vray plugin issue to me. I'm very limited in my vray knowledge and event then only through 3ds max, not SU, however I can describe how Maxwell does it which works quite well.
1st, Maxwell had shift/tilt capability that matches a real camera, unlike what you're describing with Vray I believe.
2nd, the plugin can pretty much match any SU camera (it couldn't always do this but with newer version of the renderer and a new plugin developer it's improved a lot). So it can do both parallel projection renderings and 2point perspective renderings. The later will adjust the camera appropriately, giving the correct amount of tilt/shift to match the SU camera (supposedly there's a limit to this but it must be pretty extreme as I've never encountered issues).
3rd, there are also tilt/shift values you can input. It won't change the SU camera, but will interpret those values upon export. Presumably, that would be the best method for achieving the 'almost' vertical lines you mentioned earlier.
-Brodie
-
Really something that is missing for exterior architecture.
I cant understand the interest of Lens shift in VFSU when it behaves the way it does. I cant even admit theres no workaround to do what we are after...it is a so obvious tool!
Advertisement