To edit scene (3D area), go to the objects sprite inside. WASD to move and arrow keys to look around. EQ to fly. Move cursor to left of the screen to change sliders. Pointerlock variable is for Turbowarp experiment only, ALWAYS HAVE THIS AT ZERO ON SCRATCH!! Use Turbowarp (I am not responsible for computers wrecked, blown up, burst into flames, or otherwise destroyed by not running on Turbowarp): https://turbowarp.org/1194794414 Tutorial for loading textured .obj files: https://scratch.mit.edu/projects/1194975710/ Add textures with this: https://xeltalliv.github.io/ScratchTools/Img2list/#dc1 The size of a billboard is how tall it will in be in 3D considering that it's 2D height is 250 pixels. Press F to see all the textures in a scene. Models must be loaded, and pressing F will stop rendering. Press R to export the scene (only solid color triangles) If you set resolution to 0, it will auto set the textured triangle resolution based on distance to camera. Render sky variable options: 0 = don't render sky or ground 1 = render noon sky and ground 2 = render sunset and ground Do you want to import an obj file? Click see inside, and show the lists "obj data" and "obj.mtl". Next right click and select import. Turn off filters and select files. Import complete! Don't have an mtl file? If the obj does not use the "usemtl" tag, then you can use the "create material" block in place of the "import mtl" block. These are under the block definition "update objects".
Please use with credit! Music is from Farming Simulator 18 by Giants Software. The game is now free on Google Play! "DS D Si - Mario Kart DS - Standard MR" (https://skfb.ly/6VMzS ) by Creationed2020 is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/ ). Transform point, add 3D triangle, set pen color to RGB, calculate distances, and set p to xyz blocks are by . 3D projection blocks are by . The triangle filler was created by and . I looked at 's engine to find how to detect points behind camera. for the binary insertion sort. FPS counter inspired by the one in by . The rotation functions used are by . The textured triangle filler is by . for some math for billboard size. for the Z-clipping case blocks from 's tutorials. made the STTF filler. (not used) Thanks to for letting me know that UVs are clipped in the same way as X and Y I followed 's tutorial for sorting here Big thanks to . CodingBio's tutorials on 3D really helped me learn about 3D, as well as looking at the code in the last demo in part 5 of the series (This helped with putting some blocks in). Backface culling uses matrices as I found here: https://math.stackexchange.com/questions/1324179/how-to-tell-if-3-connected-points-are-connected-clockwise-or-counter-clockwise Changelog: 5.5.3 - Uses modified updated version of my tri filler 5.5.2 - Music is now from Farming Simulator 18 5.5.1 - (Hopefully) Fixed long known error where it incorrectly loads, and puts a bunch of billboards where vertices are supposed to be. V 5.5 - Added Z-clipping! Works with textures too! V 5.4.1 - Uses my Dolphin Triangle Filler! V 5.4 - Fixed distance scaler for billboard size, borrowed math from V 5.3 - Fixed inputs to textured filler to correct the perspective. V 5.2 - Re-added .obj loader quad support (hopefully) that was taken out when I added UV support. V 5.1 - UVs in objects sprite now go from 0 to 1, added user friendly comments in objects sprite, made moving scenes less taxing on computer power. (Shown by ground again updates with render sky variable). Also added Smart Res - Adjusts resolution based on distance to camera. V 5.0 - 7/4/25 - New textured filler with UVs, and I allowed obj loader to load textures! 7/5/25 - Changed .obj example to standard kart from Mario Kart DS. Added background music by . 7/14/25 - Added feature to see all textures in scene. V 4.1 - Fixed some issues with file loaders, most notable is obj loader now supports the o tag, allowing model to be cut up in different sections in more advanced software. Also fixed exporter exporting backwards. V 4.0 - Textured triangles! Thank you for the awesome filler! NOTE: Don't go crazy with textured triangles in a scene, because it will run slow with too many (even on Turbowarp), an example is my version of Minecraft. V 3.6 - Moved all objects related stuff to separate sprite, obj loader is a easier to use. V 3.5 - Added wireframe options, sliders are on the left now and only show if your cursor is there. V 3.4 - Added billboards, arranged objects in example scene to better show the engine's capabilities. V 3.3 - Added my collision system (Just here for other people making projects with the engine.) V 3.2 - Added IMPORTING of mtl files. V 3.1.2 - Now .obj exporter exports an mtl file with it, meaning that color is saved too. V 3.1.1 - Fixed issues with exporter exporting faces backwards (Making some programs cull faces incorrectly) V 3.1 - Added scene exporting, press R to export the scene as a wavefront obj file V 3.0 - Added backface culling V 2.2.1 - Adjusted control sensitivity, as suggested by V 2.2 - Readded constantly updating objects, because Scratch seems to be able to run it somewhat fine, and runs great on Turbowarp V 2.1 - Added rotation for the .obj importer V 2.0.1 - Added pointerlock support for a Turbowarp experiment V 2.0 - Coded an obj importer! Had to remove constantly updating objects, as I don't want to load the .obj every frame. V 1.4 - Added ellipses! The engine now supports ellipses, but they look weird from some angles. The ellipse filler is shared on my test account V 1.3 - Added constantly updating objects, made ground as an example of how this can be used. The ground only shows if you are rendering sky. V 1.2.1 - Refined sunset skybox. V 1.2 - Sorting now works! Turns out I was using the wrong variable in the calculate distances block. V 1.1 - Tried to add sorting from 's fourth tutorial, but it doesn't seem to be working at the moment. Added skybox. V 1.0 - First version, working but needs z-clipping and sorting.