Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve vertex color exporting significantly. #396

Closed
wants to merge 3 commits into from

Commits on Jan 15, 2024

  1. Improve vertex color exporting significantly.

    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's `SetWaterColor()` function. Artist input to the
    edgelength vertex color layer will modulate Korman's calculation.
    Hoikas committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    ec633db View commit details
    Browse the repository at this point in the history
  2. Remove the per-face list comprehension.

    This means that we gather up the UVs for every vertex in a temporary
    tuple of tuples at the beginning of the export process. That's more
    memory intensive, but it removes quite a bit of fiddling in the tighter
    inner loops, so it's an overall win.
    Hoikas committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    24150bc View commit details
    Browse the repository at this point in the history
  3. Unroll the DX9 normal correction.

    timeit indicates that this is a 43% improvement in performance.
    Hoikas committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    ccf7340 View commit details
    Browse the repository at this point in the history