Email or username:

Password:

Forgot your password?
charlie

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.

git.sr.ht/~bellinitte/pinhole

#uxn #theWorkshop

24 comments
charlie

@d6 I said it and i'll say it once again: I never would have even considered starting this project if you hadn't shown me that fixed points aren't such a complete mystery after all :uxn:

6uigons3

@bellinitte Autodesk kettle! 😱🥰 It was my first 3D drawing opened with AutoCAD 2.12 (2.4? 2.6? I'm too old... 😅

sejo

@bellinitte wow, this is amazing! :tealheart:
awesome work!

Tendigits

@bellinitte 4k! amazing work - and so visually impressive too.

charlie

@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~.

Devine Lu Linvega

@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:
git.sr.ht/~rabbits/catclock/tr

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

charlie

@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

Devine Lu Linvega

@bellinitte After a day of toying with this, I can report that this is FANTASTIC :moar:

$nyx: paw-socks sysadmin

@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)

charlie

@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

monoxane

@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…

charlie

@monoxane Try it, it's so rewarding :) not even in terms of being low-level, but more about knowing that in 20 years you'll be able to spin up your own little uxn machine, run the code, and say "Holy shit, did I make that?"

Potassium

@bellinitte That's rad! I expect that was difficult to do in assembly!

Go Up