←back to thread

634 points david927 | 1 comments | | HN request time: 0.311s | source

What are you working on? Any new ideas that you're thinking about?
Show context
ianthehenry ◴[] No.41343357[source]
https://bauble.studio/ is a lisp-based procedural 3D art playground that I hacked together a while ago. It's fun to play with, but it's a very limiting tool: you can do a lot to compose signed distance functions, but there's no way to control the rendering or do anything "custom" that the tool doesn't explicitly allow.

So lately I've been working on a "v2" that exposes a full superset of GLSL, so you can write arbitrary shaders -- even foregoing SDFs altogether -- in a high-level lisp language. The core "default" raymarcher is still there, but you can choose to ignore it and implement, say, volumetric rendering, while still using the provided SDF combinators if you want.

The new implementation is much more general and flexible, and it now supports things like 2D extrusions, mesh export for 3D printing, user-defined procedural noise functions... anything you can do in Shadertoy, you can now do in Bauble. One upcoming feature that I'm very excited about is custom uniforms and embedding in other webpages -- so you can write a blog post with interactive 3D visualizations, for example.

(Also as a fun coincidence: my first cast bronze Bauble arrived today! https://x.com/ianthehenry/status/1827461714524434883)

replies(7): >>41343940 #>>41344253 #>>41344592 #>>41344707 #>>41344710 #>>41370918 #>>41405690 #
turtledragonfly ◴[] No.41344707[source]
Am I right that the output of the lisp code is ultimately a plain GLSL shader (like one might find on shadertoy.com)?

I built a SDF-based rendering system (2D) for my game, and one of the big hurdles was how to have them be data-driven, rather than needing a new shader for each scene or object.

Would be curious if/how you tackled that problem (:

replies(2): >>41344758 #>>41348840 #
1. ianthehenry ◴[] No.41344758[source]
Yep! It just outputs GLSL. It doesn't do anything smart -- it's a single giant shader that gets recompiled whenever you change anything, so it wouldn't really work for something like a game. I mean, it could handle like basic instancing of the form "union these N models, where N<256" but there's no way to change the scene graph dynamically.