1
$\begingroup$

I'm trying to make a Random House generator with Random Walk, the trickiest part so far is the roof, I wanna make it like a Gable Roof or a Hip Roof.

At the moment it's working perfectly to get the random shape, so I think the only thing that's left to make share it with the world is the roof.

How the roof mesh should be

I think there should be some way to subdivide the mesh with triangles, but the triangulate node doesn´t work in the way I thought it would, happens the same when I mix it with a subdivide mesh node. Another way a may be adding a vertex in the center of the face or doing something with distance to vertex and position but I don't know how to do it.

This is the result I need to achieve what I want. How I need the mesh to be

BTW I've been following this Houdini tutorial just to get an idea.

$\endgroup$
5
  • $\begingroup$ if your roof is "fixed" you could just use a mesh line and set the points to the coordinates. what do you mean with random walk? $\endgroup$
    – Chris
    Mar 2, 2022 at 6:25
  • 2
    $\begingroup$ There is an addon that does this. github.com/prochitecture/bpypolyskel Maybe you can extract some of the logic from the code. $\endgroup$
    – Gorgious
    Mar 2, 2022 at 6:27
  • $\begingroup$ @Chris With random walk I mean an algorithm that gives you random direction (or movement) along any axis depending on an input or seed. It is normally used to create dungeons or caves, but I implemented it only along the X and Y axis. $\endgroup$
    – Dahm
    Mar 2, 2022 at 13:19
  • $\begingroup$ @Gorgious that's big! Thank you very much! $\endgroup$
    – Dahm
    Mar 2, 2022 at 13:20
  • $\begingroup$ If your question has been solved, please be so kind and mark the answer that contributed to the solution as "Accepted answer" so that this question will not continue to be displayed as unsolved. Thank you! Here you can find more information: What should I do if someone answers my question?. If you still haven't gotten a solution to your question, please be kind enough to address it. $\endgroup$
    – quellenform
    Oct 24, 2022 at 17:57

1 Answer 1

1
$\begingroup$

This task can be solved as follows:

enter image description here

  1. Subdivide the mesh with the node Subdivide.
  2. Create a selection of the points that have more than $3$ faces and move their position with Set Position.
  3. Triangulate the mesh along the longest diagonal so that the roof has correct edges.
  4. (Optional): Additionally use the modifier Decimate to remove the excess edges.


(Blender 3.2+)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .