Jump to content
Sign in to follow this  

parsing ifd files

Recommended Posts

Does somebody know if it is possible to turn on "depth of field" in ifd-Files I have already written to disk. With mantra -q 8 I can turn it off but what if I would like to do the opposite and turn it on?


Thanks in advance!

Share this post

Link to post
Share on other sites

You need to add ray_property camera focus, ray_property camera focal and ray_property camera fstop properties into the ifd file.

I attached python script example that do this with binary ifd.
Just run it as:

dofOn.py -i inputFilePath.0001.idf -f 4.4847164154, -l 0.05, -s 0.227884607693

-i = ifd file path

-f = focus distance

-l = focal length

-s = fstop

For ifd file in asci format it's even simplier.

Just a little warning, this script replaces original file, so to be safe, do backup or change replaceFile() function.


Edited by pezetko

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this