MeltyTool icon indicating copy to clipboard operation
MeltyTool copied to clipboard

[Bug] Mipmap LODs not working correctly in viewer

Open Deschamps12 opened this issue 1 year ago • 2 comments

Describe the bug When trying to export models in any format, it gives missing method error. Also upon importing .BMD the model is black now, previous versions would load materials properly.

System.MissingMethodException: Attempted to access a missing method. at fin.model.io.exporters.assimp.indirect.AssimpIndirectModelExporter.ExportFormats(IModelExporterParams modelExporterParams, IReadOnlyList1 exportedFormats, Boolean exportAllTextures) at uni.games.ExporterUtil.Export[T](T threeDFileBundle, Func1 loaderHandler, ISystemDirectory outputDirectory, IReadOnlyList`1 formats, Boolean overwriteExistingFile, String overrideName) in C:\Users\Ryan\Documents\CSharpWorkspace\FinModelUtility\FinModelUtility\UniversalAssetTool\UniversalAssetTool\src\games\ExporterUtil.cs:line 268

On Import image

Exporting image

Deschamps12 avatar Aug 02 '24 16:08 Deschamps12

Thanks for reporting this issue, sorry about that! Exporting is fixed now, though the material issue probably isn't.

Is this model from Twilight Princess?

MeltyPlayer avatar Aug 08 '24 13:08 MeltyPlayer

After more investigation, I've figured out that this problem has to do with how mipmaps are rendered in the viewer. It turns out that the first mipmaps for this character are the expected texture, but the second mipmaps are black (which I'm assuming is expected behavior?). It's always rendering with these second mipmaps for some reason, which is why the character always appears all-black.

So this is just a viewer issue, the characters should still export correctly. I just need to fix how the renderer uses mipmaps, so it switches between textures at the correct distance.

MeltyPlayer avatar Aug 11 '24 16:08 MeltyPlayer

Finally fixed this in a recent commit.

MeltyPlayer avatar Oct 19 '24 01:10 MeltyPlayer