Load OBJ material sidecars in importer - #12843
Draft
Reza2kn wants to merge 1 commit into
Draft
Conversation
Reza2kn
force-pushed
the
codex/obj-mtl-import
branch
from
July 10, 2026 17:08
f917f31 to
9576d31
Compare
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.
Related
objfiles doesn't load associatedmtlfiles #3773.objmesh files #3772What
This PR makes native OBJ file imports resolve their Wavefront material sidecars instead of logging the OBJ bytes as a standalone
Asset3Dblob.When an
.objfile is opened through the importer, Rerun now:.mtlfiles relative to the OBJ file,Mesh3Ddata,Kd/dvalues toMesh3D::albedo_factor,map_Kddiffuse textures and logs them asMesh3Dalbedo textures.This leaves non-OBJ mesh imports on the existing
Asset3Dpath.Screenshot
Imported OBJ with its referenced MTL and PNG texture preserved:
Notes
#3772 fixed
.objmedia-type guessing. The remaining issue in #3773 was that an OBJ file loaded by itself has no access to its MTL/texture sidecars at render time. Resolving those sidecars in the native file importer lets the viewer receive completeMesh3Darchetypes with material data already attached.Validation
cargo fmt -p re_importergit diff --checkcargo check -p re_importercargo test -p re_importer --test test_obj_importercargo test -p re_importercargo clippy -p re_importer --all-targets -- -D warningscargo check -p re_view_spatialRUST_LOG=error cargo run --package rerun-cli --no-default-features --features release_no_web_viewer -- /Users/Ajab/Downloads/Meshy_AI_Color_Ripple_0710165213_texture_obj/Meshy_AI_Color_Ripple_0710165213_texture.obj --headless --screenshot-to .context/obj-mtl-screenshot/color_ripple_obj_import_wide.png --window-size 1900x1100 --renderer=metal