[Bf-codereview] Camera sensor size (issue 5274047)

g.ulairi at gmail.com g.ulairi at gmail.com
Wed Oct 19 15:54:24 CEST 2011


I'm not sure about "standard" pipeline -- when it's needed to know exact
settings of camera, but as we've discussed with Francois, when you're
doing motion tracking you can't always name sensor with, focal length
and pixel aspect -- sometimes you don't know some of parameters. It's
easy to re-calculate them in head, but it's not what artists wants to
do. So for motion tracking vertical sensor size makes more sense.


http://codereview.appspot.com/5274047/diff/4001/source/blender/blenlib/BLI_math_rotation.h
File source/blender/blenlib/BLI_math_rotation.h (right):

http://codereview.appspot.com/5274047/diff/4001/source/blender/blenlib/BLI_math_rotation.h#newcode185
source/blender/blenlib/BLI_math_rotation.h:185: float
hfov_to_focallength(float hfov, float sensor_x);
You're right. Didn't notice this when when was cleaning up patch, Will
rename them.

http://codereview.appspot.com/5274047/diff/4001/source/blender/editors/space_view3d/view3d_view.c
File source/blender/editors/space_view3d/view3d_view.c (right):

http://codereview.appspot.com/5274047/diff/4001/source/blender/editors/space_view3d/view3d_view.c#newcode971
source/blender/editors/space_view3d/view3d_view.c:971: float lens,
sensor=32.f, fac, x1, y1, x2, y2;
Sounds reasonable. But what about gameengine? It also uses 32 as default
value for sensor size but camera's dna isn't available there. Is it fine
to keep this value hardcoed in RAS_CameraData?

http://codereview.appspot.com/5274047/diff/4001/source/blender/makesrna/intern/rna_camera.c
File source/blender/makesrna/intern/rna_camera.c (right):

http://codereview.appspot.com/5274047/diff/4001/source/blender/makesrna/intern/rna_camera.c#newcode141
source/blender/makesrna/intern/rna_camera.c:141: prop=
RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_NONE);
Yes, it's more about making settings more "physically". In original
patch it was also a way to define vertical fov, but it wasn't really
used to i removed that setting for a while, but run into complains from
artists about missed option,

http://codereview.appspot.com/5274047/diff/4001/source/gameengine/Rasterizer/RAS_FramingManager.cpp
File source/gameengine/Rasterizer/RAS_FramingManager.cpp (right):

http://codereview.appspot.com/5274047/diff/4001/source/gameengine/Rasterizer/RAS_FramingManager.cpp#newcode52
source/gameengine/Rasterizer/RAS_FramingManager.cpp:52: * ^Deprecated
Comment
Yeah, this comment means nothing now. Will remove it.

http://codereview.appspot.com/5274047/


More information about the Bf-codereview mailing list