You are browsing as a guest. Sign up (or log in) to start making projects!

8h 44m 57s logged

3d is finally working!!!!! :yay2: :ultrafastparrot:


i have been having an epic samurai battle against opengl and 3d fractal math for what feels like forever, but it finally works, and I have a working 3d mandelbulb explorer!!!


i have actually been working on getting 3d working for the past multiple devlogs, it just took me sooo incredibly long to actually figure it out that i never really mentioned it.


the longest step was figuring out the controls. when i first started working on the 3d mode, then it was literally just a cube, and i had to figure out a good way to be able to rotate it

the hard part wasn’t even trying to figure out how to do the math to rotate the vertices, the hard part was trying to figure out how the thing should actually rotate

what i figured out how to do is having an orbit style camera, where dragging side to side rotates the model along its own local yaw, and then dragging up and down changes the camera’s global pitch. this way the model’s roll never changes (because that makes the model look tilted or skewed).

i had to spend an embarassingly long amount of time trying to figure the logic of an orbital camera…

the camera is also slerped (like lerping but 3d) so it feels smooth


color mappping on the 3d was actually surprisingly easy, i just did it in a very similar way to the 2d escape time ones, except with an extra dimension (its not as hard as it sounds)


one other major change was when i added the ability to add and remove gradient stops. this way, instead of always having 4 gradient stops, you can have anywhere from 2 to 16 stops, for more customizeability.


also, the readme is updated, go check it out! (and star the repo :prayer:)
https://github.com/swedishsplidney/fraktalized


below: video demonstrating the 3d and camera system

0
22

Comments 0

No comments yet. Be the first!