MoonDoggie
10-22-2007, 04:46 PM
Maxscript friends and family,
I have a question about the best way to do something in max. Here is what I need to do, and I'm sure there are a few ways to do it.
On a building I have there are Louvers
http://64.69.85.201/images/uploads/4LouverBox_large.JPG
Think of them as blinds.
In my scene I also have a sun. I want the louvers to always be perpendicular to the sun's vector. (So they always block the light when the sun is facing them, but are open when the sun isn't)
To accomplish this, I've tried wire parameters, which didn't seem to get me too far, I also tried a callback, which worked better because I was able to constrain the rotation of the louver to it's X axis only, think of the solution to this being a lookAt constraint where the movement is constrained only to the X axis.
I was able to get the normal of the louver by doing a
polyOp.getFaceNormal $louver 1
but I have not been able to figure out how to get the sun's normal, how do I get this?
Can anyone point me in the correct direction?
Many Thanks,
Colin
I have a question about the best way to do something in max. Here is what I need to do, and I'm sure there are a few ways to do it.
On a building I have there are Louvers
http://64.69.85.201/images/uploads/4LouverBox_large.JPG
Think of them as blinds.
In my scene I also have a sun. I want the louvers to always be perpendicular to the sun's vector. (So they always block the light when the sun is facing them, but are open when the sun isn't)
To accomplish this, I've tried wire parameters, which didn't seem to get me too far, I also tried a callback, which worked better because I was able to constrain the rotation of the louver to it's X axis only, think of the solution to this being a lookAt constraint where the movement is constrained only to the X axis.
I was able to get the normal of the louver by doing a
polyOp.getFaceNormal $louver 1
but I have not been able to figure out how to get the sun's normal, how do I get this?
Can anyone point me in the correct direction?
Many Thanks,
Colin
