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 X Button

by crazycrazybaby17

Project thumbnail
View Project

ONE NIGHT AT BONNIES

by sonicfan_2

Project thumbnail
View Project

Interactive Ami Onuki But something is wrong

by wiggler174

Project thumbnail
View Project

Leon Eating A Meat

by thiagobri

Project thumbnail
View Project

windows xp virus simulator

by kaiswim1

Project thumbnail
View Project

γƒ’γ‚«γƒžγƒ‹

by NS2140012

Project thumbnail
View Project

Among Usγ‹γγ‚Œγ‚“γΌ γ‚«γ‚¦γƒ³γƒˆη΄ ζ:Among Us Hide and Seek Counting Material

by omocra

Project thumbnail
View Project

Colourblocks Band Added two new characters

by ilovescratch1234500

Project thumbnail
View Project

Minecraft Platformer! (Mobile Friendly) #games

by SIGMABRO1

Project thumbnail
View Project

Sprunki BUT OCS remix

by outfit7ymuchomas

Project thumbnail
View Project

Among Us freeze tag/γ‚’γƒ’γƒ³γ‚°γ‚’γ‚Ήγ“γŠγ‚ŠγŠγ«γ‚ͺンラむン

by pocopocojohn

Project thumbnail
View Project

friday night funkin ruv vector trace battle

by GABRIELHABIB

Project thumbnail
View Project

jsab - level editor Ver . 2.1.0 Ξ²

by osatoudaisukich

Project thumbnail
View Project

Numberblocks Band Retro 301-310 (Band Version)

by Mecurn

Project thumbnail
View Project

UncannyBlocks Band (Super Different)

by supersonicmikhail720

Project thumbnail
View Project

γŠγ«γ”γ£γ“~Nightmare 13th~η¬¬δΌζ‹Ύε£±θ©±γ€Œθ™Žθ¦–ηœˆγ€…γ€

by tyomuko22

Project thumbnail
View Project

3D Minecraft _ V1.7

by MrGregDog

Project thumbnail
View Project

Performance monitor

by iab09

Project thumbnail
View Project

Orange OS 7

by yaveenSTEM

Project thumbnail
View Project

SAL characters beat up S!1!1!1

by fan_of_griffpatch13

Project thumbnail
View Project

Numberblocks Band 1-30 remix

by uiuhyui8jhui8h

Project thumbnail
View Project

alex jumpstart band meme happy birthday 2024 remix

by M_ayr-

Project thumbnail
View Project

Yakka dee!

by HEMPRIMP

Project thumbnail
View Project

bren319's Finnish Alphabet Lore

by Maks2010scratch