The Persistence of Vision Raytracer (POV-Ray).
This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.
Opened by Christoph Lipka - 2013-12-09
Last edited by William F Pokorny - 2016-10-11
FS#315 - inverse keyword does not work properly with quadrics
As the following scene demonstrates, the “inverse” keyword produces unexpected results with quadrics.
Left: a sphere primitive as reference
Right: a sphere-shaped quadric primitive (sphere-shaped)
Top: plain
Bottom: inverse
The objects are clipped in half to better demonstrate the effect. Regular texture is shown in white, interior_texture in red; the surface normal of a selected point (blue) as returned by trace() is shown in green.
Note how the sphere’s surface normal, as well as the textures, are flipped when “inverse” is used (this is the intended standard behaviour of all objects), while the quadric’s normal and textures erroneously remain uchanged.
// +w800 +h600 #version 3.7; global_settings{ assumed_gamma 1.0 } #default{ finish { ambient 0.1 diffuse 0.9 specular 0.5 }} camera { perspective angle 40 right x*image_width/image_height location <0,0,-10> look_at <0,0,0> } light_source{ < 1000,3000,-3000> color rgb 1 } background { color rgb 0.5 } #declare T_White = texture { pigment { color rgb 1 } } #declare T_Red = texture { pigment { color red 1 } } #declare T_Green = texture { pigment { color green 1 } } #declare T_Blue = texture { pigment { color blue 1 } } #declare TopLeft = sphere { 0, 1 } #declare BottomLeft = sphere { 0, 1 inverse } #declare TopRight = quadric { <1,1,1>, <0,0,0>, <0,0,0>, -1 } #declare BottomRight = quadric { <1,1,1>, <0,0,0>, <0,0,0>, -1 inverse } #macro Mac(Obj, P, D) union { #local N = <0,0,0>; #local O = <-0.6,0.4,-10>; #local Q = trace(Obj, O, D, N); #if (vlength(N) > 0) sphere { Q, 0.05 texture { T_Blue } } cylinder { Q, Q + N, 0.02 texture { T_Green } } #else cylinder { O, O + D*10000, 0.02 texture { T_Red } } #end object { Obj texture { T_White } interior_texture { T_Red } clipped_by { box { <-1,-1,-1>, <0,1,1> rotate y*30 } } } translate P } #end Mac(TopLeft, <-1.2, 1.2, 0>, z) Mac(TopRight, < 1.2, 1.2, 0>, z) Mac(BottomLeft, <-1.2,-1.2, 0>, z) Mac(BottomRight, < 1.2,-1.2, 0>, z)
Tuesday, 11 October 2016, 12:27 GMT
Reason for closing: Fixed
Additional comments about closing:
Verified fixed in 3.7.1 master branch.
git commit f24393f was Christoph Lipka,
2 years, 10 months ago, message:
overhauled the implementation of the
"inverse" keyword; also fixed
three bugs discovered along the way
( FS#315 ,
FS#316 ,
and another one previously masked by
FS#316 )
.
fixed with Perforce change #6164.