POV-Ray

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.

Attached to Project: POV-Ray
Opened by Christoph Lipka - 2013-12-09
Last edited by William F Pokorny - 2016-10-11

FS#316 - inverse keyword does not work properly with fractals

As the following scene demonstrates, the “inverse” keyword produces unexpected results with fractals.

Left: a sphere primitive as reference
Right: a julia fractal

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 fractal’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  = object { TopLeft inverse }

#declare TopRight    = julia_fractal{ <-0.083,0.0,-0.83,-0.025> quaternion sqr max_iteration 8 precision 20 scale 0.9 }
#declare BottomRight = object { TopRight 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 { <-2,-2,-2>, <0,2,2> 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)
Closed by  William F Pokorny
Tuesday, 11 October 2016, 12:31 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 ) .

Admin
Christoph Lipka commented on Monday, 09 December 2013, 22:22 GMT

fixed with Perforce change #6164.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing