Dynamically scaling a light based on its orientation to another light?

Hey guys,

I am new to programming in Daz, so bear with me if this can be better achieved another way without using scripts. This is what I would like to do;

I want to scale LIGHT#1 dynaically based on its orientation to LIGHT#2.
So if LIGHT#1 and LIGHT#2 are pointing directly at each other, then scale should be X%.
As the two lights rotate away from each other, then the scale should transition to Y%.

Is this something that can be handled with controllers perhaps, or scripts? 
Sorry for the basic question. Let me know if this makes sense.

Thank you,

-P

Post edited by PA_ThePhilosopher on

Comments

  • rbtwhizrbtwhiz Posts: 2,217

    I don't have a lot of time to spell it all out right now, but this is where you'll want to start looking...

    Samples

    API

    The idea being that you would need a script to load after the camera loads that creates a callback triggered by the transforms on the node changing. The callback script can perform the orientation comparison and make whatever adjustments are needed. You'll want to be careful to handle the cyclical nature of two or more nodes responding to the transforms of another node and potentially triggering and endless loop.

    -Rob

Sign In or Register to comment.