Why are my materials not being applied to imported objects

Hi,

I have several hundred meshes that were created from a single mesh (exported in Sequoia using hacksaw tool). Each mesh object file has a corresponding .png file that is the material file. The obj and png files use the same exact filename except for the extension). i.e. SP_66.obn SP_66.png

I’ve yet to be able to import even one of the obj files and have the png material applied, even though I put the png file in the materials folder prior to importing the object. Once the obj is imported, in the inspector I have the import materials box checked, with the Material Naming set to From Model’s Material, and Project-wide, then apply (I’ve tried very combo and when I drag the obj into the scene it’s still gray).

I’ve spent hours trying to figure this out with no avail, so any help would be greatly appreciated!

Thanks!

Thanks Noradaj123 and RobAnthem for your replies. I switched to .fbx and have a png file, but am still not able to have the png applied as the material to the objects. Do I need more than the .fbx and .png file? i.e do i need a .mat or .mtl file? I have 300 objects that I need to import with materials applied and still can’t even do one. I think it may be where I’m putting the files? I’ve tried the 2 different directory structures on this page, but none of them create the material files and apply it to the object. https://forum.unity3d.com/threads/unity-not-importing-textures-or-creating-materials-from-fbx-maya.192516/

Here are the dir structures i’ve tried per the post above:

Model Folder Name

  • model.FBX
  • Materials Folder
    ++ textures.png

-Models/MyModel
–Materials/MyMaterial
—Textures/MyTexture.png

Do you know the directory structure and proper settings on the Inspector in order to get the png to be applied to the material without having to drag and drop it on the object? i.e. is it Model Naming: From Model’s Material

Also - Have you heard about this tool and do you think it could automate my importing so I don’t have to manually apply hundreds of textures to my objects?

https://forum.unity3d.com/threads/defaulter-customizable-default-import-settings.444852/

Many thanks for your help! I’m new to Unity and loving it, but having a hard time with this.

Brett

This sounds like a problem I had. If you are programmatically setting materials it is possible that you do not have the shader loaded at compile time. just make a generic material using the shader you need so it gets compiled then you should be able to use the shader through scripts.