I’ve recently worked on creating a custom rounded geometry component and I wanted to figure a way to create a generalized UV mapping solution. I failed miserable, of course.
Out of curiosity, could you share one of your rounded geometries (as GLTF/GLB, for example). I would like to try TSL textures on it. No UVs are needed, just vertices and normals.
Sure thing, Pavel! So I exported a bunch of variations, and I tried to name the files based on the parameters of the polygon.
A couple of things to keep in mind:
There’s still a bit of work to be done on optimizing the vertex count, I used mergeVertices(), but Blender still shows me that there are vertices that can be merged by distance.
I’ve been experimenting with subdividing the path after the rounding procedure (via bezier curves).
The API I made have 2 rounding modes (circular & natural), with 2 additional modes that still yield unreliable geometry (supershape & hand-drawn).
Let me know your thoughts!
This experiment started on d3.js, doing exactly the same thing but with SVG & Canvas, and I tried to make it in a way that the same parameters can be used to use it with Three.js.
The library 3d-assets, that you’ve made really help me understand how to construct geometry procedurally, but what I did is not as general purpose. Regardless, thank you so much!
If it is of any interest to anyone, there is a PLY+STL WebGPU - Standalone Viewer which currently combines using @PavelBoytchev procedural textures, when a model is loaded all by itself, as well as xAtlas unwrapper which is used for when a loaded model does not have a UV set and at least one “real” texture is loaded together with it (unwrapper will not be used if the model has a UV set built-in).