[vtkusers] Uneven colors after the vtkButterflySubdivisionFilter

Bill Lorensen bill.lorensen at gmail.com
Sun Apr 21 12:12:48 EDT 2013


Maybe I have it this time.

Multiple problems:
1) First number of points must be used, not number of ploys
2) I think color interpolation is overflowing/underflowing the unsigned char

Solution. Use FloatArray for colors. After subdivision,  convert the floats
to unsigned chars, clamping between 0 and 255.

Attached is an example c++ that seems to work.



On Sun, Apr 21, 2013 at 11:46 AM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> Oops. I still see problems after that change.
>
>
>
> On Sun, Apr 21, 2013 at 11:45 AM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
>
>> Found the problem.
>>
>> You want to set the point data, but your colors array is filled for
>> NumberOfPolys. Replace NumberOfPolys with NumberOfPoints and the results
>> look good.
>>
>>
>>
>> On Sun, Apr 21, 2013 at 10:43 AM, DivyaS <div.anand141 at gmail.com> wrote:
>>
>>> Bill,
>>>
>>> Butterfly subdivision gives me better results(shape) to the actual data
>>> i'm
>>> working on. Is there no other way we can get this working? you were
>>> talking
>>> about assigned scalar float, single component values, I would like to
>>> give
>>> it a try.. could you please give me some details on that.
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://vtk.1045678.n5.nabble.com/Uneven-colors-after-the-vtkButterflySubdivisionFilter-tp5720205p5720244.html
>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>



-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130421/6c8dbebf/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SubdivideScalar.cxx
Type: application/octet-stream
Size: 4221 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130421/6c8dbebf/attachment.obj>


More information about the vtkusers mailing list