According to the documentation, "With the default setting ViewMatrix->Automatic, the matrices {t,p} are found automatically from the settings for options such as ViewPoint, ViewVertical, and ViewAngle." It may be useful to take examine the code at demonstrations.wolfram.com/UsingViewMatrix to see how the default settings can be used to produce the two needed matrices.
–
David CarraherMar 26 '12 at 17:57

2 Answers
2

The documentation is wrong. It should have been fixed, but AbsoluteOptions does not work with ViewMatrix (on all platforms). M- introduced interactive 3D graphics since V6, and after that getting values through AbsoluteOptions (which is an old function) becomes very tricky since the Kernel (who evaluates the option) cannot fully know what is happening on FrontEnd side. To compare, before V6, the Kernel was solely responsible for rendering 3D scene (Postscript!), and of course it could tell every matrix value.

Instead, you can try to use 5 values that can define the matrix using Dynamic:
ViewPoint, ViewAngle, ViewVertical, ViewCenter, and ViewRange.

For instance, the following example takes those 5 values from one graphics, and use it for another:

+1 Very useful diagram and explanation. Much better than the documentation for the individual View settings!
–
David CarraherMar 26 '12 at 20:23

+1 for this very illustrative answer, although I already know all this from OpenGL, rendering, and so on. The reason, why I specifically asked how to extract the used projection is, because I want to transform the underly 3d mesh points by myself. For this, I need the used projection for any arbitrary Mathematica Graphics3D. Can we get this from the FE?
–
halirutanMar 27 '12 at 12:26

@Yu-Sung Chang, since this clearly answers my question, I'll accept this. Maybe, I ask a follow-up in another post and I would be grateful when you would look at it too;-)
–
halirutanMar 27 '12 at 14:40

It got a bit out of hand, but here's a way to construct a ViewMatrix pair from the triple ViewVector, ViewAngle, and ViewVertical. The left figure is the Graphics3D object using ViewVector, ViewAngle, and ViewVertical and the right is the one using ViewMatrix. If you rotate the left figure or scale it (by dragging the figure while keeping Alt depressed), the ViewMatrix is updated automatically.

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.