Hi, does anyone know of a way of influencing the viewport camera?
What I mean is, stretching the view- like changing the Aspect ratio…
Its a great way of finding imperfections in a model-
I actually know this feature from HIgh end nurbs Modellers like Alias and Icem…
its a little trick, but really helps a lot when working.
in the images i used a lattice rig to mimik the effect, but it should actually be an Camera effect in the viewport CAmera.
Any thoughts? Is this possible in Blender?
No it’s not possible as far as I know, the viewport is not a “real” camera like in Maya. You can set up a simple compositing nodetree that stretches your render though, and have it display in the renderview. You’ll have to launch a render to see it though.
Wow, we’re on the same page!
I posted a feature request some hours ago and saw your question just now.
Here’s the thread I created in rightclickselect: https://blender.community/c/rightclickselect/k7gbbc/
I hope that this topic gains more attention, since blender is heavily used for modeling purposes.
I did some tests. I turns out that its not so easy, as I imagined. If you want to distort the view you’ll also get distorted pixels (take a screenshot and stretch it in Krita for example)
Clearly that’s not practical at all.
What do we need is not distorted pixels, but distorted coordinates of all objects in the scene. Much like the the result of squashed model you showed above.
So it turns out that we don’t want to preview the aspect of the camera, but rather to apply something like a “global view based modifier for non proportional scaling”
For your example, keeping ortho view, you can just rotate the view horizontally
I imagine you could also take the reciprocal, and distort your model instead. As far as I unnderstand you’re just scaling it on a single axis ?
Yes- for the example i did it with an Lattice rig, which can be toggled on and of in the modifier stack-
it kind of works- but I dont like having to handle the lattice as an additional object, and its way to much work to use this approach if you have several objects… just not elegant and simple-
as for example Alias does it… you define the amount of stretch with mouse draging, and also you can toggle between both, distorted and undistorted view- very handy and very simple to use…
This is a bit more work but you can make it almost like you describe : for instance use an object (movable on a single axis, with limits) to drive the lattice stretch, and a property on that same object to toggle the lattice modifier. You’d still have to have the same lattice modifier on all objects… fortunately that can be copied easily.
It’s surprising that the viewport doesn’t use “real” cameras.
Why using lattices? why not parenting everything to an empty and scale it as needed? once you’ve done you just delete the empty and everything gets back at its right size
Is not that Viewport doesn’t try to simulate a “real” camera. It does, but we’re talking about cameras from the 90’s. (3DS max R2-R4 at the time).
Of course cameras in the XXI century are more complicated than that, but it seems nowadays no developer is aware or such beasts… neither in the BF, not outside of the foundation… Maybe has something to do with the fact that most professional cameras are expensive and outside the realm of what a developer can access to, maybe doing changes for the camera in the viewport can affect other Blender areas (VFX editing and Tracking module), or maybe no dev in the OSS world has the required knowledge to tacke what apparently looks to be a simple task. (Maybe asking nicely to the Viewport devs could be a good idea, but their plates are kinda full with that vulkan thing ).
But probably a non-uniform scale modifier (so it won’t be destructive) can be a good workaround for the problem. Time for upvoting that RSClick suggestion, i think.
i think the idea of a modifier for the camera could be really good- would be so awsome…
have absolutly no idea how much work it would be for he developers to implement…
so i guess we can not rely on them.
Hadriscus, can you set up a blendfile with your idea and share?
i have no idea how to set itup myself
is there a way to reuse a modifier stack-(like a nodegroup) an maybe use it on the content of a collection or something like that?
Right now no. It’s coming with geometry nodes but is still months away (years?).
I won’t be able to make up an example file as I’m moving across the world right now, but maybe somebody else here will, it’s quite simple.
@lsscpp yes lattice would only provide ability to stretch different parts of the model different amounts, but parenting and scaling is the simpler solution (and less computationally intensive)
There’s an addon called something like “camera-lattice” or Screenspace-lattice that should help.
Also @rendetto was almost right. Instead of stretching x after the render, stretch the pixels-ratio y for the render. You find its values as “Aspect” just below the “Resolution” in “Properties>Output Properties>Dimensions”. So if you want to squash the x-axis of the camera until it is half as wide, render with the Aspects x-value set to 2. The render produced will display with undistorted pixels. Keep in mind that the lowest a value can be here is 1, so if you want to enter x=0.2 enter x=1 and y=5 instead.