stig-atle / io_scene_pbrt

Exporter for blender that exports the scene into pbrt's ascii file format.
59 stars 16 forks source link

field of view #22

Closed delepoulle closed 4 years ago

delepoulle commented 4 years ago

I have noticed an important difference on the field of view (FOV) on the Blender viewport and the rendered image. I think I know a part of the problem : For blender, the FOV is the maximum of horizontal angle and vertical angle. But pbrt use the minimum ! So I changed you line 132 in render_exporter.py from : fov = bpy.data.cameras[0].angle * 180 / 3.14 to : fov = bpy.data.cameras[0].angle * 180 / math.pi * bpy.data.scenes['Scene'].render.resolution_y / bpy.data.scenes['Scene'].render.resolution_x

The result is more consistant but not actually the same.

viewport

stig-atle commented 4 years ago

I have also noticed this. I appreciate the feedback. Do you want to make a pull request for the change that I then can merge in? (so that you get the contribution) - or du you want me to just change it and get it pushed?

delepoulle commented 4 years ago

For a so light "contribution", I think it's easier if you commit it yourself ;-)

stig-atle commented 4 years ago

Thank you again, I have pushed the change now.