Achieving True Photorealism With Lens Simulation
HTML-код
- Опубликовано: 1 июн 2024
- Follow me!
/ zircron45
Sorry I couldn't get the psd rights :(
Chapters:
(00:00:00):Introduction
(00:00:36):Sourcing a patent
(00:08:39):Finding IOR information
(00:13:27):Beginning lens modelling
(00:25:49):Finishing lens modelling
(00:28:21):Fixing normals on lenses
(00:33:36):Making camera sensor
(00:36:10):Applying IOR info to modeled lens
(00:40:53):Focus chart (I couldn't get the rights for the psd)
(00:44:49):Technical details
(00:52:13):Focusing in the scene
(00:55:34):Simulated tilt shift!!!
This video has been in the makings for an embarrassing amount of time. Long enough to where my voice has deepened since recording this... Oops!
Huge shoutout to all the people who encouraged me to start this process, including the people who posted what they learned online.
blenderartists.org/t/virtual-...
• Jeremy Cox @ SuperMeet...
Shoutout to @Fibly for the thumbnail design - Кино
www.dpreview.com/forums/post/65906028
Here is the forum post including the patents!
Copy and paste it into your search bar since youtube doesn't allow link's in comments on mobile anymore.
will there be a follow up video where you show how to fucked the lenses up for some lenseflare or more grundgy effects? great video btw, was trying this in the past, but you are more scientifically minded than me
This looks like a perfect job for a script that takes lens specs as an input and produces an object with all geometry and materials set up. And you only need to do it once to be able to make any lens.
100%. There are folks who could make this in geo nodes
@@jamesc5801 Hmm... I need an excuse to noodle around in blender... and geo nodes is something I've wanted to play with so .. I'll give it a shot, don't expect much though I'm the noob of noobs.
@@jamesc5801 Alaskan FX and I are working on that right now!
@@zircron45 could y’all make it an easy to follow tutorial with no paid Add-ons if you get it to work? Because if so you’ll have my sub 100%
Following from Zircon: And it’s going very well
as a full time photographer for the past 10 years that recently started with blender... I am in heaven
I work as a cameraman, when I first started to mess with different lights in my scene in Blender and imagined all the pain and money I'd have to go through, to get similiar results in real life, I felt pure joy!
As an old cinematographer, I always wondered if you could simulate physically accurate real lenses with a 'normal' 3d application, but I've always been too lazy to try it out for myself. Thank you for sparing me the work! The result is jaw dropping, really out of this world. I'm in awe!
he actually did it, he actually did it, he actually did it
Unfortunately, it's really far away from simulating all effects of a lens. And nobody really knows what approximations the algorithm behind Cycles are running. Cycles is very far away from producing results that are physically accurate. But the result is surely valuable for art, and to demonstrate the working principles of a camera lens.
Neat video, using a orthographic camera to simulate image plane is a fascinating idea.
Since this is tangential to my research topic, here are some things you may consider testing in the future:
- Diffraction test. Another famous visual signature of optical artifacts is the sun stars, or diffraction spikes. For the lens modelled here (the 85mm 1.5), diffraction should become relatively obvious at f/22, at which point the entrance pupil is about 3.9mm and the actual diaphragm about 2.4mm. Serenar has a 20 blade aperture so the sun stars would have 20 spikes. Although since blender is not modelled on wave optics, I am not confident in its ability to replicate diffraction. Another application of diffraction would be the coating, since they rely on offset the peak of the waves, but the rendered images already look like they have modern coatings so this probably won't be necessary.
- Find ways to introduce CA. The images in the render has some of the 3rd order aberrations but has no CA visible, it is too clean for an uncoated glass using an 1950s optical design. I suspect this is caused by the dispersion not being calculated. Not sure if Blender offers this but another important parameter in the patents, aside from RI, is Abbe Number, sometimes represented as VD or V as in the patent you saw, also inversely corelated to dispersion. If this parameter can be modelled, it should offer a better simulation result with ample CA (besides, doublets kinda become meaningless without Abbe number).
- Digital emulsion. Similar to how that other dude tried to model the film spectral response curve, digital sensors have that too. In addition, the digital sensors have several layers of filter in front of them, include the Bayer filter, the microlens, a low-pass, and an UVIR cut, sometimes an additional clear filter for protection. If these are all included, you might find more vignett and color shift in the corner of the image for this Serenar lens.
- Mechanical structures and edge of the lens. A lot of the flares come form light reflecting off the interior of the lens chassis or the beveled edges of the lens as total internal reflection, they also tend to cause veiling glare at times. So far the rendered image seems to be free of all these artifacts (there are some dots but I am not sure if they are scene geometry or flares), it'll probably have even more of the "vintage" feel with some flares and glares. But again, dispersion needs to be modelled for the flares to look right.
Heyo! These details are all super important, I have a couple of rendered tests where I fake diffraction in post using a FFT and bokeh blur plugin, in the video I mention the Abbe number (Not by name) but I don't get into the details of simulating it. If blender ends up getting powerful enough to simulate diffraction in a practical way I would freaking love it but the optical system can only really account for the front optic having diffraction. I'll see if I can figure out a way to truncate it or simplify it. Thank you for the kind words!
@@zircron45 You can emulate diffraction in the material by setting up 3 refraction shaders at R/G/B and calculating the IOR at specific wavelengths corresponding to a monochromatic light source that would yield the primaries (hard to do right because you don't have the scene-reffered color space information in the material, but you can get away with 700/400/300, at least it would be visually plausible if not entirely correct; in any case, Cycles is not a spectral renderer so there's fundamentally no proper way to setup proper non-monochromatic CA.
@@SolarLiner Indeed that was the first method I tested! The tragic part is it clamps all values from 0-1, and using a wavelength ior blur results in a ton of noise. There are rumors of cycles being brought to spectral rendering and thats insanely exciting!
@@zircron45 hm, I've had success in the past and didn't run into clamping issues, it might be the particular node setup you used, if you keep to Add Shader nodes and "pure" colors then there shout not be any opportunities in the shader to clamp the values
I'd be lying if I said I understood half of what you're doing in this video, but this is genius and I would absolutely pay for an addon if you made one.
🔥 A Collection of lenses ready to use in a blender addon would be the absolute best. I am 100% sure this would sell great on Blender Market, and i'd be the first to buy. 💰
Yes!!!!
Could he sell this though? As he is basically building stuff out of existing patents
@@jo_naash If it is an expired patent, absolutely. The patent shown is from 1951, so it is expired. Funnily enough, the older the lens, the more interest there would be in doing this, as newer lenses are designed to minimize the kind of imperfections that this process is meant to emulate.
But you can just use the camera settings to do this
@jo_naash I'd imagine this is transformative enough, since it's emulating the lens formula for digital rendering and not real world image capture. He'd have to come up with cute names that elude to what they actually are.
I stumbled on this video. Not even in this field of work but my guy the passion and joy comes through in voice and I stayed for the entire thing. Brilliant work
I'm a photographer, and am VERY much not knowledgeable in the 3D modeling space, but I find this to be so incredibly interesting. Most of the camera/lens renders I have seen online have all been full frame/35mm sensors, and while watching this I could not stop thinking about simulating a medium format sensor, or even simulating a digital large format sensor/lens. Side note, while fast lenses are great, stopping them down to around f4 or even f8 (ESPECIALLY on medium format) achieves stellar photographs.
I'm not sure if you stated why aspherical lens elements were difficult to make, I'd like to hear more on that. It would be crazy to try this with anamorphic lens elements as well.
Grate theme! I will try to make some vintage lenses like helios 44m-4, tying to calculate the IOR for them rn.
BTW, anyone who have a problem with focusing you camera during tutorial, check the face orientation of your lenses, it has to face outside(being blue). Just spent 2 hours trying to understand why it doesn't work, haha
You are a savior. Thank you!
It's amazing how humankind using just soily the power of math, digits - _imaginary measurement thingies, mind,_ can simulate NOT ONLY the behaviour of light itself but even how this very digital light transfers through just a bunch of mere triangles and shaders with a PHYSICALLY ACCURATE output
I have no words, this is truly the greatest Blender video I've seen
The tutorial we've all been waiting for!! Amazing work
Holy, what a banger of a video. I loved how you explained the concept AND showed an example of how yo implement it. keep up the good work
It looks incredibly good! Looking forward to the next videos in the series!
Now this is going next level in-depth! Awesome!
I've found absolute gold with this video. Thank you so much for being so thorough with this, I've learned a lot from this and you explained it in a way that I was able to emulate another lens as well. You mentioned aspherical and more videos for this topic and I'd love to see those if you ever have the time. The results of this looks so cool and I've been obsessed with emulating film as well so everything surrounding that is just perfect for me. And maybe ways to automate stuff like focusing or exposure would be cool, still figuring out systems for that. But this is super interesting and fun, so thanks a ton for making this video
I watched the original blender camera video you mentioned, and im honestly so insanely excited for where this work can lead us.
Thanks fo putting in the work❤️
Dude, I don’t even have blender (yet) and yet this was the most thorough and thoughtful tutorial I have ever seen. The way you took the time to explain everything in precise and understandable detail, to the pure excitement and passion in your voice when accomplishing the unbelievable and being genius enough to teach it…. This shows mastery, and love. Bro thank you so freaking much for this! This singular video might be the single kick I need to finally install blender. I have a Mac book so idk how good it’ll work, but darnet I might have to start saving up for a pc if that’s the only way! But freaking PHENOMENAL!!! Just earned a new subscriber!!!
This is incredible work and so dense with information, thank you!
This is amazing! I never thought of simulating a lens by recreating it. The results are breathtaking!
Nice job! I did this for the meme, but I'm impressed with how you've managed to refine it. I'm also really curious about why that DOF trick of the orthographic camera ends up allowing you to get the focused image in the end. (Thanks for the shoutout ^^)
Heyo man!!! Honestly you posting your project was the catalyst for me documenting what I had, I loved the production on your video.
The way the DOF trick works is it's forcing the orthographic camera to focus down to the ray paths casted by the lens onto the ortho focal plane
its really weird but it works and its 10x less noisy than using the blender caustics
@@zircron45 Thanks! Glad I could do my part to catalyze your process haha
Interesting about the DOF. I'm not 100% convinced on the "correctness" (feels a bit hacky), but it seems to have worked pretty well.
I noticed in a couple other comments you mentioned maybe working on an addon. I also had an idea about how to improve mine and turn it into an addon, but I'll try to align myself so I'm not doing anything too similar to you. Don't want to overlap too much 😅 Feel free to send me an email if you want to coordinate!
Fantastic! Thank you so much for sharing this knowledge!
Literally a month ago I tried to do something similar, although without the exact optical diagrams. Glad to see your video! Amazing.
This is brilliant work. Keep doing what you are doing.
Dude this is a banger video. As someone working at a university I'd say your way of showing and teaching is perfect and there is so much to learn. Only thing I might recommend is getting a "key press" add-on in blender so it is easier for everyone to follow and you don't have to worry about forgetting to call out a key press. Keep up the amazing work mate💪
Thank you! I used to have screencast keys but it was outdated when i last checked 😔
Thank you for your contribution to the community Zircron. Ive wondered about doing this and actually tried it the same way you did about a year and a half ago. And it worked! But i never wrote it down or did anything out of it because i had no time, its nice to see this actual project going forward, this makes blender be one step closer to being a complete engine for cinematic productions in movies and etc
HOLY MOLY i am amazed by the clarity of the tutorial, thank you good sir for sharing your knowledge
The video is incredible… and that path tracing is so good, that this is even possible. Mind blowing
Great video, and the results look incredible! Great job
This is one of the most informative and insightful tutorials I've seen for blender. I never knew it could be used like this to setup cameras in such an interesting way. It was a blast to follow along. hahahaha I'm making some more cameras now. I have never known such joy in blender. This is so much fun. Thanks!
Incredible work Zircron45! I look forward to the anamorphic version!
mind blown, thank you, just an amazing tutorial
Great work! will enjoy utilising this with my other artistic filters and effects i've explored over the last couple years.
Just rewatched the old intros you made 7 years ago for me(Twisty Mccheezy) and it's incredible how much you've improved! Not only in blender but I can't imagine how long it took to record and edit this video! I sometimes find myself reminiscing about the days when i was like 12-13 and made intros all day. You were my most loyal subscriber and I want to thank you for giving me motivation when needed it the most (even though you probably didn't know you did. I wish you the best and hope you get successful doing this.
Hahaha wsg man!!!
@@zircron45 Yeah it's great overall, just about to start my first full time job and life is just good rn. Hbu?
@@gurkajpeg i didnt get this noti, i'm doin good dawg! I'm really glad you did the same for me man :>
I knew it could be done, but I never got around to making the elements. Well done, with the research and the patience and execution!!
Awesome and stunning work!
Man this is amazing!!! Subscribed, liked this video
begging for this was 100% worth it. Thx zirc
Looking forward to these next videos!
This is very impressive! Great work!
Mindblowing stuff, thanks for sharing this is insane!!
This is so insane! thanks for sharing your big brain!
Rare Zircron45 Upload
Love your Videos
Started with blender again recently.
This is extremely exciting. Can't wait to give it a try ;). Great work!
This is awesome bro super cool work
Finally ! Thanks for sharing your wisdom.
Yo Almost 20k Views right now.
Its getting the Views it deserved. Well done!
Dammmmn this is such a soothing video. The music adds so much to the atmosspere and i am so hooked watching the whole thing
This is one of the coolest videos I've seen
this is dope zircron!
You did what I always wanted to do! Kudos to you man! Now its time to make some constraints and be able to set all from 1 single panel with a custom addon :)
Amazing work!! Congrats 🎉
This is SO INSPIRING!! I do hobby photography and even if they're still a complete mystery to me, I love optics. I'm gonna try replicating my own sigma 50mm f1.4 lens if I find the patent. This is such a cool way of rendering. I'm still a newbie to blender, but want to get better so bad!
Thanks for the inspo and great video. Love the vibes you've got going on
that crooked sensor shot at the end blew my mind. awesome project!
This is one of the coolest videos I've seen for 3D / Photography. Keep up the awesome work, and get a pateron or gumroad so we can buy the lenses you put out ;)
Absolutely amazing! Please give us more
truly incredible work, here.
Absolutely stunning work. Thank you so much for giving out all of this information for free, I greatly appreciate it.
I will definitely use this method in product renders and other renders where I need extreme realism. It will definitely remove a bit of compositing work from my pipeline, and look a lot more compelling and “real” than traditional composite methods.
Again, I thank you for giving us so much I formation for free. You are a legend. ✌️
This right here is fire! Please do keep going with this.
Would definitely like to see an odd-on of this kind too.
Amazing , can't wait for the next episode
This will be getting a million views and probably tens of thousands of subs from this alone 👏 👏 👏
Awesome Video! Crazy interesting and informative! Great Job! Simply Amazing Stuff!
the results are amazing dude, commenting for the algorithm
Great, great work!! I will sure use it in a lot of projects. I plan to make a seet of lenses cotrolled with riggs to make them functional for animations. Thanks a lot for the detailed information you share. It's very, very valuable.
Wow! There is some proper science involved!
man! thank you a lot for the tip with the ALT key and multiple object lol)
besides that love your video, it's pretty inspiring! keep going!
I don't know why i watched it, it's just pops out in my recommendation, and i glad it did. Really like it
One the Craziest 3D related vid I have ever seen I was like what is he doing but all started to make sense from time to time
This is amazing!! I want to use that in my projects asap!!
phenomenal work bro ❤
Nice job! With that you can basically use movements as in a large format camera front and rear standard to simulate Scheimpflug rule of focus plane manipulation. I've been thinking about making such thing in Blender years ago, but couldn't. This is neat!
I love the way people outsmart software with their own tools. It's very clever - from start to finish and well explained. It should be made into an add-on ! Also: the music transports the whole thing very well together with my alpha brain waves ;D
Actually very interesting to learn how an actual lens works! :)
Great work! I tried to something similar a couple of years ago in Blender but the results were so bad that I thought it would never work in practice. Lots of great tips in this video.
this is fantastic, thank you.
Been decades since the last time I touched any 3D software - I even moved on to photography and other things since then - but this is the video I never knew I needed until now. I think I might actually give Blender a good try with this. Great job!
wow! this is amazing
This is so cool!
Insane!!! So good man!
This is absolutely sick!
this is sick.
Imagine the render times using this for an animation but damn it would look great
For aperture / F-number / "fast" vs "slow" lenses:
The aperture number is the ratio of focal length and the effective diameter of the capturing light path.
A lens with a 200 mm focal length and wide open aperure of f/2.8 will have a light path that captures light through 200/2.8 ≈ 71.4 mm diameter. A 200 mm f/2 lens will capture more incoming light, with an effective diameter of 100 mm, at wide open aperture that is. 200 mm f/4 will only let in light through at most Ø 50 mm.
Likewise, a 50 mm f/1.2 lens (≈ Ø 41.6 mm) is much more sensitive wide open than a 50 mm f/2.8 (≈ Ø 17.9 mm) lens and allows for a faster shutter speed in the same lighting conditions.
Some lenses (often cinema lenses) have t-stops (transmission stops) instead in which case the light path diameter is larger, but the aperture is given in effective transmission stops because some lens elements are not fully translucent.
I tried another patent (specifically Canon FD 50mm f1.4 JP 1995-151965 Example ML) and I cut a hexagon shape into the aperture. looks even better! It surprises me how easy it is and how much you can do with those cameras!! thanks for making this tutorial :D
Hey! This is an excellent demonstration. I have done a similar setup myself in the past, using 3ds Max and Corona, however camera/sensor trick didn't come to my mind. Very good idea. I would be interested in seeing a regular camera set with the same parameters and the simulated lens setup. Just to see how much it affects the image quality, and if it would worth the render times.
This was an incredibly insightful video, thanks for sharing! I'd be really interested to see any progress you make on the scripted tool you mentioned in the comments. The results are really beautiful
Masterpiece, of course we are interested in aespheric lenses.
That is the coolest blender video I ever seen
This was insane... I don't have words
I love taking ingame photos in photo mode, and this reminds me of taking pictures in Infamous Second Sun except the depth of field here has a way higher sample count and looks way better and gets cool effects like slight lens distortion, bokeh on particles, etc. I wonder if there would be any way to implement this by a mod into a game based on a blender render of a lens like the one you found on that patent site, if it's legal of course, to avoid getting the mod taken down. I especially loved that in Infamous, you could very carefully adjust the fore- and background DoF and adjust the focus point size and direction. It still holds up in my opinion, but it obviously could be better. Thank you so much for making this video! It's very cool! :p
Always wanted to do this, thank you for this knowledge. I will definitely tag you when i make something.
insane video man 😮
wtf bro this is absolutely genius!
I would love love love to hear your advice or even a video on aspherical lenses. Everyone and their mother who has seen the real camera video has wanted this, but just one step further to get the aspherical look, because that's really like the end goal of making a real lens. It would add so much to our renders to make it look cinematic af.
100%! Alaskan FX and I are working on a huge tool change in collaboration with the guy who made the source I use!
This is amazing!!
This is absolutely awesome. My only gripe is the sheer size of the camera, but that's an easy enough scaling fix. Nice work!
Ha! It's quite ironic to have to deal with realistic issues in a virtual world because you want realistic renderers...
damnn great video man! intresting trick on using inverted orto cam, for sure will try it myself with my fav lenses
such a fun project!
Thank you so much for this. I truly appreciate. We truly appreciate. One suggestion for lens design: Aero Ektar 7” 178mm f2.5
sick dude much love.