1
$\begingroup$

I'm trying to make a simple city generator and one problem I'm facing is that I want the point instances to inherit the Z rotation of the base mesh that they are spawning from. Ideally I want to continue using the "Mesh to Points" node or something similar to maintain the grid like pattern, but when I rotate the base plane I would like the instances to rotate along with it too, since the city blocks are going to be made by hand, but I would like their innards to be populated procedurally. In the picture below you can see a very failed attempt at this, rotating the base plane translates the instances but does not rotate them.

I tried using the "Distribute Points on Faces" node, which does output rotation info, but this does not give me the functionality that I'm looking for since they only appear to adjust if you change the slope angle of the base plane, plus I loose the grid pattern with this approach.

Can anyone please point me in the right direction? Thanks in advance!

enter image description here

$\endgroup$
2
  • $\begingroup$ when you say rotate the base plane, are you rotating it in Edit Mode? what's the problem with rotating the plane in Object Mode? $\endgroup$ Jul 9, 2022 at 6:17
  • $\begingroup$ I tried rotating it in object mode and indeed it works, but it ended being too much manual work because each city block is differently shaped and I wanted the buildings to be aligned to each edge. $\endgroup$ Jul 9, 2022 at 20:01

1 Answer 1

1
$\begingroup$

You could come up with more general solutions, (something like 'Align to previous edge'), with more nodes. But for mounting instances on squares which are arbitrarily rotated with respect their object's space, this will probably do?

enter image description here

  • Auto-axis align Z to face normal
  • Spin X around new Z direction to face away from square-centre
  • Spin a further 45 degrees about local Z

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you for the detailed explanation! $\endgroup$ Jul 10, 2022 at 2:42

You must log in to answer this question.

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