To edit scene (3D area), go to the objects sprite inside. WASD to move and arrow keys to look around. EQ to fly. Pointerlock variable is for Turbowarp experiment only (always have this at zero if not using experiment). Use Turbowarp if you have wits, or this will blow your computer to bits! https://turbowarp.org/1252864080 Tutorial for loading textured .obj files: https://scratch.mit.edu/projects/1194975710/ Add textures with this: https://xeltalliv.github.io/ScratchTools/Img2list/#dc1 Move your cursor to the left of the screen to change sliders. Now uses a Z buffer, so billboards and ellipses had to be cut out, but I don't think those are the most important things for 3D rendering. Render sky variable options: 0 = don't render sky or ground 1 = render noon sky and ground 2 = render sunset (lighting will still be top down) 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". 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/1227542010
Special thanks to @Eliguy12 for fixing an error in the find color of texture part of the filler, and to @maDU59_ for looking through my mess of code to fix the lighting! 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, and set p to xyz blocks are by . 3D projection blocks are by . I looked at 's engine to find how to detect points behind camera. FPS counter inspired by the one in by . The rotation functions used are by . The textured triangle filler that includes z buffer is by , shared by . for the Z-clipping case blocks from 's tutorials. Thanks to for letting me know that UVs are clipped in the same way as X and Y. helped fix lighting. for some helpful feedback on lighting gave me some list index to screen coordinate formulas, and wrote the code for finding surface normals. 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: (It's getting too long to put here)