Instances on faces through Geo nodes inheriting face rotation , like regular instances?

Does anyone know a way? I mean spawning instance in a center of face and inheriting face rotation.
I managed to did it somehow in Sverchok, forgot how already. Now wonder if it’s possible in Geonodes .

For road posts for example following the road curve and be driven be geo node system with instance ID etc.

However, I had to add a raycast node to get the face normals:

Thank you very much for the example but I seems can’t make that “align Euler” work
posts.blend (1.1 MB)

Not sure what am I doing wrong. I recall Sverchok had a button to use modified input, maybe it just doesn’t read modified normals after curve deformer?

So there seem to be two issues with my suggestion

  1. The raycast node does not always hit the road mesh, meaning that some of the normals are not evaluated correctly. You can solve this by sending out rays in both positive and negative z direction and using the normal of the face that is hit. However this does not solve issue 2.

  2. With my suggestion, the lamps all face in the y direction. The reason for this is that the face normals do not contain any information about the rotation around the normal itself. Your approach (“just instances”) in fact uses a curve as a base. You can also do this in geometry nodes, which would be my suggestion: use the curve as an input for geometry nodes to distribute the posts:

posts_3.1_v02.blend (1.1 MB)

1 Like

Cool. Thanks a lot LordoftheFlea .

ps. I have just realized although I need those posts exported as real instances into a game. And Blender does some undecipherable mess from geonodes unfortunately when I try to “make instances real” .

Have you tried using the “realize instance” node just before the geonodes output and applying the geonodes modifier?

Yeah, I tried and couldn’t figure out how the node works. It makes no difference at all and applying geonodes just turns the thing in one big unique mesh.

I should probably try in Sverchok , or some combination with Sverchok. It does have an instancer that output instanced objects. Too bad I hardly understand anything there with its “lists” approach :frowning:

This works for me:

After applying the modifier:

Well, I see same . While I need each post to be separate instance object after all . So I could export them as instances with fbx . Not a big joined object. I can do it from regular dupli /instances with " make instances real" but seems can’t from geonodes .