Please sign in to access this page

3D renderer using nothing but turtle (for rendering) and math (for computing).

3D renderer using nothing but turtle (for rendering) and math (for computing). Used AI

34 devlogs
25h 11m
•  Ship certified
Created by emori

everyone’s obsessed with “real-time” rendering these days. ray tracing this, gpu acceleration that.
me? nah. i decided to make something slower. much slower.

introducing my 3d renderer, powered entirely by… python turtle. yes. the thing you used in school to draw squares.
it’s just me, a single turtle, and enough math to make a calculator cry.

no numpy. no c extensions. no cheating.
just pure, unoptimized, borderline-criminal python.

will it take hours to render a single frame? yes.
will it run out of memory halfway through a cube? also yes.
but you’ll feel every pixel being birthed. you’ll watch geometry emerge like a majestic, slow-motion nature documentary narrated by morgan freeman if he had dial-up internet.

i’m not promising speed.
i’m promising vibes.

Timeline

fixed a shadow bug that caused self-shadowing. very stupid mistake, costed me HOURS of rolling back code to see what i changed, and fixing stuff caused by the issue...
added precomputation for light bouncing. this also took me WAYY TOO LONG... caching is a stupid thing to get right. but hey, now you can set light_bounces to 100 and still run at 80fps, for the price of 4 seconds of precomputation at the start of the program
also, everyone welcome back captain hajjy back to the devlogs! you've been missed

Update attachment

light reflection!!
you might notice theres a lack of blahajs in my recent devlogs, thats cuz i dont want my pc to blow up rendering that many faces. sorry :pensive:

Update attachment

SHADOWS WORK NOW!!!
okokokokokok gonna set up a showcase scene and then update this :3

Update attachment

was touching some late-night grass when explorpheus hit me with a bombardment of messages!! so many follows!!!! and yet no payout yet..

Update attachment

textures were impawsible but i did make an audio engine, maybe for 3d spacial audio?

Update attachment

nah i change my mind no texture rendering sorry peeps, apparently just averaging the colors is gonna make it look horrible

all that work for nothing...
thats 3 features i cancelled

Update attachment

I DONE IT!! AAHAHAHAHA HAHAHAHAHA BAHAHAHAHAH I WROTE MY OWN IMAGE READE R IN VANILAA PYTHON ABHAHFHAHF DUH ISHE UU SUF PEFHWHF
im going insane send help

Update attachment

FAFOd with some precision related settings, found a suitable rounding precision...
any more optimization and im gonna have to write my own garbage collector

Update attachment

caching... :drool:
well now lighting is baked, kinda, sorta, its precomputed whatever same thing

Update attachment
emori
emori
1h 59m 2 days ago

added togglable caching, made lighting easier to calculate, did some memory optimizations. this gayhaj is the result of all that. I'm running out of things to do...

Update attachment
emori
emori
2h 29m 2 days ago

made the material and object lists into classes!

Update attachment

added some light points to show where the light emitting stuffz are, should also make everything more intuitive to understand :3

Update attachment

its now updated on github!
https://github.com/CastyLoz17/turtle_3d_renderer/releases/tag/v3
hopefully i get the shells sooner...

Update attachment

added some emmisive objects! very proud :3c

Update attachment

lighting is done!!
ambient lighting is sightly purple
red point light source on top
blue point light source on bottom
(yes bisexual lighting)
pink directional light source on snoot
turquise spotlight on tail
<3

Update attachment
emori
emori
1h 21m 4 days ago

after some time of claude failing, i decided to do more wikipedia research, and lo and behold the goat newell saves the day again!!
the problem is fixed now, just need to see if theres a purrformance impact on larger stuff

Update attachment

aight i give up, im just gonna claud this, thus the ai tag...
still not going to the point of vibecoding though :3cc very ethical and real programmer

Update attachment

was showing off my code to the silly council in discord vc
what is that hole in the stomach?

... fuuuuuuuuuuuuuuuuuuuuuuun welp time for more wikipediaing and debugging...

Update attachment

i did a thing.
well thats lighting. kinda. sorta. will update repos in a bit after i fix a few bugs...
this is going up onto iframe

Update attachment

made some lighting presets, so that everything dont just look flat (basically fancier fog)

Update attachment

made it so that all platforms can run this code (mouse dont work on mac)
technically should work now. i'll redo the repo later <3

Update attachment
emori
emori
1h 16m 5 days ago

made a renderer_mac.py that uses pynput instead of mouse, as mouse bugs out on mac. this STUPID MISTAKE delayed my cert, and i hate myself for not finding it. updated code on github now

Update attachment

oh yeah just realised i havent updated the git repo in a long time, here it is now

Update attachment

did some cprofiling, looks like im for once out of things to microoptimize... and now that skyboxes are cancelled time to make culling + lighting/shadows.
also im gonna be using the teapot model from now on

Update attachment

no skybox for you then... too buggy n laggy n stuff
welp thats two things down the drain today
... qwq

Update attachment

hi hi yeah so ok i made a texture engine and a skybox engine. its running at 2 frames per sometimes. i'll fix that. probably
paws at you paws at you paws at you paws at you

Update attachment

made some z buffering modes, but apparently turtle isnt the only bottleneck...
more info in image below, i'll research into other culling techniques that isnt cpu heavy <3

Update attachment

oh hi yeah cool thing, my script can actually render complex stuff now
reworked like half the code since i didnt like how everything was jank
time to do research on how im gonna make a skybox

Update attachment

after a bit of debugging and a bit more procrastination in #summer-of-making, ive finished the camera system with keyboard and mouse controls (WITH A LOT, by that i mean A LOT OF JANK)
i shall do more optimization tomorrow (as in when i wake up, because technically 12am is in 23 minutes as of writing this), but right now im so pumped and shocked that my scuffed script sorta kinda works
oh boy do i love wikipedia styled math equations...

p.s. used chatgpt for 10% of the script, cuz its too late fur me to be mathin. sorry.

guess what sillyheads, mountains of jank later (negating 27 sine functions so i dont have to write a mirror function, im definitely gonna feel the impact later), I GOT THE CAMERA WORKING
now, i just need to attach it to a keyboard and mouse like your normal first person view mode, and then its gonna be done
i also made a dynamic fps normalizer so my script always runs at 60fps (probably)

Update attachment
emori
emori
1h 12m 7 days ago

oh wow would you look at that, i have a cube and some simple functions for some movement now!!
left-right motion is by camera, the cube is moving up and down
oh yeah did i mention that the cube has color now? i made a function to load mtl files as well

emori
emori
1h 14m 8 days ago

hihihi well okay its out now yayy
anyways i added a obj file import thing
also added a drawing thing
i also just learnt that this has been done before... dam
oh well

Update attachment

Ship 1

0 payouts of shell 0 shells

emori

8 days ago

emori Covers 1 devlog and 15m

some time in and im done with the camera system
wikipedia, math stackexchange and geeks4geeks boutta be my best friend when i get to the mathing part of this

Update attachment