|
|
Am 08.02.2013 22:07, schrieb Wouter:
> Using version: 3.7.0.RC6.msvc10.win64
>
> Hi there,
>
> I noticed some problems with the trace function:
>
> - when using it on a text object: when you hit the side of a letter, the normal
> that is returned is flipped (the exact opposite of what it should be). When you
> hit the front of a letter the normal is correct.
>
> - when using it on a prism object: varied results, at least partly depending on
> the order of the points. Sometimes the sides of the prism return the correct
> normal, sometimes flipped. Top and bottom are also unpredictable.
I can confirm this behaviour. However, a quick check shows that this is
nothing new: 3.6.2 gives the same results.
As a workaround, you can use the following code:
#local Origin = <-100,0,0>;
#local Dir = <1,0,0>;
#local Norm = <0,0,0>;
#declare Inter = trace(Obj,Origin,Dir,Norm);
#if (vdot(Dir,Norm) > 0)
#local Norm = -Norm;
#end
Post a reply to this message
|
|