feat: base-color texture support for DAE meshes#111
Open
vklemm wants to merge 2 commits intoSimple-Robotics:mainfrom
Open
feat: base-color texture support for DAE meshes#111vklemm wants to merge 2 commits intoSimple-Robotics:mainfrom
vklemm wants to merge 2 commits intoSimple-Robotics:mainfrom
Conversation
Add end-to-end support for loading and rendering base-color textures from mesh files (DAE/COLLADA and other Assimp-supported formats). Meshes without textures continue to render identically via a 1x1 white fallback texture, avoiding shader branching. - Vendor stb_image v2.30 for image decoding (PNG/JPEG/BMP/TGA/HDR) - Add UV coordinates (texCoord) to DefaultVertex and extract from Assimp - Extract base-color texture paths from Assimp materials (PBR then Phong) - Add LoadTexture utility: GPU upload, white fallback, material sampler - Update PBR shaders (opaque + transparent) to sample baseColorTex - Bind per-view textures in RobotScene render loop - Add TestTextureSupport with 8 test cases; update existing tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
COLLADA/DAE uses OpenGL convention (V=0 at bottom) while Vulkan and stb_image use top-left origin. Flip V to 1-v when extracting UVs from Assimp to get correct texture mapping. Also adds a self-contained TexturedMesh example with a checkerboard quad DAE test asset, and a new test verifying DAE texture path extraction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
|
Thanks for this @vklemm, I wanted to add this feature for a while. We don't have an AI policy defined. For now I'll just ask if you reviewed the code carefully. I'll build and run the code locally to see what it looks like. Could you post screenshots in your PR (the new example as well as some models you displayed using this new code)? Also, I'll need you to format your code using pre-commit and update the changelog 😃 |
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.
Summary
LoadTextureutility for GPU uploadDefaultVertex, extract from Assimp with V-flip for Vulkan conventionbaseColorTex— meshes without textures use a 1x1 white fallback (no shader branching)TexturedMeshexample with checkerboard test asset for visual verificationTest plan
TestTextureSupport— 10 test cases covering vertex UVs, texture path extraction, DAE loading, shader metadataTestShaderMetadata— updated for new sampler countsTestMeshData— updated fortexCoordfield🤖 Generated with Claude Code