|
|
Hi all!
I have got a problem and I hope that povray could be a solution. Perhaps you
have got a suggestion for me.
Having a bunch of polygons and a ray I would like to find out how often the ray
intersects a polygon. I guess I can find out how to set up a camera to get some
rays, but i have no idea how to count the intersections... Is it possible to
define a material, so that the resulting pixel colour reflects the number of
intersections?
Post a reply to this message
|
|
|
|
Am 07.10.2014 13:42, schrieb Horst:
> Hi all!
>
> I have got a problem and I hope that povray could be a solution. Perhaps you
> have got a suggestion for me.
>
> Having a bunch of polygons and a ray I would like to find out how often the ray
> intersects a polygon. I guess I can find out how to set up a camera to get some
> rays, but i have no idea how to count the intersections... Is it possible to
> define a material, so that the resulting pixel colour reflects the number of
> intersections?
You can use a semi-transparent surface, e.g. "colour rgbt <0,0,0,0.8>",
and a contrasting background, e.g. "colour rgb <1,1,1>"; then, the
resulting colour will depend on how often the ray enters or exits the
object.
Use the "File_Gamma=1.0" ini-file setting to more easily evaluate the
result; the pixel value will then follow an exponential law:
100% = no intersection
80% = 1 intersection
64% = 2 intersections
51.2% = 3 intersections
etc.
Post a reply to this message
|
|