Thu, Nov 14, 12:04 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 13 11:02 am)



Subject: Help how do I calculate the focal distance?


Osirusblue ( ) posted Thu, 19 September 2002 at 1:25 AM ยท edited Tue, 12 November 2024 at 11:20 PM

Ok, so I can't figure out how to determine the focal distance to allow DOF renders. The default setting obviously does not work with the default camera setup and default figure setup. Is there some chaos theory algorithm I need to use to figure out how far from character to camera I am?

This is the captain. We have a little problem with our entry sequence, so we may experience some slight turbulence and then... explode.


williamsheil ( ) posted Thu, 19 September 2002 at 8:44 AM

Probably the best way is to look out for a Python script that will do it automatically (with the current selected object), or write one yourself. This is one of the first things I was intending to do when I got P5, but given the delays in delivery in the UK, I expect to be beaten to it. Bill


doldridg ( ) posted Thu, 19 September 2002 at 11:22 AM

But what math to use? I've been tearing my hair out trying to figure out where to get the absolute coords for the camera and the current selection. Maybe the EndPoint function in Python, but I'm so rusty at Python that I'd have to relearn it....


Mason ( ) posted Thu, 19 September 2002 at 12:03 PM

Well you can just get the position of the camera and determine the distance to the figure. You could place a small prop, like a ball at where you want the camera to focus. Write down the ball's position (xb,yb,zb). Then hit 3 or select the camera and note down the camera's position (xc,yc,zc). The distance is then Sqrt(xbxc+ybyc+zb*zc). That should be the focal distance to your prop ball.


doldridg ( ) posted Thu, 19 September 2002 at 12:48 PM

I sort of tried that -- only the correct formula in Euclidean geometry I use is Sqrt((xb-xc)^2+(yb-yc)^2+(zb-zc)^2). But no matter how many times I did it, I ended up with an answer that didn't work! I ended up finding a value by trial and error and by setting the F stop to 1.4 was able to clearly see the focal sphere of the camera, but the numbers didn't seem to make sense..... I'll mess with it some more...


Osirusblue ( ) posted Thu, 19 September 2002 at 1:30 PM

Cool! Please let me know what you discover. I've got zero python skills and was just at a complete loss as to how to figure things out. Thanks!

This is the captain. We have a little problem with our entry sequence, so we may experience some slight turbulence and then... explode.


williamsheil ( ) posted Thu, 19 September 2002 at 2:25 PM

Euclid is the right approach, but bear in mind that the main and aux cameras (in P4) are offset by a value of +1.0 Poser units in the z axis, which will need to be added to the z coordinate. ie. as if the x,y,z values refer to the position of an invisible tripod at the centre of the screen (where the default figure is usually loaded) and the camera is mounted on a boom, and facing back towards the centre. This is further confused by the fact that the scale attribute seems to apply directly to the boom/camera setup. Also P5 supports multiple units. Best experiment with a few props and camera settings to get the hang of where the camera really is, or use the dolly camera which has a simpler geometry, but Python is still probably the best way to implement this. Bill


shadownet ( ) posted Thu, 19 September 2002 at 3:08 PM

Someone please write a script for this. :O)


doldridg ( ) posted Thu, 19 September 2002 at 6:57 PM

I think I can calculate it manually now that I know about that 1.0 Poser units offset. That's what was throwing me off. I sort of like DOF in some renders as it mutes the background just a bit. Playing the F stop up and down actually lets you control it very well. Anyone know what the F stop of the human eye is in normal lighting and at night?


Osirusblue ( ) posted Fri, 20 September 2002 at 12:15 PM

as a general rule, the higher the f-stop #, the smaller the opening...so a higher number f16, 22 would be probably be closer to a small pupil f2, 3, 4: night Also though a higher f-stop gives you more depth of field in the picture all by itself. But I could ask over in the photography forum if that doesn't work/make sense/etc

This is the captain. We have a little problem with our entry sequence, so we may experience some slight turbulence and then... explode.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.