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

Endless German Monster

by JBurgers87

Project thumbnail
View Project

FNF sonic test

by gamerSCRATCH12345678

Project thumbnail
View Project

Warrior Project beat up a villager super more buttons remix

by Lestat1025

Project thumbnail
View Project

Super Numberblocks Maker 3 - A Platformer Creator

by emilp1706

Project thumbnail
View Project

treasure hunter1 Reel the end update

by RomanSoman2013

Project thumbnail
View Project

Beat Up Profile X (1)

by JPPORTUGAL

Project thumbnail
View Project

BEAT UP SUPER WHY!! fixed remix remix remix remix remix remix remix remix remix remix remix remix

by matheusmaccamargo

Project thumbnail
View Project

Whole World Turns Into Blank remix-2

by RayatRebranded

Project thumbnail
View Project

Rhythm What? Abgerny Kids

by Tcords2014

Project thumbnail
View Project

피젯스피너- fidjet spinner

by walkerking789

Project thumbnail
View Project

Scratchers' RPG [BETA 3]

by superpi2

Project thumbnail
View Project

Project

by Twin138956Scratch

Project thumbnail
View Project

H.A.T.N.O

by Raccoon228

Project thumbnail
View Project

Bloons TD 6 (Custom Towers, Maps, Bloon Skins and Heroes Edition) VOTE FOR NEW MONKEYS

by reflectorgenie

Project thumbnail
View Project

Sustainable City Builder

by ConConDev

Project thumbnail
View Project

「ブレイジングスター」

by cosmo-zero

Project thumbnail
View Project

JINX BOSSFIGHT REDUX (NEW FIGHT UPDATE)

by CEOofobamiumresearch

Project thumbnail
View Project

Night Hope sans fight (phase 1) old

by tororo_kun

Project thumbnail
View Project

Polish alphabet lore

by MolkSolsuda

Project thumbnail
View Project

Beat Up Umbrella (Modern) Part 2

by maxks_maxks

Project thumbnail
View Project

Scratch Effects Use Old Vyond Effects remix

by juliescott12

Project thumbnail
View Project

Angry Birds Level Editor remix

by Flynn444

Project thumbnail
View Project

Nuclear Reactor Simulator

by ph20161011

Project thumbnail
View Project

fnf sPam

by maximumjax