Hi, I took some time to investigate the issue and wanted to provide an update:
TLDR Section
Summary:
- The issue only happens when the bulk importer needs to split an OBJ (by necessity when the file is too large, or by user choice if the “Import File As Single Mesh” option is not ticked)
Current immediate workarounds:
- If you don’t need split meshes, tick the “Import File As Single Mesh” option and the UVs will import properly
- Otherwise, I know this is not ideal, but the only thing I can suggest right now is to either export as FBX, or import your OBJ in blender/some other editor and re-export as FBX.
END TL:DR Section
The Problem
I started off by making a basic mesh and texture in blender and exporting them as OBJ together. I then imported the OBJ using both the bulk importer and the explorer tree view importer. I also exported the same file as FBX and imported that as well.
As you can see, all 3 worked fine.
I then downloaded the meshes linked above (Kriss sights, colt, & crowbar) to test applying my crappy texture to them.
Importing via regular import worked fine, although as discussed above, the crowbar is too large for that import flow. (note this flow merges meshes by default, so mesh splitting is not possible)
Next I imported them using the bulk importer, once with mesh merging ticked and once without. Finally!! Reproduction!!
As you can see, the colt on the left (merging ON) has the texture properly applied, while the one on the right (split, see missing cylinder) has a blank texture; this is indeed what would happen if the UVs were all pointing to 0,0 (as theorised, and proved, in a different thread).
Finally I imported the OBJ into blender and re-exported it as FBX and then imported the FBX into studio with mesh splitting and got this result:
Both colts are split properly (missing cylinders) but the FBX (left) has the texture properly applied while the obj (right) does not.
I decided to really simplify the problem down and have 2 basic shapes a cube and a rectangle:
As you can see, the issue persists; the unsplit (left most) has the texture applied while the split meshes (middle and right) don’t. So the issue really is with bulk importer splitting OBJ files into multiple meshes and does not involve mesh complexity (although mesh complexity may force the bulk importer to split meshes which will result in the issue appearing).
On Solving the Issue
So we know what part of the import flow is responsible… easy fix right? Unfortunately not so much, the bulk importer was built to work with the current mesh importer (i.e. merge mesh files by default). To make mesh splitting (and import of multi-mesh files as separate meshes) a possibility, it actually generates a temporary file for each separate mesh in the file you are importing and then feeds them one by one to our importer.
There likely is some issue when generating/importing these temporary files.
I will spend a some more time trying to figure out if these temporary files are the culprit and how it’s happening. I’ll report back when I get anything.