Lens Sim

Would be nice to be able to 3d print those lenses…LOL
Anyways this is like day and night with this ‘FULL ON’ addon.
I tried to build the same by hand a while ago and it worked but slow as …

Well this is one of the best addons I have seen so far.

Would I say it’s the best …

So big thanks for this addon and your hard work!

1 Like

it had been several hours into Friday. I assumed maybe reasons that you werent going to discount and BM was being less flashy this year with the sale and went ahead and made the purchase. Whoops :slight_smile: its A-OK. Some lessons are paid. Fortunately i didnt add anything from my wishlist to the cart as well. Thanks for setting this page up

@jon.edis
Thanks! Unfortunately I can’t add that feature, It might be possible with multiple ray portal planes stacked in the scene, but that sounds like a bad idea and a hassle to get working :thinking:

@pafurijaz
:smiley: Yeah, it seems complicated at first, but once you get the hang of it it’s not super hard. At the beginning I remember debugging a lens for way too long, just double checking all the numbers and checking for typos. Turns out copy pasting numbers from a .pdf file is not always giving you the correct values back :sweat_smile:

Those materials looks so real!

@Nurb2Kea
Thanks! I might add a feature to convert the lenses to 3D geometry. Maybe 3D printing them wont work in glass though :slight_smile:
Do you know what lens you used there? Seems like the squeeze factor is quite off.

@Jason_Ferguson
That’s unfortunate. I did receive some questions about the release time, but I only got the dates from Blender Market.

1 Like

Does this mean that the lens sim camera can’t be animated? How would I go about doing a dolly shot, or simulating a handheld movement with it?

The Lens Sim camera can be animated.

Nearly all of the parameters can be keyframed, there are some restrictions on enums and toggles, you can for example not animate the chosen lens or the “Disable Lenses” button.

The reason you can’t specifically move the camera closer when zooming or using the scroll wheel when the lens is enabled is because its an orthographic camera.

For a dolly zoom for example, you can set the sensor mode to either “Focal Length” or “Sensor Width”, then keyframe the “Sensor Width”/“Focal Length” value. And of course animate the camera position.

Maybe animating the “Focal Length Add” parameter would be the best way for a dolly zoom, since your not limited by the circle of illumination.

For handheld movement you just animate the camera. Or use Shakify. There is however a bug with shakify, when the lens is disabled you will get a dependency issue. I tried to debug it, but I haven’t found a solution to it, when the lens is enabled it will work as normal.

I dont delete the Lens Sim system when disabling the lens, I only disable the ray portal plane in the render and convert the camera settings. So any animation data is not lost when converting the lens. However, the conversion to the standard camera happens during user input, so it will not update the focal length when playing animations.

Calculating the standard cameras focal length takes some computing time due to compensating for the focal breathing, focus distance and figuring out the focal length based on the size of objects on the sensor. I think it will be quite laggy if that conversion happens per frame, hence why it only triggers on user input.

It should be quite quick to add it as a optional toggle, enabling calculating the conversion pr. frame. So that you don’t have to stay in render mode to see the dolly zoom for example. Do you think that would be a good idea?

1 Like

First of all, thank you for this great addon! Being a real world photographer, I appreciate using the different lenses in Blender. And it works well with K-Cycles :slight_smile:
Only problem I noticed it with the Photographer addon being installed. Then some of the Lens Sim settings are missing, for example Camera, Anamorph, Aperture Shape, etc. They are simply not there. Starting Blender without Phortographer solves the issue. Having had troubles with Photographer before it’s no surprise to me :wink: However, I hoped both addons would work together… maybe you could add something like the camera management Photographer has into Lens Sim? Would love being able to switch between cameras from inside the addon :slight_smile:
Oh, and is there an option to adjust the exposure from insde the addon?

Thanks!
Great that it works with K-Cycles, I think I should add a compatibility list to the sales page when I get time for it.

That’s strange, I wonder what the issue is with the panels are :thinking:

I did actually think about making a camera dropdown list when developing the addon, but priorities when working towards the release took over. I think it would be a nice feature to have.

What would it functionalities be? I guess a simple drop-down menu that sets the camera as active, and at the same time switches the view to look through the camera would be enough? I also don’t want it to be too intrusive to the current layout.

You can not change the exposure in the addon, but it would be super easy to implement. Maybe I can add it to the sensor panel :thinking:

1 Like

Amazing addon, what are some resources you’d recommend for learning more about lenses in general (from an artist perspective)?

I think an exposure slider below the chromatic aberration parameter is better to not have to go trought a lot of panels just for it.
Screenshot_880
Something I like about how the exposure is implemented in this addon is that is directly in the ray portal and not in the compositor or the color management I think is better when you have multiple used slots for differents cameras.

Are there any future plans to implement film emulation?

@standingpad
Thanks!
Hmm, I don’t really know, I have always just googled my way into things :sweat_smile:

@EntityDesigner
Consider it done :sunglasses:
exposure
It should match blenders Color Management → Exposure value.

Great render!

@argentum3d.com
I have thought about this, but I think I should keep the scope of this addon for simulating lenses and the things I can do directly n the render with material shaders. Film emulation should probably be implemented in the compositor, hence why I don’t think it will fit this addon.

2 Likes

Thank you for your feedback!
The most used functions of Photographer for me is selecting cameras and setting the exposure for each camera separately. Maybe an idea for a future update of Len Sim :slight_smile:

“What would it functionalities be? I guess a simple drop-down menu that sets the camera as active, and at the same time switches the view to look through the camera would be enough? I also don’t want it to be too intrusive to the current layout.”
That sounds like a good idea :slight_smile:

“You can not change the exposure in the addon, but it would be super easy to implement. Maybe I can add it to the sensor panel :thinking:
Sounds good! :slight_smile:

1 Like

Hi,

First of all I want to thank the creator of this amazing addon. I’m already using it and I’m super happy with the results I’m getting from it. The addon puts images on another level.

Nevertheless I’d like to share some feedback on what (in my humble opinion) could be improved/clarified.

  1. For camera positioning I’m using First Person View navigation (Shift + ~). This feature doesn’t work because of the Camera constraints.
    image
    image

  2. Anamorphic lenses confusion

Maybe you could enlighten me on the settings?

Let’s say I want an anamorphic format 2.40:1.
Frame size Super 35 (24.89 mm × 18.66 mm, (round up to 24x18)).

  • I set up sensor width to 24 mm
    image
    And I’m already facing some issues.

This is squeezed image, all good:
image

This is unsqueezed image, 4 to 3:
image
All good here, the image has changed only in horizontal direction how it suppose to do.

Next, I need to set up new, unsqueezed aspect ratio of the image (2.40:1), let’s say 1920x800 px.

This is the result, showing the main problem:
image
It crops the image vertically, but the cropping should happen horizontally.

There is a setting that determines in which direction image will be cropped:
image
I can’t control (am I?) in the camera settings in a way so it works with this addon.

This is the result I’m expecting (did manually in Photoshop):
Squeezed 4:3 image
image
Unsqueezed 2.40:1 image:


Anamorphic format should not affect vertical FOV, only horizontal.

  1. It’s not clear on what frame sizes what lenses should be used.

For example, 85mm Canon Serenar on standard settings looks like 50-60 mm lens.

PS: my message is written in a very chaotic way, so please, ask questions in you want me to clarify things.

This from the latest development meeting:

" * Lukas keeps working on the OSL camera. Getting close to the state where public testing will be needed. Feedback thread coming up!"

I was wondering how this might affect the development of the Lens Sim, speculation is encouraged! :wink:

@klknv
Thanks! This is great feedback, your render look really nice btw!

The Lens Sim Setup uses an orthographic camera to work that has to have a scale of 1.0. Pressing Disable Lenses will convert it back to a standard perspective camera that represents the lens as closely as possible(it will also remove the constraint). When disabled, navigation methods like First Person View will function as normal. I think this is the best way to work around the orthographic camera. It’s not perfect, so if you have any suggestions please let me know.
image

I just wanted to address this before the anamorph setup.
I’m not a photographer, so my philosophy around the focal length of each lens is to utilize the largest possible image area for that lens. I also think this addon is created for extra lens artifacts, so having a larger sensor will maximize these effects. Therefore, I’ve set the Best Fit sensor size to the largest usable image area. This is of course not realistic, hence the varying focal lengths you get from each lens compared to the actual mm you see on the name.

I don’t really know what frame sizes each lens should use, so I encourage people to experiment to their likings. And advance users like you can always pick a realistic sensor size to their liking :slight_smile:

I haven’t found a good way to do this, and I think I can explain what the issue here is if you want an exact anamorphic setup. I will probably repeat some of the things you said so that I can make sense of the process.

Blenders camera frame will always be inside this square box, regardless of how the render size or squeeze factor on the blender camera is set to. Setting the Sensor size will determine the size of the actual sensor fitted into this box. So setting a sensor size of 24mm will look like this:

So here comes the problem, if I got it right you want to render with the correct pixel squeeze and at the same time see it normally in the viewport.

We start with the expected result:
With a 2.40:1 ratio and 1920x800 pixel size as the final result we should divide 1920 / 2.40 to get the raw sensor pixel size: 800x800. By not desqueezing the image we get the exact result we want in the render. The sensor size matches and if unsqueezed by 2.4 we get the wanted result.
image

Now the setup:
To get the correct unsqueezed results in the viewport, but the correct squeezed result in the render. This is what we can do: We have to unsqueeze the image and multiply the Sensor Width by 2.40 to get the correct unsequenced image width inside our image square. Then we set the render pixel aspect to 2.40 so that the height is compensated and the wanted rendered image is being shown in the viewport and rendered correctly.

Did that make sense? I think there is room for improvement here in terms of having some extra buttons or sliders to make the conversion easier to set up.

The built in anamorphs lenses are also varying the squeeze factor to compensate for the focus breathing. With this setup you probably want to override the squeeze factor and and do the desqueezing yourself in comp.

I haven’t thought about a good way to do this, so feel free to let me know what you think :slight_smile:

I wish we could have individual camera render resolution so that we don’t need to override the whole scene for a setup like this.

1 Like

This will definitely affect the development, but I don’t think it will be in a negative way necessarily, unless they can replace my setup completely and make it so that the benefits of using Lens Sim is gone.

I was able to render lenses within 1-3 weeks of development, but polishing it and making it easy to use is what takes time with a system like this I think. But I was also doing it in my spare time, so that takes much longer what Lukas is doing. Wonder how long it going to take him to get this setup in a finalized state :thinking:

Will be interesting to see how far they will push the development, and if they will solve for varying aperture sizes, squeeze factor, focusing, aspheric lenses, zoom lenses, chromatic aberration etc.

I think it will be a good idea to make a lens converter once they have a robust set-up going, so that the work people do will be transferable.

2 Likes

Thank you for your time answering my questions. Much appreciated.

Regarding the anamorphic format: you got me right! (almost) And your answer covers more than I expected to hear.

Only one thing is a bit different; I wanted to have properly scaled final render.

I did some tests and found a solution for 2x anamorphic lenses, which is something that you mentioned in your answer as well: I just scaled sensor width (frame width) by 2 (48 mm instead of 24 mm) and got proper result. That way I won’t lose horizontal resolution while unsqueezing it.

Some test stills (animations is underway):


45mm f2.8 Tale78 Nikon AI Nikkor
(Wanderer, designed and created by Daniel Bystedt. CC BY-SA license)


59mm f2.0 Helios-44, 2x Anamorph Adapter


59mm f2.0 Helios-44, 2x Anamorph Adapter

Graded in Resolve. Linear-ACES workflow.

2 Likes