Closed madman271 closed 2 years ago
Hello,
could you please provide path to PMG that contains that color2 attribute (actually factor).
Thanks in advance
Thanks, @mwl4 Here the download link, containing 3 models. They are taken from ATS Utah DLC, no file has been modified.
View: [cut]
Direct download: [cut]
These models will trigger "incorrect number of Piece streams" error when converting back the .pim file to the binary form (.pmg) using SCS Converter tool. The "us_cross_left_column_ut.pim" file has missing Color2 stream ("_FACTOR" tag) at Piece index #0. The "us_cross_single_mirror_ut.pim" has similar problem at Piece index #0. The "us_light_single_only_ut.pim" has similar problem at Piece index #1.
Thanks. I will remove links, as it is proprietary data.
I will come with fix soon.
Issue has been addressed in https://github.com/mwl4/ConverterPIX/commit/baa41477b92045520ff91b47bb98301aae51278c Keep in mind though, that _FACTOR is not imported by SCS Blender Tools, so most likely it will be not re-exported from Blender.
To test changes I did conversion of us_cross_left_column_ut from pim to pmg by new version of ConverterPIX, and back to pmg via pim2pmg from SCS conversion tools. Both pmg files in hex editor had the same factor attributes.
Thank you for the revised code, @mwl4
About the conversion process, I'll take care of it. This color factor may very important maybe SCS decides to put additional tweak to vertex color. I've been stripped color factor to object in original asset that supposed to have it, the results are disaster with random polygons floating around. So yes, color factor still required regardless it's available in Blender or not. Thanks.
Color2 processing code supposed to be there in /src/model/model.cpp:1294 (right after "if (currentPiece->m_color)" block) but missing. This is causing a .pmg file containing Color2 attribute producing the output .pim with missing stream for "_FACTOR" tag. SCS Binary Converter gives error regarding to mismatch "StreamCount" in Piece block due of missing one stream. Hope this is fixed, thank you.