I am looking to “build-by-proc-gen” (basic) meshs.
Example, generate a tree,
Cube -> extrude top, extrude top, rotate, scale, extrude , extrude left, extrude right …
There is example to extrude Shapes, but if there is any method to extrude meshs
Example, create this :
, resulting a valid 1 piece mesh,
What is the way to go to obtain this result ?
Cube -> Extrude right, scale, rotage -> extrude right, move vertices
Is this possible, or i have to create X parts, and x,y,z them pixel perfect “paste” them ?
Thanks for help
You don’t really “extrude a mesh”. Extrusion describes the process of increasing the dimensionality of an entity by one. So even if you work with meshes, you still select a point (1D) or a face (2D) and then perform the extrusion. You can basically try to generate a shape based on the selected face, use
ExtrudeGeometry for the actual extrusion and the merge everything into a single geometry.
The function like in blender or c4d uses the contour of the selected faces and generates a new quad/triangle pair per line along the normals.
thanks erveyone, i study this
Take a look at this too. This helped me extrude window frame profiles.
Evolving of that
The function has four parameters:
THREE.Shape() for a profile;
array of THREE.Vector2() for a contour;
a boolean value for closing the contour (default is true);
a boolean value for open ends (default is false).
It calculates an angle between two edges of contour and then consiquently applies three matrices of shear/shift, rotation and translation to the points of the profile at each point of contour.
The solution is still rough and raw, an…
hello ssaras, have you found an easier way to extrude window profiles?