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

FNF - Whitty Definitive Edition

by chucky_lee

Project thumbnail
View Project

超改良版ドラゴンクエストダイの大冒険タイピング~ゴメちゃんのパワー~-2

by DDIYY

Project thumbnail
View Project

青の塔DX とらいあんぐる青鬼編

by sakaryuu

Project thumbnail
View Project

LOST CAUSE- (FNF)

by marten_mad

Project thumbnail
View Project

球体

by hclhcl

Project thumbnail
View Project

speedhack test

by TheAngryTriplet_

Project thumbnail
View Project

Pocket Ants: Colony Simulator v0.012

by Timka35

Project thumbnail
View Project

The Right Hand Man Collection v1.01

by RightHandMan-

Project thumbnail
View Project

FNF - Weekend 1 (VS DARNELL)

by chucky_lee

Project thumbnail
View Project

触れた色ブロック(無駄)

by bsahd

Project thumbnail
View Project

Space Fight ☁ (Team Multiplayer)

by KIKOKO_

Project thumbnail
View Project

Battle Cats Enemy's

by TheGamer3675

Project thumbnail
View Project

動画制作キット

by R1NFJHS2103_1

Project thumbnail
View Project

Bad Time Trio

by xXCrystalSnowXx

Project thumbnail
View Project

ADOFAI - Neo Cosmos T1EX

by munet

Project thumbnail
View Project

Firey Comics Remastered: Part 2

by Yellow_Marshello40_2

Project thumbnail
View Project

ZoomQuilt 2

by RokCoder

Project thumbnail
View Project

Geometry Dash Level Editor 2.2

by crab218

Project thumbnail
View Project

無理ゲーじゃない

by pi10e10n

Project thumbnail
View Project

REMAKE Lucky Block Mod Paper Minecraft (English version) #game

by Oldcoinmania

Project thumbnail
View Project

Numberblocks Band Quarters 5 (My Version)

by TheReturnOfJog

Project thumbnail
View Project

Intro Template

by Intro-outro-PERSON

Project thumbnail
View Project

pokemon battle

by fuutt

Project thumbnail
View Project

Overtaken Intro (NEW OBJECT SHOW)

by MegaGameAnimator