0

I have a question about 3D math. At my young age I haven't been taught trigonometry or linear algebra yet. I have learned a good bit on khan academy though. I still don't get all of the math in 3D game programming. I am following Introduction to 3D Game Programming with DirectX 12 by Frank D. Luna. He mentions a lot of math and I don't get most of it. I want to know what to do.

Skip over it? Or try to learn it?

  • 3
    I love math and 3D math is fun. You should spend the effort it takes. Trigonometry and Linear Algebra are worth it. – Steven Hansen Jun 02 '16 at 22:01
  • 1
    You should spend more time and learn it.Basic transformations, vector, point, and matrix computations are necessary for 3D graphics. – Good Luck Jun 02 '16 at 23:23

1 Answers1

3

Understanding the essential math of 3D transformations is required to really do any 3D programming and useful even for 2D programming. Understanding local vs. view vs. projection space is also essential. Being proficient in using quaternions is also extremely useful as this is very commonly used in animation, blending, and cameras. Even people writing in Unity need to know these things.

If you plan to be a graphics programmer as a profession, you should take the time to learn linear algebra at some point.

If you aren't already an expert in Direct3D 11 graphics programming, I'd recommend waiting on DirectX 12. Take a look at DirectX Tool Kit and it's tutorials or look at Frank's earlier books as a starting place.

For "modern" Direct3D programming, you should look at using DirectXMath which is included in the Windows 8 SDKs and later (and BTW is also hosted on GitHub). For simplicity of use and learning, however, you should first look at the SimpleMath wrapper for DirectXMath included in the DirectX Tool Kit which hides some of the fussy memory alignment requirements.

Community
  • 1
  • 1
Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81
  • I strongly confirm the dx12 advice. For the math part, you have to differentiate understanding of things and implementation, when i was a little kid, i was messing around with vectors and matrices all the time, but i would have been absolutely incapable to implement a mat44 inversion. Once i had a working implementation stolen from some book ( pre-internet, very hard to find information ), i was good to go. And today, you can just use a math library like DirectXMath. 3D maths used in a 3D engine are pretty basic. – galop1n Jun 03 '16 at 02:41
  • 1
    In other words, you don't need to know how to write ``XMMatrixLookAtLH `` but it's useful to know enough of the basics to understand what it is doing, why you would use it, and how it differs from say ``XMMatrixShadow`` which also creates a 4x4 matrix. – Chuck Walbourn Jun 03 '16 at 15:08