Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Importing FBX Models fails when trying to import or convert the materials

A topic by FlynnCat Games created Oct 22, 2019 Views: 175 Replies: 2
Viewing posts 1 to 3

When trying to import a series of test models exported from Blender 2.8 as FBX, I am getting the following error:


ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

The trace underneath is huge, but the relevant bit seems to point here:

MAST_PrepModels.CreatePrefabsFromModels () (at Assets/FSP/MAST/Scripts/Tools/MAST_PrepModels.cs:185)
MAST_Tools_Interface.OnGUI () (at Assets/FSP/MAST/Scripts/Interface/MAST_Tools_Interface.cs:61)

It seems that when doing the import of FBX it's not able to find the material, as the matIndex variable winds up not being real.

If anyone else is seeing this issue, importing the same models as OBJ (along with their exported mat files) works perfectly without any issues at all.

I will address this over the next few days.  In the meantime, export from Blender as .obj and copy .mtl and .png with the models and it will work.

(1 edit)

I cannot reproduce your error.  I've successfully imported FBX files with and without textures.  I tested both ways with models exported from Unity as well as Blender.

I would appreciate it if you could email me at fertilesoilproductions@gmail.com with the model that produces the error.