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

Roobiks - A 3d software rasterizer

  • 13 Devlogs
  • 30 Total hours

A 3d rendering graphics engine made with javascript and html5 canvas, demonstrating a rubiks cube model with actions built on top, and also a penguin

Ship #1

I made a 3d rasterizer in Javascript using the HTML5 canvas API! This whole project was inspired by TScoding's projection formula. The name roobik's just happened to be there. The rubiks cube is NOT my project, i repeat the rubiks cube is NOT my project. Its just a demonstration of a renderable Mesh, (Alongside the penguin model too)

  • 13 devlogs
  • 30h
  • 17.09x multiplier
  • 512 Stardust
Try project → See source code →
Open comments for this post

1h 17m 4s logged

I finally added the last bit of optimization with some binary color storing and magic tricking, i think this is the end of the line for my project as i see no further addition than some ui/ux which i dont wanna do for a project thats already this complex. i spent a LOT of time documenting everything, so that anyone reading the source code gets an idea of whats going on. Also added comic sans for a jolly effect with a HUD.

0
0
7
Open comments for this post

2h 56m 23s logged

I finally implemented a better UX system, with customizable keybinds, actually usable buttons! (yay), a fps bar and also HUGE optimization change. (i just found out the bayecentric coordinates could be incremented instead of manual addition), the renderer is now comfortably rendering a complex penguin at ~60fps which has 323 vertices and 625 faces.

0
0
4
Open comments for this post

3h 6m 8s logged

I implemented a wireframe drawing method to my software rasterizer and also implemented front face culling (front face culling too a LOOONG time to implement due to the tedious maths) ive also documented how everything works so anyone can understand whats going on. With the drawWireframe theres this weird ghostly effect going on and thats what im hoping on solving next

0
0
3
Open comments for this post

1h 0m 10s logged

I added some buttons for a better user experience, with keybinds and such. also i implemented a scrambling technique which generates a 20 move based random assortment. The ive also optimized frame waiting, with delay based Promises which wait check every frame before inputting the move to be displayed with solve or scramble. (i tested if user interruption changes anything and gladly it did not for scramble, but i have to fix the unsolvable problem if user interrupts when solving the cube)

0
0
4
Open comments for this post

2h 56m 50s logged

Ive finally added some rubiks cube qol features like resetting the cube and solving it! (for now im just reversing the users steps as using an actual alogrithm would be out of scope of this project.), and im planning on documenting the remaining parts

0
0
4
Open comments for this post

3h 5m 21s logged

Hello everyone, Ive upgraded my code to work with canvas to use the canvas method .putImageData, as ive now implemented triangle rasterization, and something very interesting called as z-indexing. Basically, every frame all pixels of the canvas are being controlled by the renderer to draw stuff instead of relying on the canvas methods like fillRect, etc! Ive also optimized the entire renderer to work well and fix any buggy areas too, but some more optimization is possible, and im thinking of continuing from there. I think im gonna add some UI/UX components later on but for right now im gonna optimize the renderer more! also, the live demo is up and running! check the current progress out at: ++++++++++++++++++++++++++++++++ https://arkaive19.is-a.dev/roobiks/ ++++++++++++++++++++++++++++++++ have a nice day and stay tuned for the next update!

0
0
3
Open comments for this post

3h 26m 26s logged

I finally finished the rotation cycle and documented the entire process inside my scripts. The rubiks cube works and also animates now! also i fixed the backface culling issue, and the animations are fixed and crisp! I think im gonna add some qol features like enhance my current camera reframe to also reset the cube and make it a general reset, and also add some physical buttons or sum like that. With the current state of things i might wrap it as a electron app as its not designed to be mobile friendly.

0
0
3
Open comments for this post

32m logged

I finally implemented PROPER mesh rendering. before i had to flatmap and insert each model vertices, edges and faces in 1 giant pile for computation but not anymore. it does that internally so all i need to do is

renderer.startFrame();
renderer.drawMesh(cat);
renderer.drawMesh(dog);
renderer.drawMesh(bug);
renderer.endFrame();

Bug fixing was really tough because of optimization errors and whatnot, but changing basically all my arrays to Float32Arrays gave me an extra 100 frames 💔🥀🥀

0
0
2
Open comments for this post

2h 1m 37s logged

Ive made some changes to the 3d graphics changer where the painters alogorithm stopped working with multiple meshes. For now, ive flatmapped all points edges and faces of the multi meshes so its just 1 giant mesh that has to be rendered! (I think my system will break if i use another instance of drawMesh() somewhere else as theyre not flatmapped. I think thats the problem ill try to solve next)

0
0
2
Open comments for this post

4h 31m logged

Ive been wanting to learn how 3d renderers have worked for the longest time, and recently i thought of making an app for it. Roobiks is an freecam 3d space rubix cube sandbox like software, that is built ENTIRELY on a 2d canvas using nothing but pure mathematics, and HTML5 canvas properties.

0
0
2

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…