Advertisement

Game dev math?

Started by October 28, 2018 05:23 AM
8 comments, last by Maledict 6 years, 1 month ago

Hi everyone,

What books would you guys recommend to have enough of a background to write 3D code? I actually have a math degree, but have been working in an unrelated field for nearly a decade, so to say that I'm rusty is an understatement. 

Thanks!

1 hour ago, Maledict said:

What books would you guys recommend to have enough of a background to write 3D code?

Really to build a 3D models and navigate in 3D space you need only branch of math - computational geometry(that based on linear algebra and analitical geometry). Anything other is branches of phisic - generally analitical mechanics used for procedural animation and phisical optic required for shading models.

Better book to briefly get in 3D is a documentation and tutorials of Microsoft DirectX SDK. It allow to shortly get a basic coding and architectural techniques and also is a minimal basis required to better understend other books and papers.

#define if(a) if((a) && rand()%100)

Advertisement

Real-Time Rendering, Fourth Edition 4th Edition
Real-Time Rendering, Third Edition 3rd Edition
3D Math Primer for Graphics and Game Development
Mathematics for 3D Game Programming and Computer Graphics, Third Edition
Essential Mathematics for Games and Interactive Applications
Ray Tracing in One Weekend (Ray Tracing Minibooks Book 1,2)But books is just theory. Main problem is effective (extreme) applying of this knowledge at production.

Take a look at working engines (but not so large)

https://github.com/danijar/computer-game

https://github.com/etodd/lasercrabs

https://github.com/dereksorensen/KailashEngine

To write most  3D code you just need to refresh your knowledge of 3D math... vectors, matrices, coordinate transformations, quaternions, as well as basic geometry and linear algebra.  You dont need much calculus, if any, for most 3D game programming work.

1 hour ago, 0r0d said:

You dont need much calculus, if any, for most 3D game programming work

Really you is right in case we talk about rendering of scene only. But anything else - game mechanics and so on is integration of phisics differential equations of vector functions using a finite-difference schemes, so heart of game logics involve both - calculus and linear algebra. 

#define if(a) if((a) && rand()%100)

2 hours ago, Fulcrum.013 said:

Really you is right in case we talk about rendering of scene only. But anything else - game mechanics and so on is integration of phisics differential equations of vector functions using a finite-difference schemes, so heart of game logics involve both - calculus and linear algebra. 

Well, if you're writing serious physics code... yes, of course.  But for typical game logic, I have a hard time thinking of situations where I needed any calculus.  Once you start to get into more advanced stuff, yes calculus starts to creep in, no doubt.  Still, for around 90% of all gameplay code I ever had to write (including graphics and AI) you get along just fine without it.

in any case, if you're refreshing yourself on math for 3D game development, and you think your basic calculus is very rusty... sure, spend some time on it.  But if you have a math degree, I guarantee you whatever you remember is more than adequate in that regard.   The 3d matrix stuff is more important, because there's a good chance you didnt do that enough (even with a math degree) so that it's all second nature to you.  And almost everything you do in 3D games programming will inevitably involve coordinate transformations, creating and manipulating matrices, etc, especially if you do any amount of graphics, AI, gameplay, even simple physics, etc.

Advertisement
28 minutes ago, 0r0d said:

 The 3d matrix stuff is more important, because there's a good chance you didnt do that enough (even with a math degree)

Really it depends from kind of mathematical degree.  I have a Specialist degree in Applicative Math and CS. We has 2 semesters of linear algebra and analitical geometry on first year,  then 2 semesters of computational geometry  on 2d year and finally 2 semesters of CAD-related software development on 3-rd year.  And it is common program for Applicative Math and CS branches of local universities. Of cource pure mathematists (that studied on branches of Higher Math) usualy dont studing a concepts of 3D software development and implementation, but usually thay study a tensor calculus that is extension of linear algebra.

#define if(a) if((a) && rand()%100)

Moderation note:

We're here to recommend books and resources to help Maledict to write 3d code.  What is or isn't included in specific degree courses, or you have learned in your personal education is not really relevant.

Please stay on topic.

 

To that end, it's not specifically a maths resource (although it does include some relevant maths), but Scratchapixel is a great free online resource if you're interested in computer graphics. :)

- Jason Astle-Adams

Thanks, everyone! 

This topic is closed to new replies.

Advertisement