Forgot password?

Create an account!

Forum

« back

RhinoScript – Direction of directional light?

Messages

Please log in to write a message.

  • 3. ledisnomad (Sep 18, 2011 03.10):

    Interesting. I'll have to test it some more, but if you got it to work, then I'm sure you're right. I'll give it another go.

    Thanks.

  • 2. Hanno (Sep 17, 2011 21.33):

    Hi ledisnomad,

    are you sure LightDirection does not work with your light? I just performed a small test and was able to get/set Location and Direction of a directional light...

    Hanno

  • 1. ledisnomad (Sep 15, 2011 15.07):

    I'm modifying the "RotateObjectsToCamera-Add" script that is on this forum to work for my purposes. I've gotten that to work so that it copies a surface or mesh plane to a bunch of points, then rotates them to face the active camera. All good.

    Now I would like to add to it to repeat itself, but this time copy the same objects to the same points and face my sun, which is a directional light. All this so I can have billboard trees and people that cast shadows correctly.

    So to my question: is there a way to get the direction of a directional light? I've looked into LightDirection(strObject), but it seems to only works for finding the direction of spot lights that have a location and a target. Any thoughts? My only thought right now is that I position the directional light so that it points at the origin, but that isn't a very satisfactory solution.

Recommend

Why are these buttons gray?