<div dir="ltr">Maybe I have it this time.<div><br></div><div style>Multiple problems:</div><div style>1) First number of points must be used, not number of ploys</div><div style>2) I think color interpolation is overflowing/underflowing the unsigned char</div>
<div style><br></div><div style>Solution. Use FloatArray for colors. After subdivision,  convert the floats to unsigned chars, clamping between 0 and 255.</div><div style><br></div><div style>Attached is an example c++ that seems to work.</div>
<div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 21, 2013 at 11:46 AM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oops. I still see problems after that change.<div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Apr 21, 2013 at 11:45 AM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Found the problem.<div><br></div><div>You want to set the point data, but your colors array is filled for NumberOfPolys. Replace NumberOfPolys with NumberOfPoints and the results look good.</div>

<div>
<br></div></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Sun, Apr 21, 2013 at 10:43 AM, DivyaS <span dir="ltr">&lt;<a href="mailto:div.anand141@gmail.com" target="_blank">div.anand141@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Bill,<br>
<br>
Butterfly subdivision gives me better results(shape) to the actual data i&#39;m<br>
working on. Is there no other way we can get this working? you were talking<br>
about assigned scalar float, single component values, I would like to give<br>
it a try.. could you please give me some details on that.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Uneven-colors-after-the-vtkButterflySubdivisionFilter-tp5720205p5720244.html" target="_blank">http://vtk.1045678.n5.nabble.com/Uneven-colors-after-the-vtkButterflySubdivisionFilter-tp5720205p5720244.html</a><br>



<div><div>Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<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"><div><br></div></div></div><div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>