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

Alex's Dungan Lowercase Jumpstart Band

by Joseph_Griffin_2011

Project thumbnail
View Project

TurboWarp & forkphorus detector

by GarboMuffin

Project thumbnail
View Project

マリオVSルイージ 格闘ゲーム(二人プレイ)

by orenasu2017

Project thumbnail
View Project

トロッコアドベンチャー 

by bunkasaiyuusi

Project thumbnail
View Project

Added Numberblock 41 Button remix

by German0512

Project thumbnail
View Project

Geometry Dash 'do you love me?'

by sh3lt0n

Project thumbnail
View Project

Every ALBTWIAIOF letter before Z rewound time...

by SillyGooseReturns

Project thumbnail
View Project

PAPERMINE

by booglung

Project thumbnail
View Project

Untitled-2

by plsstopbanningme231

Project thumbnail
View Project

Edward Invites Isaac for doing exercise But Issac Will get Mad

by tatatino150

Project thumbnail
View Project

All The Interactive Endless Reader Words!

by alphafan40

Project thumbnail
View Project

d and q NEWS Jayjay1i09 v

by jayjay1i09

Project thumbnail
View Project

ZXNM but read the project instructions

by ktrav258

Project thumbnail
View Project

あすぽんころころⅤ

by asuponz

Project thumbnail
View Project

Jimmy's Minigames | v0.2

by DoogyPlayz705

Project thumbnail
View Project

Beat Up Camera Bubble (7)

by clubisback

Project thumbnail
View Project

Longest Animal Stampede remix remix-2 remix

by StrongAnimals13

Project thumbnail
View Project

Storyswap Last Dream Asriel fight (UNFINISHED)

by Natsuki_Dreemurr

Project thumbnail
View Project

Map zoom-in

by ibisJuan

Project thumbnail
View Project

Super Mario in Scratch hacked v1.1

by MineMario_64

Project thumbnail
View Project

(2024 YEAR) Beat Up Edward TV

by BEAT2022

Project thumbnail
View Project

Entry for t9decode 100% PEN イントロ

by nakakouTV

Project thumbnail
View Project

Beat Up Evilbross so so much

by tiguy2

Project thumbnail
View Project

NUMBERS 0 TO Ĩ̴͚̺͕̣̂͒̎̒̍D̷͕̫̹̘̭̾̄̐͐͆͝K̴͙͘ ̶̼̮̃̏L̵̩̾͋͑O̷̗̥͔̼̽̓̍́́͝͠͠L̸̢̡̼̰̤̘̳̏ : PART XXII

by TheCelestials