|
![](/i/fill.gif) |
"[GDS|Entropy]" <gds### [at] hotmail com> wrote:
> This works well, and I've tested the output with cyls, which give the effect
> that I want, with the obvious exception that cyls make *terrible* moss.
> Since I'm dealing with a moss object generated from a macro that
> approximates Campylopus sp., which is obviously more complicated than a cyl,
> I need to find a meaningful way to rotate the individual models according to
> the surface normal to acheive any kind of meaningful effect.
Ah, I see.
So what you're looking for is the B in object{O rotate B} so that whatever was
vertically in O is now parallel to a vector N (your normal).
Or, the transformation matrix M in object{O transform M} to get the same effect.
Try this:
#include "transforms.inc"
...
#declare M = Reorient_Trans(y, MyNormal)
object{MyCampylopusSp transform { M } }
For better effect, you may want to use:
object{
MyCampylopusSp
rotate y*rand(MyRand)*360
transform { M }
}
AFAIK this should do exactly the thing you want. I guess there's a clever
combination of V* macros that will give you the proper B for a "rotate B", but
nothing as easy and elegant as the Reorient_Trans macro.
Post a reply to this message
|
![](/i/fill.gif) |