5 comments

  • aappleby3 hours ago
    FWIW, if you start with &quot;The view frustum is a 90 degree pyramid with the tip cut off at z = 1 and the &#x27;end&#x27; at infinity&quot;, you can then work out how to map that to a NDC using a matrix and perspective divide.<p>I&#x27;ve used that when teaching short &quot;Graphics 101&quot; (not in the first session though) and the math comes out more intuitive than the usual &quot;here&#x27;s how to calculate a perspective matrix, don&#x27;t ask where these numbers come from&quot; version.
    • psvv2 hours ago
      For me learning on my own, it was even illustrative to not use a near plane and see how things behind the camera would still appear in front of it.<p>A lot of 3D graphics can be derived pretty easily just from knowing a few basics like divide by depth. I think knowing how to construct a transformation matrix from a coordinate system basis is another one -- that would remove the need to look up how to construct a perspective matrix, for example.<p>A few things like that will get you pretty far and you can kind of take the same journey of discovery as early 3D pioneers. That&#x27;s one of the best ways to learn because you&#x27;re much more likely to remember something <i>you figured out</i> compared to something you just read about.<p>It gets tricky with perspective-correct textures, but running into issues like that on your own (even if not solved on your own) is part of the fun of learning, I think.
  • gabrieloc2 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!
    • dyarosla3 hours ago
      The visuals and sliders are great!<p>Maybe consider clipping the ball properly on the edges of the sides of the view frustum ?<p>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.
  • skzv48 minutes ago
    Awesome. To take this a step further, I used this math to turn 2D photos into 3D scenes with depth maps: <a href="https:&#x2F;&#x2F;blog.skz.dev&#x2F;3d-reconstruction-from-public-photos" rel="nofollow">https:&#x2F;&#x2F;blog.skz.dev&#x2F;3d-reconstruction-from-public-photos</a>
  • TN1ck2 hours ago
    The sliders are great UX on mobile, love the detail to attention.
  • xcafebabe3 hours ago
    [dead]