Importer does not apply all texture types to materials
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Is your feature request related to a problem? Please describe.
Source model has textures set, but not all of them does applied to materials automatically
Describe the solution you'd like
Automatic textures applying to materials after model import
Additional context
Replaces/close #473 — that issue is now outdated; the 3D importer has been rewritten using Silk.NET.Assimp and the original report no longer applies to current code.
Current behavior
When importing a 3D model, only three texture types are mapped to material slots:
TextureType.Diffuse→ Diffuse layerTextureType.Normals→ Normal map (MaterialNormalMapFeature)TextureType.Specular→ Specular layer
All other texture types are imported into the project as assets but are not assigned to the generated material.
Unimplemented texture types
The following types contain // TODO: Add support comments in MeshConverter.cs and produce no material output:
TextureType |
Stride material slot |
|---|---|
Emissive |
MaterialEmissiveMapFeature |
Ambient |
Ambient occlusion |
Reflection |
? |
Opacity |
MaterialTransparencyBlendFeature |
Shininess |
? |
Displacement |
MaterialDisplacementMapFeature |
Height |
? |
Expected behavior
Each recognized TextureType should be mapped to the appropriate Stride texture type and assigned to the generated Material Asset, consistent with how Diffuse/Normals/Specular are already handled.
Steps to reproduce
- Import any PBR model (FBX or GLB) that includes emissive, opacity, or roughness textures.
- Inspect the generated
MaterialAssetin Game Studio. - Only diffuse, normal, and specular slots are populated; all other textures appear as orphaned assets.
References
- Legacy issue: #473 (outdated — importer has since been rewritten)
- Source location:
sources/tools/Stride.Importer.3D/MeshConverter.csaround line 1322
Additional info
I'm not quite sure about the correct texture types in Assimp and Stride.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in sources/tools/Stride.Importer.3D/MeshConverter.cs around the TODO comments near line 1322, and compare the existing Diffuse, Normals, and Specular mappings. Review the listed Assimp TextureType values and corresponding Stride material features, then inspect a generated MaterialAsset from a model containing the additional texture types. Done means supported textures are assigned to the appropriate generated material slots instead of remaining orphaned assets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100