[HN Gopher] 3D Math Primer for Graphics and Game Development (2011)
___________________________________________________________________
3D Math Primer for Graphics and Game Development (2011)
Author : wsc981
Score : 101 points
Date : 2024-06-06 13:54 UTC (9 hours ago)
(HTM) web link (gamemath.com)
(TXT) w3m dump (gamemath.com)
| jacknews wrote:
| um, out of print, and the pdf is available 'soon'? What's even
| the point of this link then if we can't actually get the book in
| any way?
|
| however it can be found at anna's archive
| ltadeut wrote:
| the book is free to read online
| leetrout wrote:
| Easy to overlook the link above the image (at least on
| mobile)...
|
| This is the direct link to the online content
|
| https://gamemath.com/book/
| Zecc wrote:
| The image itself links to
| https://gamemath.com/book/intro.html by the way.
| koolala wrote:
| best tool for 3D math is complex numbers. most languages removed
| support for them.
| bluesmoon wrote:
| Julia supports Complex numbers as a built-in type.
| koolala wrote:
| are numbers types?
| nimih wrote:
| It's certainly possible to interpret numbers as types, but
| it's not particularly common AFAIK, since there are
| generally more convenient interpretations of arithmetic for
| a given problem domain (von Neumann sets, Dedekind cuts,
| IEEE 754 floating point values, &c &c).
| koolala wrote:
| imaginary numbers to me are more real than real numbers,
| they are the numbers of geometry - i like them being
| first class numbers
| jayd16 wrote:
| Can't say I see a lot of bolted on complex number support in
| graphics or game dev.
|
| Even the posted primer suggests you can skip the section that
| mentions complex numbers.
|
| What do you use them for?
| koolala wrote:
| reality
| jplusequalt wrote:
| Quaternions are an extension of complex numbers and are used
| ubiquitously in graphics programming for both 2D and 3D
| applications. Most math libraries support them.
|
| If your gripe is over programming languages not having support
| for 3D math, then I think that should be expected. Most
| languages try to keep their standard libraries small, and their
| built-in types smaller. A language that has built-in support
| for such things would be incredible niche. Maybe JAI is what
| you're looking for? I'm not sure if that even contains built in
| support however.
| koolala wrote:
| J and APL are what I am looking for. JAI is not my thing.
| bluesmoon wrote:
| Nice. Reminds me of the PC Game Programmer's Encyclopedia from
| back in the 90s/early 2000s: http://qzx.com/pc-gpe/index.php
| rossant wrote:
| I had that book! I was like 16. I was so blown away by the blend
| between math, programming, and graphics. I didn't write a game
| until a decade later though.
| codetrotter wrote:
| I read some similar books when I was around that age too. And
| now I'm over 30 years old and still didn't write a proper game
| yet :p
|
| One day though
| andai wrote:
| You should try game jams! I found the external pressure
| really helpful. Shipped half a dozen (tiny) games this year.
| adamrezich wrote:
| If you work on something small and simple on a constrained
| timescale with a set deadline _first_ --like a Pac-Man clone,
| or an Arkanoid clone, or a Vampire Survivors clone--it will
| take you longer than you would've expected, but it still
| won't take _too_ long, and you 'll come away from the
| experience with some code you can reuse, some ideas of how to
| do things better next time, and a ton of confidence due to
| having explored the problem domain somewhat.
|
| "Punching above your weight" and taking on an experimental or
| otherwise complex game design for a game development project
| is a good way to learn, but it can be frustrating and you can
| get burned out when you run into unforeseen design and
| implementation issues. I think this is the way most people go
| about independent game development, and it's how I started
| out when I was much younger, too. "Punching below your
| weight" and choosing a smaller-scoped project--ideally one
| with a predefined and tested design--is extremely underrated.
| Unless you've done something like this many times before, it
| might seem "beneath you" (especially if you have some ideas
| of the ideal long-term game project you want to work on that
| you're excited about), but it's actually a great way to
| solidify your skills (especially your design skills, as you
| play around with modifying an existing game design once
| you've implemented the basics of it), and prove to yourself
| that you can finish something you set out to do. Plus, in the
| process, you might find something unexpected in terms of
| either tech or design that you can take with you to your next
| "real" project.
| rossant wrote:
| My game was a simple tetris-like puzzle in 3D on Windows
| Phone (using C# and XNA) ;)
| https://www.windowscentral.com/gaming/this-square-enix-
| jrpg-...
| boristsr wrote:
| This is still my go-to math book for game dev. Excellent writing
| style.
|
| I'd also advise it for anyone getting into ML or LLMs, the
| intuition it can help you build up around the linear algebra
| stuff like vectors and matrices is very helpful for understanding
| what's going on in ML.
| jplusequalt wrote:
| The cool thing about graphics programming is that often times
| you aren't even doing "linear algebra" strictly.
|
| A lot of the math for 3D graphics programming uses the concepts
| of affine spaces/transformations since standard 3x3 matrices
| don't have enough information to support
| translation/projection. I had no clue about this branch of math
| at all until I started learning graphics programming--in fact I
| think graphics programming requires you to learn the most math
| of just about any discipline of computer science outside
| theoretical computer science. The amount of math you need to
| truly "understand" path tracing is immense.
| qingcharles wrote:
| Failed all my maths exams all the way through school. Us
| kids: "Teacher when we will we ever use this crap in real
| life?"
|
| Me: * _becomes 3D game developer, has to write 3D entire 3D
| engines from scratch*_
|
| They always say school is wasted on kids :D
| tlarkworthy wrote:
| Homogeneous coordinates is still linear algebra in a 4D space
| instead of the obvious 3 you would naively pick. Kinda like
| quaternions where adding an extra degree of freedom suddenly
| works around some expressivity problem you didn't really know
| you had but clearly it solves (e.g. gimble lock on euler
| angles). But the term linear algebra covers high dimensional
| uses like training neural networks, its the thing that gives
| us the matrix formulation of stuff.
| keb_ wrote:
| This looks awesome! Does anyone know of something similar but for
| 2D games?
| Zecc wrote:
| If you understand 3D you understand 2D, and in fact
| explanations for 3D usually start by explaining the equivalent
| in 2D first.
| jplusequalt wrote:
| I personally prefer Essential Mathematics for Games and
| Interactive Applications.
|
| https://www.essentialmath.com/book.htm
| OnionBlender wrote:
| It is funny that the author says to recycle the 1st edition and
| never show it to anyone. I actually failed to optimally solve an
| interview question because a topic covered in the 1st edition was
| removed in the 2nd and other graphics books only have the O(N log
| N) solution instead of the optimal O(N) solution.
|
| The problem was about vertex welding. Some books, like Real-Time
| Rendering, only mention the N log N solution.
|
| I was annoyed after the interview and thought, which book would I
| have had to read to get this question right? The only 2 books I
| could find that had the optimal answer were the 1st edition of
| this math book and Real-Time Collision Detection.
|
| I suppose if I was smarter I could have figured out the "bucket"
| trick. I find interviews too stressful to think clearly.
| qingcharles wrote:
| What a petty interview :( Does the candidate have the desire
| and skill to find the correct answer given access to the right
| resources? That's what they need to ask. Not what is in the
| candidate's brain on the day of the interview.
|
| I've forgotten more than I know, but I know where to find it.
| smokel wrote:
| Depending on the job, this might be (somewhat) reasonable.
| I'd assume that one could still get hired even if one failed
| that particular question, but showed some sense of
| understanding about the problem space.
|
| For many problems, someone tackling it might not even
| understand that there is a problem, and might have no clue
| where to start searching for answers.
|
| I've seen many developers who burn a crazy amount of hours by
| going down the wrong path, and then try to StackOverflow or
| Google their way out of the mess they initiated. It takes
| experience (either gained or learned) to avoid such traps.
|
| Then again, it really depends on the job. The interview
| question suggests this was not for a CRUD job, though :)
| OnionBlender wrote:
| It was for a 3D graphics programming job.
|
| Another question was about some low level assembly
| performance instruction trick. Afterwards I did the same
| thing and tried to figure out which text book I would have
| had to read to know the answer. I only found one Computer
| Architecture book that mentioned the instruction and that
| wasn't the book I read in university.
| ChainOfFools wrote:
| > Not what is in the candidate's brain on the day of the
| interview.
|
| A close sibling of this mentality lives in academia as well,
| manifested as that professor who bases 50%+ of one's grade on
| the final. Also, pass/fail filtering exams (and the cultures
| that endorse them) generally, such as the MCAT.
| CBarkleyU wrote:
| About 80% of my grades in uni were 100% based on the
| finals. AFAIAA this is the norm for STEM in Germany.
|
| This was less true for my Master's and is generally less
| true for non STEM.
|
| I kind of liked it tbh
| protocolture wrote:
| I think the first edition he wants pulped is the book that got me
| through GAM302 Games Programming Math lmao.
___________________________________________________________________
(page generated 2024-06-06 23:01 UTC)