4
$\begingroup$

I am trying to generate a structure made of wood-like planks using geo-nodes in blender 4.1. To do that I am using a mesh with n extrusions as a base to define the overall structure and to place the planks I have attempted to split the mesh and scale each face along the Y-axis. I do some raycasting to find the distance to the nearest edge to know how wide the planks should be.

This approach works fine if I don't want to change the direction of the planks based on the structure "curves", but I want to be able to have areas where the planks are placed perpendicularly. So I have tried to remove edges based on a couple of rules, and after that I wanted to use the remaining points to find which faces of the split mesh have not been used yet and repeat the process of scaling those faces down to define the splines where the remaining planks should be placed.

The problem is that I am not able to delete the faces that I want. I have tried to use raycasts but with no success. I am able to determine the points where the face is located(I capture the faces position using mesh islands + sample index), but after that I do not understand how to go around the comparison to delete geometry. Comparing positions fails, as well as comparing face indices after retrieving them using sample nearest.

Does anyone know how I could approach this issue or if there is an easier approach to achieve the result I want? If so, I would appreaciate your help. Thanks in advance to anyone willing to help.

Here is my .blend file in case it is of help.

The current result is shown in the picture below. I want to fill those blank faces with planks placed perpendicularly to the others, if that makes sense.

enter image description here

$\endgroup$
1
  • 3
    $\begingroup$ Hi Paolo, (while I dont have your answer, I just wanted to say) thanks for taking the tour and preparing your question so well! Welcome to blender.se <3 $\endgroup$
    – Leander
    Commented Mar 31 at 16:55

1 Answer 1

2
$\begingroup$

I managed to find an alternative way to solve the problem.

Here is how I did that.

  • I basically place first all the planks in one direction, still following the rules that remove unnecessary edges/splines.

  • I then repeat the process along the other direction and removing unnecessary edges but do not place any planks yet. I simply calculate which edges will be used along that axis. This will prove useful in the next step.

Now comes the alternative to my first approach where I tried to find unused faces.

  • First I take the curves that I used to lay the planks along the Y-axis and convert them to a mesh, using a quad as the profile curve to have a surface to work with.

  • I then take the curves that resulted after I scaled the mesh along the X-axis and split them by edge. I now scale them down individually again to a really small factor(0.1 in my case). This allows me to use this geometry to cast down rays targeting the surface I created before to determine which edges have to be deleted from the curves along the X-axis.

    Now that all the useless edges have been removed I can proceed placing the remaining planks.

I'm sorry in case the explanation is not 100% clear. It might be useful to look at the file to better understand all the steps.

You can find the updated file here:

And here is the result of the new approach: enter image description here

$\endgroup$

You must log in to answer this question.

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