Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » SUPER Efficient 3D rendering!
- Frisk-256
-
Scratcher
70 posts
SUPER Efficient 3D rendering!
It is possible to render high detail 3D fractals in scratch with an implementation of ray marching/sphere tracing, if you do not know what that is, here is a video explaining it
https://www.youtube.com/watch?v=svLzmFuSBhk
It can be implemented in scratch and can make amazing results, the basic idea can be summed up by this pseudocode
https://scratch.mit.edu/projects/878955175/
https://scratch.mit.edu/projects/883814808/
This method is very powerful, and if you use it, please give me credit for it, have fun!
https://www.youtube.com/watch?v=svLzmFuSBhk
It can be implemented in scratch and can make amazing results, the basic idea can be summed up by this pseudocode
for each pixel:: hat controlI have 2 projects that implement this method to make 3D fractals, here are the links
set [ray pos v] to (camera location)
set [ray direction v] to (pixel location)
set [Iteration v] to (0)
rotate [ray direction v] by (camera rotation):: motion
repeat until <<ray escapes::sensing> or <(distance estimator)<(lower threshold)> or <(iteration)>(max iterations)>::operators>
Set [distance estimator v] to (distance to scene::sensing)
change [ray pos v] by ((ray direction) * (distance estimator))
change [iteration v] by (1)
end
if <<ray escaped::sensing> or <(iteration)>(max iterations)>::operators> then
set [pixel color v] to (object color at [ray pos v]::sensing)::pen
else
set [pixel color v] to (background color at [ray direction v]::sensing)::pen
end
https://scratch.mit.edu/projects/878955175/
https://scratch.mit.edu/projects/883814808/
This method is very powerful, and if you use it, please give me credit for it, have fun!
- DifferentDance8
-
Scratcher
1000+ posts
SUPER Efficient 3D rendering!

Really cool actually, I have no idea why this isn't talked about more.
- meunspeakable
-
Scratcher
100+ posts
SUPER Efficient 3D rendering!
Really cool actually, I have no idea why this isn't talked about more.Because it has very limited uses. It is only usable on simple geometries such as cubes, spheres, capsules, ect. More complex scenes can't be rendered at comparable speeds, excluding fractals or other repeating patterns.
- __Falcon-Games__
-
Scratcher
1000+ posts
SUPER Efficient 3D rendering!
Turbowarp raises it's hand…Really cool actually, I have no idea why this isn't talked about more.Because it has very limited uses. It is only usable on simple geometries such as cubes, spheres, capsules, ect. More complex scenes can't be rendered at comparable speeds, excluding fractals or other repeating patterns.
- meunspeakable
-
Scratcher
100+ posts
SUPER Efficient 3D rendering!
My point still stands.Turbowarp raises it's hand…Really cool actually, I have no idea why this isn't talked about more.Because it has very limited uses. It is only usable on simple geometries such as cubes, spheres, capsules, ect. More complex scenes can't be rendered at comparable speeds, excluding fractals or other repeating patterns.
- Frisk-256
-
Scratcher
70 posts
SUPER Efficient 3D rendering!
Griffpatch could only do about 7 spheres. I can do trillions, I wonder what he could do given this method.Really cool actually, I have no idea why this isn't talked about more.Because it has very limited uses. It is only usable on simple geometries such as cubes, spheres, capsules, ect. More complex scenes can't be rendered at comparable speeds, excluding fractals or other repeating patterns.
- Steve0Greatness
-
Scratcher
1000+ posts
SUPER Efficient 3D rendering!
Griffpatch could only do about 7 spheres. I can do trillions, I wonder what he could do given this method.IDK, remake Quake?
- Frisk-256
-
Scratcher
70 posts
SUPER Efficient 3D rendering!
is it spelled Opac3tyD?Griffpatch could only do about 7 spheres. I can do trillions, I wonder what he could do given this method.IDK, remake Quake?
- Steve0Greatness
-
Scratcher
1000+ posts
SUPER Efficient 3D rendering!
so is anyone going to talk about how groundbreaking this is?How groundbreaking what is? This quote spam, or the efficient 3D rendering?
- NFlex23
-
Scratcher
1000+ posts
SUPER Efficient 3D rendering!
Forgive my ignorance, but how is this any different from a renderer like this, for example: https://scratch.mit.edu/projects/532971692/
Yours does not seem any faster than a normal 3D renderer, in fact it is very slow at higher resolutions, especially when not using TurboWarp.
Yours does not seem any faster than a normal 3D renderer, in fact it is very slow at higher resolutions, especially when not using TurboWarp.
- meunspeakable
-
Scratcher
100+ posts
SUPER Efficient 3D rendering!
Forgive my ignorance, but how is this any different from a renderer like this, for example: https://scratch.mit.edu/projects/532971692/I believe the OP was showing the potential of raymarching, especially for fractals. This is the same technique used in your project. It is slower than a normal 3d raycaster, but not for fractals and the like.
Yours does not seem any faster than a normal 3D renderer, in fact it is very slow at higher resolutions, especially when not using TurboWarp.
- -B0NEKING999-
-
Scratcher
27 posts
SUPER Efficient 3D rendering!
i have no clue why im here i am garbage at coding
- Frisk-256
-
Scratcher
70 posts
SUPER Efficient 3D rendering!
(excess characters removed by moderator - please don't spam)
The 3D renderingso is anyone going to talk about how groundbreaking this is?How groundbreaking what is? This quote spam, or the efficient 3D rendering?
Last edited by Paddle2See (Oct. 10, 2023 20:13:24)
- -B0NEKING999-
-
Scratcher
27 posts
SUPER Efficient 3D rendering!
i feel like this whole thing has turned into frisk arguing that he can make a better 3D engine and everyone just saying “nah bro”
- meunspeakable
-
Scratcher
100+ posts
SUPER Efficient 3D rendering!
i feel like this whole thing has turned into frisk arguing that he can make a better 3D engine and everyone just saying “nah bro”I have no doubt that he can make an amazing raymarching engine, but It's not applicable to much other than fractals and infinite repeating patterns(Or if you want soft shadows easily). Raycasting or Rasterizing is faster for most things, such as 3d games.
You can't compare pathtracing(https://scratch.mit.edu/projects/425020125/):Griffpatch could only do about 7 spheres. I can do trillions, I wonder what he could do given this method.Really cool actually, I have no idea why this isn't talked about more.Because it has very limited uses. It is only usable on simple geometries such as cubes, spheres, capsules, ect. More complex scenes can't be rendered at comparable speeds, excluding fractals or other repeating patterns.

with raymarching(https://scratch.mit.edu/projects/413215476/):

Even if you want to make raymarching look really realistic, it's going to be a whole lot slower than other methods(raytracing/pathtracing)
- Frisk-256
-
Scratcher
70 posts
SUPER Efficient 3D rendering!
I actually just made a new project with Sphere tracing, here is the link, it is a 3D model of the earth and at lower resolutions, it can be real time even without turbowarp, here is the link!
https://scratch.mit.edu/projects/907862335/
https://scratch.mit.edu/projects/907862335/
- Frisk-256
-
Scratcher
70 posts
SUPER Efficient 3D rendering!
I am not doing any more quoteception, because it is a bad idea
- Discussion Forums
- » Advanced Topics
-
» SUPER Efficient 3D rendering!