[Release] v0.18.1 — Sky rendering, AgX tonemapping, color-grade LUTs - #1168
Merged
Conversation
… see it `untoldengine export --optimize` launches Blender with --factory-startup, which excludes user site-packages from sys.path in Blender's embedded Python interpreter — and that interpreter ignores PYTHONPATH entirely, so there was no way to inject a dependency into it via environment variables. `untoldengine bootstrap` only ever verified lz4 against the system python3, a completely different interpreter, so "already installed" gave false confidence while every --optimize export failed with ModuleNotFoundError: No module named 'lz4'. Install lz4 with `pip install --target` into ~/.untoldengine/tools/blender-python-packages using Blender's own bundled python3 (for compiled-extension ABI compatibility), verified under -I (isolated mode) so the check can't be fooled by unrelated user-site installs. untoldexplorer.py's _compress_geometry_chunks falls back to inserting that directory into sys.path itself when the normal import fails.
…nc's -normal mode Normal maps were losing precision twice on the way to the GPU: the Blender export step force-downconverted any 16-bit RGB source to 8-bit before ASTC compression even ran (the 8-bit-downconvert rule was written for sRGB color textures, whose 16-bit variant Metal can't represent, but got applied unconditionally to normal maps too, which are linear/non-color data the sRGB gap never affected). Then texbake.py compressed the result with generic ASTC RGB encoding, whose default error metric perceptually weights green the way it does for color images — the wrong tradeoff for a vector's X/Y/Z components, and it showed up as visible noise on fine per-texel surface detail (fabric weave, wrinkles) once lit. Generalize the 16-bit-preserving exemption (previously height-only) to normal maps, and switch texbake.py's normal-slot encode to astcenc's `-normal -perceptual` mode, which re-weights the error metric for unit-vector data and repacks the map as 2-component X+Y (freeing bits otherwise spent on an inferable Z channel). Thread a new NativeTexFlags.normalPackedXY flag through the .utex header so the engine knows which decode to use, and reconstruct Z in modelShader.metal / TransparencyShader.metal for textures baked with the new encoding. Existing raw (non-ASTC) normal maps are unaffected and keep the direct 3-component decode.
Metal's MTLSamplerDescriptor.maxAnisotropy defaults to 1 (off), and the engine's shared sampler cache never set it. Minifying a texture at a grazing angle without anisotropic filtering picks a single isotropic mip level sized to the longest axis of the screen-space footprint, over- blurring the other axis instead of resolving it — visible as jagged, stair-stepped edges on fine high-frequency textures (fabric weaves, floor tiles) viewed off-axis. Set maxAnisotropy to 16, the practical max on Apple GPUs. This is a single shared sampler cache keyed only by wrap mode, so the fix applies to every texture slot (base color, normal, roughness, metallic, emissive, height) across the whole engine, not just one material.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary:
Bumps to v0.18.1 and rolls up the following since v0.18.0:
Features
Fixes
Docs