Closed Hoikas closed 7 months ago
At the moment, it appears to not only eat the textures, but we also have some sort of checker pattern on everything:
Can you share a screenshot with the results before this PR?
Can you share a screenshot with the results before this PR?
Should look like this.
This PR is almost completely wrong and needs to be revised significantly.
Closing in favor of rewriting the entire mesh converter, someday.
This moves the piece-by-piece assembly of vertex colors from
_export_geometry()
into a one-stop-shop for getting the near final vertex colors as Blender knows them. Included in this is separating out the adjustment channels for wavesets - which are stuffed inside of vertex colors. It is now an error for a waveset to have a "col", "color", or "colour" vertex color layer. This is to prevent confusion. Wavesets now accept alpha (red), specularity (green), fresnel (blue), and edgelength (alpha) vertex color layers. The color values in these layers is averaged and output to the respective channels. Further, a default value for edgelength is now computed similar (but not exactly like) PlasmaMax'sSetWaterColor()
function. Artist input to the edgelength vertex color layer will modulate Korman's calculation.CC @DoobesURU to verify nothing breaks and that waveset vertex alpha should now function as expected.
This is still a draft because I would like to do a pass over eliminating list comprehensions in the tight inner loop of
_export_geometry()
. Until Python 3.12, list comprehensions are actually implemented as function calls. I see 1 comprehension for every face and 1 comprehension for every vertex (!!!), which are major targets for performance optimization.