I have the same problem that Karima has,<br><br>I tried Jeff&#39;s solution but it does not work.<br>so I decided to tried  a vtkColorTransferFunction, but it does not work either...<br>any other ideas.?<br><br><br><br><br>
<p>vtkColorTransferFunction * pColorTransferFunction = 
vtkColorTransferFunction::New(); for (int i = 0; i &lt; m_iNumberOfColors;
</p><div class="footer noise"><p>
</p></div><p>i++) {
    pColorTransferFunction-&gt;AddRGBPoint(value[i], red[i], green[i],
blue[i]);
}
// pColorTransferFunction-&gt;SetAlpha(0.1) does not work also!!

</p><p>vtkPolyDataMapper * pPolyDataMapper     = vtkPolyDataMapper::New();
pPolyDataMapper-&gt;SetInput(pPolyData);
pPolyDataMapper-&gt;SetLookupTable(pColorTransferFunction);

</p><br><br>Karima,<br>
<div class="im"><br>
&gt; I have a 3d model and I have for each point(x,y,z) of my model its texture<br>
&gt; (r,g,b).<br>
<br>
</div>Do you mean color? Texture coordinates (i,j) should be assigned using<br>
SetTCoords.<br>
<br>
I assume instead you have RGB (0-255) colors for each point. These can<br>
be assigned to a 3-component vtkUnsignedCharArray and added to the<br>
PointData. Name the array, and call<br>
<br>
mapper-&gt;SetColorModeToDefault(<div id=":143" class="ii gt">);<br>
mapper-&gt;SetScalarModeToUsePointFieldData();<br>
mapper-&gt;SelectColorArray(name);</div><br><br><br><br><div class="gmail_quote">On Mon, Mar 30, 2009 at 9:30 AM, Jeff Baumes <span dir="ltr">&lt;<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Karima,<br>
<div class="im"><br>
&gt; I have a 3d model and I have for each point(x,y,z) of my model its texture<br>
&gt; (r,g,b).<br>
<br>
</div>Do you mean color? Texture coordinates (i,j) should be assigned using<br>
SetTCoords.<br>
<br>
I assume instead you have RGB (0-255) colors for each point. These can<br>
be assigned to a 3-component vtkUnsignedCharArray and added to the<br>
PointData. Name the array, and call<br>
<br>
mapper-&gt;SetColorModeToDefault();<br>
mapper-&gt;SetScalarModeToUsePointFieldData();<br>
mapper-&gt;SelectColorArray(name);<br>
<font color="#888888"><br>
Jeff<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Diego Martinez<br>University of Nebraska at Lincoln<br>1110 S. 67st, PKI 108<br>Omaha, NE 68182<br>+1 - 402 - 575- 8881(Cell)<br>+1 - 402 - 554 - 3537(Lab)<br>
+1 - 402 - 238 - 1908(SkypePC)<br><br><br><br><a href="mailto:dmartinez@unomaha.edu">dmartinez@unomaha.edu</a><br><a href="mailto:damartinez80@gmail.com">damartinez80@gmail.com</a>(personal)<br>