Wings 3D Development Forum
custom vertex colours in Collada export. - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bug Reports (https://www.wings3d.com/forum/forumdisplay.php?fid=12)
+--- Thread: custom vertex colours in Collada export. (/showthread.php?tid=2974)



custom vertex colours in Collada export. - slight - 11-15-2020

I've already figured out and stepped around the problem and it is extremely niche and doesn't really need fixing, but since I spent a few hours pulling my hair out, figured I would post here maybe give you wings devs a chuckle..

I've been exporting models with vertex colours for some time in Collada format. Today, I imported a palette from a 2D pixel art app, I had to do the conversion manually in a spreadsheet, dividing byte values by 255, adding commas etc. it loads up fine in wings, everything is working great, until it comes time to export.

Exporter crashes with the message "bad args" in the log. After a lot of trial and error, the short version is: the collada exporter has a string parser the casts "0" or "1" to ints instead of floats, and the next part of the exporter chokes on those ints, and while I *had* done search and replace from " 0," to " 0.0," etc in the palette file, I must have been distracted in the middle of that task and skipped the replace on " 1}" > "1.0}" That left about 20 time bombs in the palette that only go off when saving a file, sometimes, and me testing things like maximum number of colours, maximum palette index etc. Fun times. Smile


RE: custom vertex colours in Collada export. - micheus - 11-16-2020

Thanks for report it.

I would appreciate to have the .dump file attached in your post. ;-)


RE: custom vertex colours in Collada export. - micheus - 11-17-2020

slight Wrote:Today, I imported a palette from a 2D pixel art app, I had to do the conversion manually in a spreadsheet, dividing byte values by 255, adding commas etc. it loads up fine in wings, everything is working great, until it comes time to export.
So, it looks like you filled the .dae file data before import in Wings3D, right?
Although it was loaded fine, maybe something was broken.

I exported a simple cube with some vertex coloured and the .dae file looks OK. The vertex colour are set with float values using this notation: 0.000000 0.200000 0.600000 (for RGB).

So, if you filled the colours values using "comma" instead of "dot" you may get something wrong.

It would be good you share your file if that was not the case and then I can have a closer look on it.