Difference between revisions of "User:Wfpokorny"

From POV-Wiki
Jump to navigation Jump to search
m (follow up)
m (follow up)
Line 75: Line 75:
  
 
There is presently a complication with the bezier spline mode of the prism in that the point order with respect to side surface normals is reversed from all other prism spline types. To match the end normals for all but the bezier spline, the point list should be in counter-clockwise order on the x,z plane, while for the bezier spline, the point order must be clockwise. The behavior of the bezier spline prism will likely be aligned with the other spline types at some point after the 3.7.1 release.
 
There is presently a complication with the bezier spline mode of the prism in that the point order with respect to side surface normals is reversed from all other prism spline types. To match the end normals for all but the bezier spline, the point list should be in counter-clockwise order on the x,z plane, while for the bezier spline, the point order must be clockwise. The behavior of the bezier spline prism will likely be aligned with the other spline types at some point after the 3.7.1 release.
 +
<p></p>
 +
* the above [[Reference:Prism|prism]] additions have been added with a few minor changes. --[[User:Jholsenback|jholsenback]]
 +
<p></p>

Revision as of 23:57, 26 May 2016

  • The following are proposed updates to the lathe and prism object references which Christoph requested I do. I was unable to create an editable discussion in the reference section with my wiki-user access though I could do it here on my user page.


The surface normal determination for lathes depends upon the order in which the spline's points are specified. The following code, where the bezier spline point order is counter-clockwise in the xy plane, will render with the color Red on the outside and the color Blue on the inside.

#declare Lathe_CounterClockwise = lathe {
    bezier_spline
    16,
    <0.45,0>,<0.45,0.0828427>,<0.382843,0.15>,<0.3,0.15>
    <0.3,0.15>,<0.217157,0.15>,<0.15,0.0828427>,<0.15,0>
    <0.15,0>,<0.15,-0.0828427>,<0.217157,-0.15>,<0.3,-0.15>
    <0.3,-0.15>,<0.382843,-0.15>,<0.45,-0.0828427>,<0.45,0>
    sturm
    texture          { pigment { Red } }
    interior_texture { pigment { Blue } }
}

While the following example, where the point order for the bezier spine is clockwise in the xy plane, will render inside-out, with the color Blue on the outside and the color Red on the inside.

#declare Lathe_Clockwise = lathe {
    bezier_spline
    16,
    <0.45,0>,<0.45,-0.0828427>,<0.382843,-0.15>,<0.3,-0.15>
    <0.3,-0.15>,<0.217157,-0.15>,<0.15,-0.0828427>,<0.15,0>
    <0.15,0>,<0.15,0.0828427>,<0.217157,0.15>,<0.3,0.15>
    <0.3,0.15>,<0.382843,0.15>,<0.45,0.0828427>,<0.45,0>
    sturm
    texture          { pigment { Red } }
    interior_texture { pigment { Blue } }
}

The actual normal determination is more complicated than clockwise vs counter-clockwise orientation for complex splines. If the surface normal is important to the visual result, it is best to check how the lathe is being rendered by testing with substantially different inside and outside textures.

Note. With the bezier spline - unlike all the other spline types used with the lathe - it is possible to create independent closed curves within a single lathe definition.

  • the above lathe additions have been added. note that use of the source tag is inconsistent with the current formatting so I enclosed the code examples using the pre tag. --jholsenback

The surface normal determination for prism side(s) depends upon the order in which the spline's points are specified. Prism ends have normals which always face outward. The following code, where the linear spline point order is counter-clockwise in the xz plane, will render side(s) with the color Red on the outside and the color Blue on the inside. The prism ends will also be Red on the outside and Blue on the inside.

#declare Prism_CounterClockwise = prism {
    linear_spline
    linear_sweep
    0,1,5,
    <0.5,-0.5>,<0.5,0.5>,<0.3,0.5>,<0.3,-0.5>,<0.5,-0.5>
    texture          { pigment { Red } }
    interior_texture { pigment { Blue } }
}

While the following example, where the point order for the linear spine is clockwise in the xz plane, will render side(s) inside-out with the color Blue on the outside and the color Red on the inside. Surface normals for the prism ends are unchanged.

#declare Prism_Clockwise = prism {
    linear_spline
    linear_sweep
    0,1,5,
    <0.5,-0.5>,<0.3,-0.5>,<0.3,0.5>,<0.5,0.5>,<0.5,-0.5>
    texture          { pigment { Red } }
    interior_texture { pigment { Blue } }
}

The actual normal determination is more complicated than clockwise vs counter-clockwise orientation for complex splines. If the surface normal is important to the visual result, it is best to check how the lathe is being rendered by testing with substantially different inside and outside textures.

There is presently a complication with the bezier spline mode of the prism in that the point order with respect to side surface normals is reversed from all other prism spline types. To match the end normals for all but the bezier spline, the point list should be in counter-clockwise order on the x,z plane, while for the bezier spline, the point order must be clockwise. The behavior of the bezier spline prism will likely be aligned with the other spline types at some point after the 3.7.1 release.

  • the above prism additions have been added with a few minor changes. --jholsenback