manyfold icon indicating copy to clipboard operation
manyfold copied to clipboard

OBJ files rendering doesn't include materials

Open Floppy opened this issue 4 months ago • 4 comments

@Floppy thanks for reply, but it didn't work. For example below. When I use the upload content with the zip, the content just ends up showing the 5 jpgs, and not even the obj. If I just put the zip in the /models directory and hit scan, nothing shows up.

2025-10-07_20.45.52-default-OSC_68e3adec.zip

Originally posted by @ForceConstant in #2306

Floppy avatar Oct 09 '25 08:10 Floppy

I've uploaded that file to my local server, and I can see 5 JPGs, one OBJ file and one MTL file.

Image

The OBJ rendering isn't showing the materials properly, which I'll look into, but I can definitely see all the files. @ForceConstant, if you look at the model after uploading the zip, and click "edit all files" do you see a list like above, but without the OBJ and MTL?

Floppy avatar Oct 10 '25 14:10 Floppy

Looking at the THREE.js code, it looks to me like the OBJLoader doesn't actually automatically load the MTL file - I thought it did. So, if you're just seeing no textures on the 3D model, that's why, and I can improve that.

But, I'm concerned that you're not getting a 3D model at all...

Floppy avatar Oct 10 '25 14:10 Floppy

Yes you are right, the obj/mtl files do show up in the bundle, but I would have expected the obj file to be the default "set as preview" and yes the material is not applied to the obj.

Thanks.

ForceConstant avatar Oct 10 '25 16:10 ForceConstant

Ok, great, that matches what I can see. I'll have a look at MTL rendering and see if I can think of anything around the previews.

Floppy avatar Oct 10 '25 17:10 Floppy