My 3D projection library for Uxn is complete!
Features points, lines, variable FOV, adjustable view frustum, screen space clipping, and 16 bits of precision, everything in around 4 kilobytes of bytecode.
My 3D projection library for Uxn is complete! Features points, lines, variable FOV, adjustable view frustum, screen space clipping, and 16 bits of precision, everything in around 4 kilobytes of bytecode. 24 comments
@bellinitte Autodesk kettle! 😱🥰 It was my first 3D drawing opened with AutoCAD 2.12 (2.4? 2.6? I'm too old... 😅 @tendigits thank you :) to be fair, size wasn't even my priority, but it's nice to see how little code it takes to do this. And what's funny is that a lot of it is related to line clipping; with points only, the entire library would be ~tiny~. @bellinitte Wow, this is amazing. I will dive into this today! :uxn: I've optimized the draw-line routine to do away with zp labels, and it's a bit faster too: I was wondering if you could add the sphere and teapot examples to the folder? An button to rotate around the cube would be good to have as well <3 @neauoire Let me know if you encounter anything that "looks off" :) I can extend the examples for sure! The thing about that teapot clip though, is that it's not real-time at all (it's sped up 8x), there's just too many edges to project. And also considering that the mesh is kinda huge, including it would be a bit awkward @bellinitte After a day of toying with this, I can report that this is FANTASTIC :moar: @bellinitte would you be willing to write on the tech details of all the theory behind this ? (what you needed to impl this pretty much) @Scarlet i'd love to, but not at the moment; I need some freakin rest from anything math-related lol. Anyway, that's a huuuuge topic that touches on fixed point numbers, numeric stability, 3D projection, line clipping, and all the stuff that's taken for granted when working with high-precision numbers @bellinitte Damn that is impressive, I keep looking at things people do in Uxn and wondering how it’s possible but this is on another level. I should really just give it a go one day and stop living in high level land… |
@bellinitte this is spectacular! 🤩 well done! 🎉