Hi, I’m looking for code examples of procedurally generated meshes. Specifically to create custom furniture. So things like creating geometry from scratch, moving vertices along an axis (and also moving their UV coordinates to avoid texture stretching), etc.
Is there an open source library that exist? Basically I don’t want to reinvent the wheel and could make use a higher level set of functions.
I have an on-going project about procedural 3D assets. Not focused specifically on furniture, but on everyday items. The only furniture so far is a chair. Tables, wardrobes, beds and other items will be added later this year.
they use threejs + react-three-fiber, check his twitter out, they go into some detail. you would want this combo for visuals, making stuff look good, and for easier access to eco system components and the sheer amount of pre-existing helpers and tools.
i looked through the configurators you linked via X. I wondered if the table configurator (Configurator - Hulo) is Procedural/Parametric as the OP asked? I do not get how they are able to scale the table in irregular shapes without texture distorsion… see images:
if these shapes are cut out of a rectangle i do believe the uvs should remain intact. i have not tried but i don’t see why not. if they do use csg i don’t know. to some extend you can open react dev tools and look into the component tree.
Yes you are right for the top/bottom, but for the edge there would be messed up UVs, alright i’ll dive into it! Thanks for the great ressource, they make awesome configurators
If you use traditional textures, you can update UVs while you update the vertices of the table top.
Alternatively, you can use 3D TSL textures, so that you do not care about any UVs – the shape is “cut out” from infinitely large piece of wood. Here is a demo:
Hi i’m one of the developer of the configurator you mentioned. I haven’t worked on the logic of this particular project for the tabletop but I did something similar for another table configurator project and the tabletop is parametric. The logic of my version is a bit different that what is done here but I’ll explain the version I worked on: the main idea behind is making the tabletop using the Shape and pass it to the Extrudegeometry and then using the vertex shader for the edges by displacing the vertices along the edges. Also the scaling of the shape is done inside of the vertex shader using some custom 2d vectors I calculated. for the texture destortion I don’t use the uv’s but the position of the vertex so it never get stretched if that makes sense. Hopefully it gives you an overal idea of how it is done :))