2
$\begingroup$

I come from a game development background and am not quite sure if this is the right way of thinking in Blender, but let's assume that i have the following tasks:

  • Create a tool that will generate procedural building, based on pre-made main parts:
  1. Floor
  2. Middle ground
  3. roof

and each of these parts can also be created through a different Geometry Node, what i can't find is the follow:

If i create a Floor that is 3 meters high, what node should i use so that the Middle ground* start at 3 meters (right above the floor), and then after x-Middle grounds, the Roof should also be placed on top accordingly.

This is the easiest example that i can think of to solve my problem, but i will eventually need more complex setups that will detect "corners", for example if it's a grid based node, is there a way to detect "corners" and whole edges ? so that (x=0;y=n) gives you the cells of the first column of the grid.

Can anyone please point me at the right direction.

Thanks!

$\endgroup$
4
$\begingroup$

you can do it with this node setup:

(and although you might not wanna hear it: there is so "magic" checkbox or settings ...it is just easy math....)

enter image description here

enter image description here

$\endgroup$
7
  • $\begingroup$ Haha i wasn't expecting a checkbox either, but was basically looking for an "object reference" to use its data, Question: what's exactly the "Line" node doing in your setup ? $\endgroup$ Jul 5 at 14:36
  • $\begingroup$ The line object helps me to "define" the height of the building. Since the line has as much vertices as you define in "count" i will instance then the cubes on that vertices. $\endgroup$
    – Chris
    Jul 5 at 14:44
  • $\begingroup$ I see, i downloaded the Blend file and the manually entered "2.1" value still feel like an issue to me, is there a way to automate that ? the problem is this, if you enter edit mod to the "middle" part and reduce its height, you get this issue: i.imgur.com/D7a2b9O.png unless you play around with the 2.1 value, is there a way to automate that ? especially considering that the middle parts can be made out of a Collection which contains objects with different heights, i assumed ObjectInfo would help, but it gives the scale (1,1,1) when what i need is "Dimensions", any tips ? $\endgroup$ Jul 5 at 16:44
  • $\begingroup$ Found it! i replaced that "2.1" value node with the Bounding Box Max value (i.imgur.com/FDtnQ6E.png), it does what i want now (i.imgur.com/zQDs9ml.mp4) , the roof still acting a bit strange but i'll find a way to fix it, thanks a lot @Chris ! $\endgroup$ Jul 5 at 16:55
  • 1
    $\begingroup$ Great! Would be nice if you could tap on the checkmark left to my answer if it helped you! Thank you! $\endgroup$
    – Chris
    Jul 5 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.