[vtkusers] altering the normals

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sat Jun 22 12:03:52 EDT 2002


>>>>> "Mepisto" == mepisto  <mepisto at hotmail.com> writes:

    Mepisto> hi all, I m trying to simulate bump mapping on a sphere
    Mepisto> by changing the normals in a random manner. I actually
    Mepisto> make a vtkFloatArray with random numbers and copy that
    Mepisto> array with the SetNormals to a vtkPointData of the
    Mepisto> sphere.  The methode doesnt work. What I m I doing wrong?

Setting the normals wont do the job.  You need to warp the existing
polydata.  I'd suggest that you add your random bump values as a
vector and then use the vtkWarpVector class to warp the polydata using
the vectors at each point.

cheers,
prabhu



More information about the vtkusers mailing list