riidefi / RiiStudio

Editor for various 3D model formats
https://riidefi.github.io/RiiStudio/
88 stars 16 forks source link

BMD - Textures without coordinate generator #11

Closed Wexos closed 3 years ago

Wexos commented 3 years ago

I attached a BMD file from MKDD. It has a single material, which contains two textures but only a single texture coordinate generator. In the samplers tab it says "cannot edit: source data is invalid!". In the second TEV stage it says "TODO: TexCoord != TexMap: Not valid". The two textures use the same generator for both textures in both TEV stages.

signal1.zip

riidefi commented 3 years ago

I've thought this over a bit, and I think the best solution is to split shared texgens into unique ones after the file is read. Then on write, an additional optimization step can merge duplicate texgens. This would also improve the output of BRRES files.

riidefi commented 3 years ago

Note: This was the same issue affecting Galaxy's bombtimeattackplanet.bdl With the latest commits, this should be entirely fixed.