|
|
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.
This is scene that will show some of the problems in the Messages window:
#version 3.7;
global_settings{ assumed_gamma 1.0 }
#declare Norm = <0,0,0>;
#warning "All objects are traced from <-100, 0, 0> in the direction <1, 0, 0>,"
#warning "so the normal is expected to be in the opposite direction."
#warning ""
#declare testBox = box{<1, 1, 1>, <-1, -1, -1>};
#declare Inter = trace(testBox, <-100, 0, 0>, <1, 0, 0>, Norm);
#warning concat("Trace a box, normal is: <", vstr(3, Norm, ", ", 0, 0), "> as
expected.")
#warning ""
#declare testTextSide = text {ttf "arial.ttf", "H", 0.3, 0 scale 3 translate<-1,
-1.1, -0.5> };
#declare Inter = trace(testTextSide, <-100, 0, 0>, <1, 0, 0>, Norm);
#warning concat("Trace the side of a letter, normal is flipped: <", vstr(3,
Norm, ", ", 0, 0), ">")
#warning ""
#declare testTextFront = object {testTextSide rotate y*90}
#declare Inter = trace(testTextFront, <-100, 0, 0>, <1, 0, 0>, Norm);
#warning concat("Trace the front of a letter, normal is: <", vstr(3, Norm, ", ",
0, 0), "> as expected.")
#warning ""
#declare testPrism = prism { -1, 1, 4 <0, -1>, <0, 1>, <1, 0>, <0, -1> }
#declare Inter = trace(testPrism, <-100, 0, 0>, <1, 0, 0>, Norm);
#warning concat("Trace a prism, normal is flipped: <", vstr(3, Norm, ", ", 0,
0), ">")
#warning ""
#declare testPrism2 = prism { -1, 1, 4 <0, 1>, <0, -1>, <1, 0>, <0, 1> }
#declare Inter = trace(testPrism2, <-100, 0, 0>, <1, 0, 0>, Norm);
#warning "Trace a prism with the same points in a different order, normal is: "
#warning concat("<", vstr(3, Norm, ", ", 0, 0), "> as expected.")
#warning ""
Post a reply to this message
|
|