I want to give you and Vlado a tiny little toy to show you how *easy* DoF could work. ..maybe Vlado can add such a feature to the final 1.5 ..whenever the chaos will drop it *g*
the code is that simple that it can’t be a problem to add it to vray soon
u = 0.025 --unschärfekreis für kleinbild 0.025 (mm)
f = 50 -- focal lenght (mm)
d = focus distance
k = 1.8 -- Aperature size ..increasing means a smaller opening and not a wider opening .. i want to mention it , because i think vray is handling this value wrong!
Btw, the aperture size in VRay is the physical size of the aperture, not the F-stop. In some ways this is more meaningful than an F-stop since not all 3D scenes are in a real world scale, and just putting in the size of the aperture is a quick way to get the look you want.
I guess an F-stop control could be implemented as well, one that also automatically updated the aperture size value. You would need some way to give VRay a point of reference for knowing what scene size one of the first F-stop is. If for instance f/1.0 is 50 units the control would set the aperture size to 35.7 units if you changed the f/stop to 1.4, and 25 units if you changed the f/stop to 2.0, and so on (halving the area of the aperture each time you move one stop).
well ..that’s true, but what does an aperature of 0.001m means?
I don’t know it!
..but i know the difference between f/1.4 and f/22 and i know what happens when i use a 15mm instead of a 105 macro …you know that’s my point and reason why i want to spread this tool.
*IF* vray can’t use a correct cameramodel, then it would make sense to use something like range of sharpness in meter(units) and the centerbais, which should be +1/3. ..BUT(!!!) the correct cameramodel would be much easier and you could give the users a really handy tool like in this script without any cheats or freakvalues.
well ..that’s true, but what does an aperature of 0.001m means?
I don’t know it!
A 10 mm aperture is f/1 on a 10mm lens, or f/2 on a 20mm, or f/4 on a 40mm lens etc. The f/stop is the ratio between the focal length of a lens and the diameter of the aperture. On a 50mm lens, f/2 means that the diameter of the aperture is 25mm. The ratio is this 50/25 = 2, hence f/2.
So an aperture of 0.001m means, for instance, f/22 on a 22mm lens.
BTW, I’m not saying I don’t like your tool. I think it’s great!
A thing I would like to see in the future is a VRay camera that has per-camera controls for all these things (focal length/aperture size/shutter speed). Right now it is hard to have a tele lens and a wide angle lens in the same scene for instance, since I have to keep changing the camera settings in the render rollouts to get the proper look for each. Or keep more than one scene, which is a nightmare once a client wants some changes. My ideal camera would also include viewport feedback of course
I know we don’t talk about my script and i’m happy to talk about the system behind vray DoF.
A 10 mm aperture is f/1 on a 10mm lens, or f/2 on a 20mm, or f/4 on a 40mm lens etc.
f/1.4 will be a fully open aperature and with every increasing f-step the aperature will be smaller and smaller until you have the smallest aperature your optic will provide.
open aperature = full glory of DoF
smalles aperature = no DoF
Furthermore, is it true that the f-stop can be calculated in max as with a real camera (f-stop value is focal length/aperture diameter)
I think the Camera model in max is wrong.. the aperaturesize of max is shown on the right of the output rendersize dropdown and when selecting a 36mm slide it shows you an aperature size of 34,2mm instead of 36mm ..so this indicates that the camera model is wrong.
Max also don’t have a scriptable focal lenght parameter ..you have to calculate it from the HFov! ..which could be the workaround for the problem with the aperature size
btw, i think the formular to calculate the Hyperfocal lenght is max unitsize independent
A 10 mm aperture is f/1 on a 10mm lens, or f/2 on a 20mm, or f/4 on a 40mm lens etc.
It’s the opposite!
f/1.4 will be a fully open aperature and with every increasing f-step the aperature will be smaller and smaller until you have the smallest aperature your optic will provide.
open aperature = full glory of DoF
smalles aperature = no DoF
Yes, I wrote on a 10 mm lens, 20 mm lens etc. (as in focal length, not aperture size.) My point was that the same aperture size is a different f/stop on different lenses, and if you know the focal length and aperture size you can easily calculate the f/stop.
Another thing is that in VRay the f/stops doesn’t really change the exposure, but only the DOF, and I’m kind of happy about that , I like the freedom we have over a phsical camera.
…but nevertheless DoF controll in Vray isn’t what i would call user friendly.Perhaps, but the controls are enough to define the camera exactly and without ambiguities. From them, you can compute any other values you need, and vice-versa.
new:
- some typo updates - thx Torgeir
- the aperture diameter in different units. ..should be the right value for every renderer
- a slider instead of a dropdownbox
vlado, there will be a physical correct camera in vray 3.98.18 ..right
Nice Tool Dschaga! Good to speak about this topic again!
I think it should be integrated… Nah, put that into a VrayCam Interface Mockup and put it in the Wishlist section.
Also consider the polygonal shape of the aperture. I think this could be handy.
Unfortunately i don’t have time to think about it myself.
vlado, there will be a physical correct camera in vray 3.98.18 ..right;)
Dude i’m sure we’ll see some improvements before Vray is !Realtime…
oh ..forgot to ask vlado:
Is the vray aperture unit in meter, centimeter or millimeter.
I get only good results when i interpret my values ..in above case “0.0355m” as 0.3555 ..decimeters(?).