vertexcolor
pattern texture
Features >  Vertexcolor      [ site map ]
News
Features
Features
Download
Tutorials
Links
   

This example shows a comparison with the TRIMAP.ZIP macro (for POV-Ray 3.1) from Chris Colefax's POV-Ray Include Files Pageweb  and the vertexcolor implementation in Pov4Grasp. The TRIMAP macro is not limited to color interpolation, but it requires more memory in this case. Comparison benchmarks are available on the grasp_surface example page with meshes including thousands of triangles.



  Using Chris Colefax's TRIMAP.MCR
trimap.pov  scene.inc
#version 3.1;
#include "scene.inc"
#include "trimap.mcr"  // macro by Chris Colefax

#declare F = finish{ diffuse 1  ambient 0  brilliance 0 }
#declare triangle_base_texture = texture{ finish{F} }

mesh
{
  cv_triangle(<0,-1,20>, Red,
              <3,5,20>,  Green,
              <6,-1,20>, Blue)
  cv_triangle(<-1,0,20>,  Yellow,
              <-4,-5,20>, rgbt<1,0,1,0.5>,
              <-6,2,20>,  Yellow)
}
trimap.png
 


  Using vertexcolor pattern texture
vertexcolor.p4g  scene.inc
#version 3.1;
#include "scene.inc"

#macro VCT(P1,C1, P2,C2, P3,C3)
  #local T = texture{
    pigment{ vertexcolor C1,C2,C3 }
    finish{ diffuse 1  ambient 0  brilliance 0 }
  }
  triangle{ P1,P2,P3 texture{T} }
#end

mesh
{
  VCT(<0,-1,20>, Red,
      <3,5,20>,  Green,
      <6,-1,20>, Blue)
  VCT(<-1,0,20>,  Yellow,
      <-4,-5,20>, rgbt<1,0,1,0.5>,
      <-6,2,20>,  Yellow)
}
vertexcolor.png
 



Valid HTML 4.01! Page last updated: Jun 20, 2002
Any comment or suggestion ?