This is awesome. My current hobby project is getting 3D SDF meshing good enough so that I can use them instead of building out of meshes. I’m starting from marching triangles but it’s very much an open problem. Everything in JS, with the goal of building models in JS.
In some way, multicellular lifeforms (like a cherry tree or a human) also have to contain a kind of formulation like this so that they result in the fractals of branches and blood vessels as well as the overall structure.
shadertoy: given a pixel coordinate, write a function to return a color.
geotoy: write a function to return vertices
In shadertoy, to draw cube on a 1280x720 screen requires your function to be called 921k times. To draw a cube in geotoy requires your function to be called 36 times. That's over simplifying but saying one is fast and one is a slow is comparing atoms to balls. Shadertoy = describe every atom, geotoy = describe the shape. again, bad analogy I suppose, but the orders of magnitude difference are somewhat help explain why one is fast and one is slow (yes though, you can generate a geotoy that will be slow and a shadertoy that will be fast). Similarly describing every atom means you can describe fog or god rays or caustics etc. Describing the shape won't do that.
PS: I think geotoy is cool. nothing above is meant to detract from that. Just to explain, probably poorly
Unsolicited feedback: I think if rotation decelerated quickly to no velocity instead of instantly stopping when you let go, it would feel more natural.
I found this article also interesting (I believe also from the author, but correct me if I'm wrong):
https://cprimozic.net/blog/the-tech-behind-geotoy/#overview
This is awesome. My current hobby project is getting 3D SDF meshing good enough so that I can use them instead of building out of meshes. I’m starting from marching triangles but it’s very much an open problem. Everything in JS, with the goal of building models in JS.
Help me understand what this is - so it's like Shadertoy but no animation?
it's like a scripting language for 3D models (could call it a DSL, I guess).
Look at the "temple"-example, there it is easier to reason about than the more abstract objects:
https://3d.ameo.design/geotoy/edit/39
Reminds me a lot of the venerable structure synth: https://structuresynth.sourceforge.net/
I tried to give it a new life in https://ossia.io but it's decidedly not real-time friendly, maybe geotoy will work better for this!
This is fun - and really powerful.
In some way, multicellular lifeforms (like a cherry tree or a human) also have to contain a kind of formulation like this so that they result in the fractals of branches and blood vessels as well as the overall structure.
This runs a lot smoother than shadertoy does for me.
they are doing completely different things.
shadertoy: given a pixel coordinate, write a function to return a color.
geotoy: write a function to return vertices
In shadertoy, to draw cube on a 1280x720 screen requires your function to be called 921k times. To draw a cube in geotoy requires your function to be called 36 times. That's over simplifying but saying one is fast and one is a slow is comparing atoms to balls. Shadertoy = describe every atom, geotoy = describe the shape. again, bad analogy I suppose, but the orders of magnitude difference are somewhat help explain why one is fast and one is slow (yes though, you can generate a geotoy that will be slow and a shadertoy that will be fast). Similarly describing every atom means you can describe fog or god rays or caustics etc. Describing the shape won't do that.
PS: I think geotoy is cool. nothing above is meant to detract from that. Just to explain, probably poorly
Unsolicited feedback: I think if rotation decelerated quickly to no velocity instead of instantly stopping when you let go, it would feel more natural.
This is cool! @OP, are you the creator of Geoscript? I've never heard about this anywhere else before.
This wowed me in the same way when I saw GLSL for the first time. What is Geoscript??? I love this.
Is it possible to create animations using something like Shadertoy's `iTime`?
Looks kinda like Rust? How similar is this to geometry shaders?
Quite different, but also geometry shaders have fallen from grace for quite awhile because it turned out to be practically impossible to optimize them
Geometry shaders have been replaced by mesh shaders, which are way more powerful as they can output any kind of geometry.
How is the material defined?
It's not done via code, you can find the materials in the burger menu, top right corner of the console, in bottom right screen corner.
The article I linked in another post here describes that it's all done with triplanar mapping, so no UV's involved.
Now we just need Rigtoy, Animtoy and Rendertoy and we'll be able to make beautiful 3D animations in the browser
Have you heard about cables.gl or tooll3? Those have quite impressive end to end motion graphics capabilities.
You mean we can't now?
https://holtsetio.com/lab/chromeBallet/
https://holtsetio.com/lab/flow/
https://threejs-journey.com/ (click the up arrow next to "Level 1" at the bottom center)
If you want to make them oldschool, there's turtleSpaces Logo:
https://turtlespaces.org/weblogo
We're in the midst of upgrading to three.js with all that it offers (materials, shadows, etc.)
I already built rendertoy a rendering engine to make hd videos from the browser.
https://www.youtube.com/@rendertoy4656
this website still uses shaders its just a button called materials after clicking the 3 bars in the bottom right of the screen
That is the only thing modern GPUs understand, so naturally it still uses them.
I see this as a higher level DSL for modelling, instead of doing something like SDF by hand.