PDA

View Full Version : Obj not loading with textures.



Sdwills7
07-01-2018, 05:18 AM
Hey all.
I'm new to Lightwave, just purchased it in February. So first, a big hello.
I've been trying to open an obj in Modeler but it loads with no texture maps applied.

The obj has the accompanying textures and the .mtl file. I've heard sometimes the obj, mtl, and textures need to be in the same folder, so I tried that and that did not help.
I finally just started manually applying the texture maps but there were too many and finally quit.

Really appreciate any help to figure out why this is happening.
I'm using version 2018

Ma3rk
07-01-2018, 07:03 AM
While all of that is true, the mtl file itself isn't the texture but rather just a text file with descriptors for the various attributes. If the object has image maps, there'll be a full path to their location. Open the mtl file up in a simple text editor and take a peek.

Usually when opening an obj in Modeler that has the mtl file and if it can't find a file, it'll bring up a warning requestor box to skip or replace. You didn't mention that happening though so something else going on. Normally when it asks & you find the first missing texture, Modeler will find the rest if they're in the same path.

Hope that gives you some clues.

erikals
07-01-2018, 07:05 AM
not sure,

you could try MTL Import/Export by Mike Green >
http://www.mikegreen.name/Lscripts.html

(scroll down)


...or use Fbx

Sdwills7
07-01-2018, 07:20 AM
While all of that is true, the mtl file itself isn't the texture but rather just a text file with descriptors for the various attributes. If the object has image maps, there'll be a full path to their location. Open the mtl file up in a simple text editor and take a peek.

Usually when opening an obj in Modeler that has the mtl file and if it can't find a file, it'll bring up a warning requestor box to skip or replace. You didn't mention that happening though so something else going on. Normally when it asks & you find the first missing texture, Modeler will find the rest if they're in the same path.

Hope that gives you some clues.

It is true that it did not ask to skip or locate, that box did not pop up, the model just loaded with no textures. I will take a peek at the .mtl file and see. Thank you.

Sdwills7
07-01-2018, 07:21 AM
not sure,

you could try MTL Import/Export by Mike Green >
http://www.mikegreen.name/Lscripts.html

(scroll down)


...or use Fbx

I've heard of that while trying to research my problem. I'll take a look.

Sdwills7
07-01-2018, 07:30 AM
I opened the .mtl file and copied a number of entries. Also I want to make sure I am posting in the correct area, is this the proper area, or do questions post under the tips/tricks thread?

newmtl Terrain
d 1
Kd 0.80000001 0.80000001 0.80000001
map_Kd /Maps/sfd_Terra02.jpg

newmtl Stairs1
d 1
Ns 0.94999999
Ni 0
Ka 0 0 0
Kd 0.80000001 0.80000001 0.80000001
Ks 0.60000002 0.60000002 0.60000002
Km 0.0020000001
map_Kd /Maps/sfd_Steps.jpg
map_Bump /Maps/sfd_StepsB.jpg

newmtl Stairs1_sfd_Steps2
d 1
Ns 0.94999999
Ni 0
Ka 0 0 0
Kd 0.80000001 0.80000001 0.80000001
Ks 0.60000002 0.60000002 0.60000002
Km 0.0020000001
map_Kd /Maps/sfd_Steps.jpg
map_Bump /Maps/sfd_StepsB.jpg

newmtl Roofing
d 1
Ns 0.89298892
Ni 0
Ka 0 0 0
Kd 0.80000001 0.80000001 0.80000001
Ks 0.60000002 0.60000002 0.60000002
Km 0.2
map_Kd /Maps/sfd_ArchRoof.jpg
map_Bump /Maps/sfd_ArchRoofB.jpg

newmtl RoofingWallCylinder
d 1
Ns 0.89298892
Ni 0
Ka 0 0 0
Kd 0.80000001 0.80000001 0.80000001
Ks 0.60000002 0.60000002 0.60000002
Km 0.2
map_Kd /Maps/sfd_ArchRoof.jpg
map_Bump /Maps/sfd_ArchRoofB.jpg

Marander
07-01-2018, 08:50 AM
OBJ textures are typically in a Maps folder. As Ma3rk mentioned, check the mtl file if the path is correct in a text editor in if required search and replace.

In LW 2015.3 texture maps did not load with the OBJ import. In LW2018.0.4 the OBJ import works well for me including materials with texture maps.

rustythe1
07-01-2018, 01:01 PM
Is it because the names are different, the mtl file should have the exact same name, if one got re named then it won't get seen

Ma3rk
07-01-2018, 02:27 PM
I opened the .mtl file and copied a number of entries. Also I want to make sure I am posting in the correct area, is this the proper area, or do questions post under the tips/tricks thread?

newmtl Terrain
d 1
Kd 0.80000001 0.80000001 0.80000001
map_Kd /Maps/sfd_Terra02.jpg

newmtl Stairs1
d 1
Ns 0.94999999
Ni 0
Ka 0 0 0
Kd 0.80000001 0.80000001 0.80000001
Ks 0.60000002 0.60000002 0.60000002
Km 0.0020000001
map_Kd /Maps/sfd_Steps.jpg
map_Bump /Maps/sfd_StepsB.jpg

:
:


Ya, LW- Community is fine for things like this.

I forgot to mention that you might also send the object over to Layout & look at it there with VPR. Complex textures simply won't show in Modeler.

So, this file is looking for your images in a subfolder called /Maps/ so simply delete that if the files are in the same folder or replace it pointing to a path of your choice.

jaf
07-01-2018, 03:03 PM
Also, check out the image files like sfd_Steps.jpg in an image viewer.

jwiede
07-01-2018, 04:40 PM
It looks like it's expecting each of the different textures in slightly differently-named directory sub-trees, so probably just couldn't find them. Try removing all the path prefixes (leaving just the map filenames), putting them all in the same directory as the OBJ & MTL, and then try reloading OBJ and MTL.

Sdwills7
07-01-2018, 10:33 PM
Instead of quoting each of you, I want to say thanks to each of you. You have given me some things to go on, seeing how its back to work tomorrow, this may take me several days to check out as the week days are so hectic.
I also want to check out the exporting application, I'm not sure why they are going to a dir named 'Maps' as I know of no such directory and it isn't where I save the .obj, .mtl, nor the textures to.

Much thanks and I will check into this and get back with a reply on progress, etc. Lightwave is brand new to me so progress is slow. =P

Sdwills7
07-07-2018, 05:47 AM
Ok, the problem is fixed, I don't know what happened but it is working now. I installed the 2018.5 patch and it worked first time. I don't know if it had to do with the .05 version fixing something or if something was wrong with my initial install as far as paths go.

I've been a bit confused on the proper directory structure (path) f regarding where LW likes to load obj's and such from. Regardless, it is working now and much thanks to those who replied.

erikals
07-07-2018, 07:27 AM
thanks for the update  
good to know .5 patch might have solved it for future reference   :)