2
$\begingroup$

I've created a dense forest of plane image trees using Distribute Points on Faces and Instance on Points nodes.

Geometry Node Setup

I'm attempting to billboard them to always face the camera.

Plan A was to use object constraints on the original objects. Failed because the instances would not be constrained individually, just mimicking the original asset's rotation.

My current Plan B is to take the camera's position as a vector, subtract it from the position of the instances and use the Align Euler to Vector node to make each instance directly face the camera.

But two issues are in the way of plan B.

1: I don't know if it's possible to use Geometry Nodes to apply this rotation to all instances individually.

2: I don't know how to access the location of these instances en masse to test if it would work.

I have seen that particle systems would be good to make this work easier on a flat plane, but this is not working on a flat plane.

$\endgroup$
5
  • $\begingroup$ At first sight the setup looks good anyway. Have you ever tried to add the node Position to Substract? Then you would have the direction vector between the camera and the individual instances. ...just a guess. $\endgroup$
    – quellenform
    Commented Nov 10, 2022 at 2:38
  • $\begingroup$ i would take a look, but honestly - i hate guessing around and you want help, right? so you should make it as easy as possible for us who help for free so please provide blend file so we don't have to rebuild everything. Thx. $\endgroup$
    – Chris
    Commented Nov 10, 2022 at 9:19
  • 1
    $\begingroup$ @Chris I'm very Sorry. I'm new to these sorts of forums and don't entirely know my left from my right yet, or the etiquette. I'll keep that in mind going forward. I've seen other users add "Download the .Blend" but I can't pin down where we have any attach option. Is it some kind of permission that I haven't earned yet? $\endgroup$
    – LDO
    Commented Nov 10, 2022 at 17:48
  • 1
    $\begingroup$ @LDO: first of all - you don't have to say "i am sorry". All i wanted to say is that you will attract more people to your question if you upload a blend file (and this is just MY opinion, others here think totally different). You can upload blend file by opening blend-exchange.com and following instructions. And no, you don't need any permissions for that. And by the way: you won't believe how often i got annoying comments of people here commenting: "why do you always ask for blend files"...so you see: i got comments as well ;) Hope you will have fun here anyway!! And welcome to SE! $\endgroup$
    – Chris
    Commented Nov 10, 2022 at 18:18
  • 1
    $\begingroup$ ...and since you got already an answer, no need to upload if the answer is good for you ;) $\endgroup$
    – Chris
    Commented Nov 10, 2022 at 18:19

1 Answer 1

4
$\begingroup$

In Geometry Nodes, input nodes (like Position, or Index) do not hold any specific information by default, they're ways of asking a question in the context of the geometry they're linked to. This means you can just use a Position node here to subtract the Camera's location from. Since it ends up being linked to the Instance on Point node, it's automatically asking the question "What's the positions of these instances created by this node?" (Question 2). If you have also manipulated this information in between, like we're doing here with getting the difference vector between positions of all relevant instances and the camera, it will apply the resultant rotation to all of them individually (Question 1).

Additionally, if trees are to stay upright, you should flatten the difference vector (by multiplying its Z value with $0$), otherwise they would also rotate in other axes as the camera moves around.

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ That Position node is everything I needed! Thank you for the clear answer! $\endgroup$
    – LDO
    Commented Nov 11, 2022 at 20:39

You must log in to answer this question.

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