NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Divide by Depth for Instant 3D (gabrieloc.com)
aappleby 36 minutes ago [-]
FWIW, if you start with "The view frustum is a 90 degree pyramid with the tip cut off at z = 1 and the 'end' at infinity", you can then work out how to map that to a NDC using a matrix and perspective divide.

I've used that when teaching short "Graphics 101" (not in the first session though) and the math comes out more intuitive than the usual "here's how to calculate a perspective matrix, don't ask where these numbers come from" version.

gabrieloc 2 days ago [-]
Hi! I wrote a few notes on how 3D cameras work with interactive examples to hopefully demystify a pretty complex topic that I once struggled with. Maybe this is useful for someone here, and if not, there are fun sliders to play with!
dyarosla 37 minutes ago [-]
The visuals and sliders are great!

Maybe consider clipping the ball properly on the edges of the sides of the view frustum ?

Similarly the near and far could also be clipped; i know this is not true of the math necessarily but is the expected result in 3d graphics applications.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 21:24:00 GMT+0000 (Coordinated Universal Time) with Vercel.