feat: base-color texture support for DAE meshes#111
feat: base-color texture support for DAE meshes#111vklemm wants to merge 6 commits intoSimple-Robotics:mainfrom
Conversation
|
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 😃 |
76b4190 to
9f8c502
Compare
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>
9f8c502 to
62e081f
Compare
|
Hey @vklemm, I did some work to get the CI back to working (including fixes with bizarre pre-commit behaviour). I'm able to run the new
Could you also add or modify a Python example, so that a textured robot appears? I'm not sure which robot descriptions include textures in their meshes right now. |

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