W,A,S,D to move
R,F to go up and down
https://turbowarp.org/753555952/ for better perfs
How to import your models/objects:
1) Get a .obj file (from Blender or from internet)
2) Open it in your notepad then copy all the text
3) Go inside the project, go inside the "Objects" sprite and above the "When green flag pressed", drop a bloc "Import model | name: ..."
4) Add a name and put the text you copied into the input at the right of the bloc (⚠️don't touch at "lod distance" if you don't know what you're doing⚠️)
5) Go to the start message and in the loop, you'll find "render ..." blocks, duplicater one and change the 9 values (⚠️Don't remove the -camX, Y and Z blocks⚠️)
6) Press greenflag
How to import your textures:
1) Get the png of your textures
2) Convert it here:
https://xeltalliv.github.io/ScratchTools/Img2list/
3) Open the file in your notepad and copy it
4) Paste it into a "Import material" block and give a name to the texture (make sure you use the name used in the model code)! (⚠️don't touch at "no backface culling" if you don't know what you're doing⚠️)
5) Press green flag
I'll add collision boxes (other than just AABB, for now, only the grey box has collisions)
I plan to try do a racing game using this engine but before, I need to get it to be faster
Credits:
@TheGoodGuy8000 for object rotation, strecthing and optimization
@-Rex-Test- for his tri filler and his quicksorting
@nampinanathali for lod idea
@Bambozzle for his textured tri filler
V1 (2022/10/30): shared, 15fps on my laptop. Based on my optimized version of
@MathMathMath's tutorial so thanks to him
V1.1 (2022/10/31): Now, obj can be rotated and stretched, thanks to
@TheGoodGuy8000. Improved perfs, now 20 fps.
V2 (2022/10/31): Now not only wireframe, thanks to
@-Rex-Test- for his tri filler and his sort algorithm
V2.1 (2022/10/31): Added shading!
V2.2 (2022/10/31): Added backface culling, thanks to
https://www.youtube.com/watch?v=wpNef1Nu4pA
V2.3 (2022/11/02): Can now load obj form a string and not necessary a list. Support some materials.
V2.4 (2022/11/03): Added shading for ALL models (no need to add normals in the model, it calculate them). Added 2 semi-wireframe mode (both look like cell-shading). Added colors and shading
V3 (2022/11/03): Multi object support!!!
V3.1 (2022/11/03): Opti (shortened var names, removed 6 useless blocks, removed useless vars, added a blank sprite)
V3.1.1 (2022/11/04): Fixed some bugs
V4 (2022/11/04): Z CLIPPING!
V4.0.1(2022/11/04): Found some backface culling inaccuracies, added some basic colors to the materials
V4.0.2(2022/11/04): Now support quads in the obj file (it will mostly not works with concave quads)
V4.0.3(2022/11/04): Now support 5 sided polygons in the obj file (it will mostly not works with concave polygons)
V4.1(2022/11/05): Added level of detail (lod)! If you go far away, the monkey head model will change to a less detailled one (you wont see it) and you will get better perfs! Thanks to
@nampinanathali for the idea
V4.2(2022/11/05): Better backface culling
V4.3(2022/11/05): Added skybox
V4.4(2022/11/06): Added priority levels for the sorting
V4.5(2022/11/06): Added a render distance
V4.6(2022/11/10): Optimization :D
V4.7(2022/11/10): 2.5D sprites
V4.7.1(2022/11/11): Fixed skybox
V4.8(2022/11/11): Optimized clipping and wireframe
V4.8.1(2022/11/11): Optimized some more things (clipping and lod)
V4.8.2(2022/11/13): Added 3D audio
V4.8.3(2022/11/13): Now easier to use
V4.8.4(2022/11/13): Minor optimizations
V4.8.5(2022/11/13): Optimized "add to sort" block
V4.9(2022/11/26): Added textures! You can now import textured models! Thanks to
@BamBozzle and
@Vadik1 for their textured tri fillers! To convert png textures to str, use this:
https://xeltalliv.github.io/ScratchTools/Img2list/
V4.9.1(2022/11/26): Fixed a bug with textures in obj loader
V4.10(2022/11/27): Sigma engine, added UV clipping, fixed bugs, optimized textures, added an option to disable backface culling for a material
V5(2022/11/27): Added AABB collisions, try to enable collisions, the grey box has collisions!
V5.1(2022/11/27): Added 3rd person view
V5.2(2022/12/02): Made some optimizations
V5.3(2022/12/02): Added LOD for textured materials
V5.4(2022/12/09): Switched to
@Bambozzle new ultra fast tri filler, big thanks!
V5.5(2022/12/10): Big optimization for textured models
V5.6(2022/12/10): Added cell-shading (set wireframe slider to 2)
V5.7(2022/12/19): Fixed flipped model importation
v5.8 (2023/06/05): BIG optimisation when multiple models loaded
v5.9 (2023/06/16): Bounding box
Good 3D rasterization tutorials:
-
https://www.youtube.com/watch?v=ih20l3pJoeU (full 3D engine)
-
https://www.youtube.com/watch?v=wpNef1Nu4pA (backface culling)
-
@MathMathMath's one
#Sigma #Engine #SigmaEngine #3D #3DEngine