Achieving True Photorealism With Lens Simulation
ฝัง
- เผยแพร่เมื่อ 19 พ.ค. 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.
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
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
🔥 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'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!
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
The tutorial we've all been waiting for!! Amazing 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!!!
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❤️
It looks incredibly good! Looking forward to the next videos in the series!
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
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 😔
The video is incredible… and that path tracing is so good, that this is even possible. Mind blowing
This is amazing! I never thought of simulating a lens by recreating it. The results are breathtaking!
Literally a month ago I tried to do something similar, although without the exact optical diagrams. Glad to see your video! Amazing.
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!!
Now this is going next level in-depth! Awesome!
This is incredible work and so dense with information, thank you!
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!
HOLY MOLY i am amazed by the clarity of the tutorial, thank you good sir for sharing your knowledge
begging for this was 100% worth it. Thx zirc
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
This right here is fire! Please do keep going with this.
Would definitely like to see an odd-on of this kind too.
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 :>
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!
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. ✌️
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 ;)
mind blown, thank you, just an amazing tutorial
This is brilliant work. Keep doing what you are doing.
Great video, and the results look incredible! Great job
Fantastic! Thank you so much for sharing this knowledge!
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 very impressive! Great work!
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 :)
Rare Zircron45 Upload
Love your Videos
Started with blender again recently.
this is dope zircron!
This is extremely exciting. Can't wait to give it a try ;). Great work!
Looking forward to these next videos!
This was insane... I don't have words
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 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
Yo Almost 20k Views right now.
Its getting the Views it deserved. Well done!
Amazing work!! Congrats 🎉
Awesome and stunning work!
This is one of the coolest videos I've seen
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.
This is so insane! thanks for sharing your big brain!
Finally ! Thanks for sharing your wisdom.
truly incredible work, here.
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!
the results are amazing dude, commenting for the algorithm
I don't know why i watched it, it's just pops out in my recommendation, and i glad it did. Really like it
Amazing , can't wait for the next episode
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
This will be getting a million views and probably tens of thousands of subs from this alone 👏 👏 👏
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!
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.
Awesome Video! Crazy interesting and informative! Great Job! Simply Amazing Stuff!
wow! this is amazing
Absolutely amazing! Please give us more
this is fantastic, thank you.
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 awesome bro super cool work
this is sick.
Imagine the render times using this for an animation but damn it would look great
phenomenal work bro ❤
This is amazing!! I want to use that in my projects asap!!
Insane!!! So good man!
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
Next step: model the aperture holes using blades, that will really improve the lens artifacts!
damnn great video man! intresting trick on using inverted orto cam, for sure will try it myself with my fav lenses
Always wanted to do this, thank you for this knowledge. I will definitely tag you when i make something.
sick dude much love.
wtf bro this is absolutely genius!
This is so cool!
Masterpiece, of course we are interested in aespheric lenses.
Thank you so much for this. I truly appreciate. We truly appreciate. One suggestion for lens design: Aero Ektar 7” 178mm f2.5
This is absolutely sick!
i would love to hear a lens designer’s wild ideas that would only be possible in virtual space
Same here dawg! Massive aspheres
insane video man 😮
Actually very interesting to learn how an actual lens works! :)
I absolutely love lens simulation in Blender, it adds so many desirable imperfections!
This is amazing!!
Dude you are lighting fast with those shortcuts. Excited to try this.
I wonder if I can copy a lens I used for motion tracked footage and parent it to the camera movement data. Then your vfx blended into real footage would have the same look. Probably a bit more complicated than that…
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!
That is the coolest blender video I ever seen
I was mind blown!!!
I had this idea about 10 years ago, but in-between everything else I never tried it. But watching this, there are many details that I probably wouldn't have considered and results would have been mixed/confusing.
How the hell do you have less than 1k subs lmao, this is some super high quality stuff.
Fascinating video, thanks for making such a clear explanation. I'd be super interested in how you could model aspherical lenses, since that would open you up to a lot more options. Is it something that would be possible to integrate into the script you and Alaskan FX are making?