3D Graphics OpenGL V3

3D Graphics OpenGL V3

by PianoApprentice

👁 6,937 ❤️ 383 ⭐ 342 🔄 3
Created: Aug 12, 2021 Last modified: Aug 27, 2021 Shared: Aug 12, 2021

Description

Been a while, eh? My goal for this project was to build a 3D graphics engine in scratch in the same way that it is done in OpenGL, a standard for 3D graphics. This meant doing things like matrix math, z-buffers, and 4D homogeneous coordinates - things that normally aren't used for 3D scratch projects. Most 3D scratch projects (https://scratch.mit.edu/projects/118602500/ for example) use the painter's algorithm to draw their scenes (see https://en.wikipedia.org/wiki/Painter%27s_algorithm), drawing polygons one at a time, from back to front. Because of it's speed, the painter's algorithm is the best way to do 3D for scratch, but there are limitations (see the wiki article). Because of that, real 3D graphics programs instead rasterize polygons into individual pixels, and draw the scene pixel by pixel. This allows for textures, smooth shading, intersections, and other features that are hard to do when drawing triangle by triangle. Unfortunately, pixel based drawing is very slow in scratch. Many computers use the GPU to speed up the whole process, hardware that scratch can't utilize. If you're interested, here's some more info on OpenGL and 3D computer graphics: https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/overview-rasterization-algorithm https://learnopengl.com https://www.khronos.org/opengl/wiki/Rendering_Pipeline_Overview Credits: https://opengameart.org/content/urban-skyboxes https://sketchfab.com/3d-models/pixel-low-poly-spaceship-eaad1ae4bf6a43fd9f3a80400dacbbfd

Instructions

- try turbowarp: https://turbowarp.org/560149534 - WASDQE to move & arrow keys to turn - Z to toggle skybox - C to toggle metallic material that reflects the skybox - X to switch between models. A number of comments noted how the monkey looks creepy (I agree), so I added a spaceship too. If you want to import your own 3D model, texture, or skybox, see the import sprite's costume. The current model is a lower-poly, textured version I made of Suzanne from Blender.

Project Details

Visibility
Visible
Comments
Enabled

More Cool Projects

Project thumbnail
View Project

beat up bowser updated

by cclarecoderreturns

Project thumbnail
View Project

Fast Food Clicker! - 1.17

by Camoboyplayz

Project thumbnail
View Project

Undertale Battle Simulator -- Genocide Undyne

by titan4512

Project thumbnail
View Project

Numberblocks Sprite Pack: DodecaD12's Big G5 Aury-Styled NB Sprite Pack!

by DodecaD12

Project thumbnail
View Project

Twisty Tower

by Castle_Hippopotamus

Project thumbnail
View Project

Beat Up p head effects Kit Jumpscare

by juliescott12

Project thumbnail
View Project

Tile Scrolling Game #games #music #sounds #art #games #scrolling #platformer #mario #tile #all

by Ninja101020

Project thumbnail
View Project

Underfell: Asgore Fight

by darkmatterishere

Project thumbnail
View Project

Typing Endless Reader (english game) remix

by Alpha-Ayaan

Project thumbnail
View Project

Numberblocks Intro REMADE (FIXED)

by elinery

Project thumbnail
View Project

See You Again | Lyrics

by -Cortana-

Project thumbnail
View Project

I wanna Kill The HB2

by Hanabi_iw

Project thumbnail
View Project

dementia v2.0

by iamscratchlol96

Project thumbnail
View Project

beat up bella the wolf! (OLDEST VERSION) some of the buttons not working

by thegod56756

Project thumbnail
View Project

Coptic Alphabet Lore Song

by JianCGAnimationFan

Project thumbnail
View Project

Chaotic time trio R_Flash Ver.

by R_Flash

Project thumbnail
View Project

NBA 2K 23

by Sports_crazy43

Project thumbnail
View Project

Endless alphabet letter

by yfyguug

Project thumbnail
View Project

Peppa Pig Gets Grounded 5

by TMD-Plus

Project thumbnail
View Project

Ships

by RobFarley74

Project thumbnail
View Project

[SH2]史縫 悲想懺悔 ~ Death Means

by AT-8

Project thumbnail
View Project

Add A Button to Beat Up Boyfriend! (3)

by BASE098

Project thumbnail
View Project

Devil May Cry: On The Edge Of Death™

by Vergil_Sparda123

Project thumbnail
View Project

Knife Hit Scratch Remake #games

by orchardpupil32