Repository navigation
Metric UVs on pulled meshes - #31
Merged
Merged
Conversation
Revit sends no UVs, so a pulled mesh could not take a texture without an unwrap per object, and Unreal had nothing to build lightmap UVs from. Every mesh built by the pull (elements, shared instance meshes, linked models) now gets a UVMap in meters: each face projected on its own plane, u horizontal on walls and roofs, world X and Y within 5 degrees of horizontal. Computed with numpy, which Blender ships: about 0.2 ms per tiny mesh, half a second for a million triangles. numpy is added to the CI Python job for the new tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The metric UVMap becomes a scene choice, saved with the .blend like the reset-transform one: on by default, off for whoever unwraps their own way. Shared instance meshes and linked models follow it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Revit sends no UVs: a pulled mesh needed an unwrap per object before it could take a texture, and Unreal had nothing to build lightmap UVs from (Roberto's flow goes Blender -> Unreal -> Quest 3 over Link).
Every mesh built by the pull (elements, shared instance meshes, linked models) now gets a
UVMapin meters:uhorizontal on walls and roofs,vup the face, so bricks and boards stay level;Regenerated on every pull like the mesh. Known limit: curved surfaces break slightly between faces.
bridge_uv.pyis pure numpy (Blender ships it), tested under pytest; numpy added to the CI Python job. smoke_pull checks the map on a flat element, an instance and a linked element.Cost, Blender 5.2: 8000 tiny linked elements 1.8 s -> 2.5 s (about 0.2 ms per mesh built); 980k triangles in 0.5 s.
🤖 Generated with Claude Code