1
$\begingroup$

I'm working on uni project where I need to calculate expected efficency of solar panels on multiple houses.

I need global rotation of my Plane object (roof of the house) on X and Z axis and area of this plane.

I thought about doing all the math in geometry nodes but I cannot find anything to get those two values and then output them to shader editor so the color of plane would change based on calculated efficency value.

Does anyone have thoughts how to make this happen or links to stuff that would help me with it?

Any help appreciated

$\endgroup$
1

1 Answer 1

1
$\begingroup$

Here's how you can calculate face rotation in geonodes:

Imgur mirror (SE image hosting has problems)

I think it's self explanatory: use "Axes to Rotation" to compute the rotation based on face normal, however normal alone is not enough, so as for 2nd axis just use the direction of the first edge. There's no vector math: to degrees, so I just multiply by $180 \over π$ to convert for readability. I thought about further truncating the numbers to get rid of the "e" in very small numbers (basically 0), but couldn't find a satisfyingly concise way...

If you want to use it for multiple faces you will need to obtain the index of an edge using "Corners of Face" + "Edges of Corner" topology nodes.

$\endgroup$

You must log in to answer this question.

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