You can check out ShapeUp In the Browser
Created for Wheel Reinvention Jam 2023. Traditional 3D programs are staggeringly complex and difficult to learn. I wanted to see what it would be like to use constructive solid geometry (CSG) to remove the need for the user to understand vertices, faces, and all the various operations you can do to them. By placing shapes in space, you can create both organic and mechanical shapes, the way a child might play with blocks.
The program supports additive and subtractive rounded cubes, which lets you create spheres, capsules, and cylinders (via subtracting off the capsule ends). Other shapes can be manually created with a combination of shapes and modifiers. ShapeUp also supports smooth addition to create organic models, and mirroring to create symmetric models. Once you're done with your work, ShapeUp can export the model as an .obj file.
A Wrench Modeled in ShapeUp
I experimented with various editing methods: setting values in the property inspector, grabbing gizmo handles, and keyboard controls for 'G'rab/'S'cale/'R'otate in the 'X'/'Y'/'Z' axis. I watched people not familiar with 3D programs use ShapeUp to see how easily CSG came to them.
I had originally intended to allow creation of constructive solid geomtry graphs. I imagined users forming groups of groups, with groups potentially each having different modifiers on them. After getting into the project, it became clear that this approach wouldn't yield an easy to use 3d modeler, even if it is "cool" in a programmer sense, for reasons I will now discuss:
There are a few things I learned for making a truly approachable 3D program:
- Having a figma-style object list that you can go back and tweak is not great. It's hard to find the object you want in the layer list, and clicking directly on an object to select it gets more difficult the more complicated your model becomes.
- Early Users weren't thinking in terms of boolean operations of a graph, they were thinking in terms of "I want 'more' or 'less'", like a sculptor. It'd be better if adding and removing a shape was treated as immutable actions instead of an editable graph.
- I personally found the keyboard shortcuts to be the most efficient, but it was the hardest to newcomers to learn. Using a richer input method, such as motion tracked controllers in 3D space would be more natural.
- New users find controlling the camera hard. Classic "non-gamer looking at the ground in a First Person Shooter" situation. Modeling in VR would fix this.
From a technical perspective, this was my first time using raylib or implementing a GUI with an immediate mode API. I was amazed at how productive I was with both. I definitely want to explore using IMGUI for my day job, though I was disappointed in the quality of the user experience in existing imgui libraries both in terms of visual styling and functional usability – they all feel like internal debug UI libraries.
The Signed Distance Field visualized
The renderer is an "Inigo Quilez" style ray marcher rendered in a single quad. This approach let me have a working renderer very quickly, but ultimately it wouldn't scale beyond a proof of concept. For future work I would explore other techniques for doing constructive solid geometry that can handle practically unlimited shapes. Whenever a shape is added or removed, the shader source is regenerated and recompiled. As an optimization, I had the currently selected shape use uniforms for its properties (position, size, rotation, color, etc), so that it could be edited without recompiling the shader. All unselected objects have hardcoded values.