Jump to content

Issues importing OBJ files


Coop

Recommended Posts

I have been attemping to download 3D models in to VW 2020. The files are OBJ ext. with MTL and JPG files attached. All files are in the same folder but

when attempting to download VW gives me message that it can not find the MTL file. I have checked the spelling and the OBJ and MRL names match. 

It seems to be a bit unpredictable in that I have had success with other OBJ files. It seems to be a bit hit and miss.  Any possible explanations or experiences with

importing OBJ files would be greatly appreciated ..

Thanks

  • Like 1
Link to comment

It's most likely a problem with the address to the files it refers to. In the OBJ file itself, you should have a reference to the material file, which has a reference to the image file. The best way is to keep it as simple as possible, that is keep the referring files in the same folder. In the obj file, you should then have a reference line, for example like this "mtllib rrr.mtl" to a file called "rrr.mtl" It then looks for files at the same level in the Finder. In the material file (.mtl), you should find a reference to the image file or files looking like this "map_Kd rrr.jpg", in this case referring to an image file called "rrr.jpg".

 

So, keep it simple and it will work, at least if the program doing the export generates a clean file. Personally, I almost always export from TouchCAD, where the export is rock solid in the sense that it imports visually perfectly. What VW does not do well is that it tends to mess up the panel structure within the model, which can be quite annoying if you want to edit the model.

 

 

  • Like 1
Link to comment

@Claes Lundstrom I have purchased a lot of 3d content from the Turbosquid site over the years.  I mainly use those items in my c4d program, but I do also import them into VW quite often.

My experience is that only .OBJ or .3ds are the only formats that will bring in textures when importing to VW.

 

That said, it seems to be a bit hit and miss as to which file format works best for any given file.  OBJ seems to be a bit more consistent, but you were correct in that the OBJ file and the MTL file have to be in the same folder.  Same for 3ds.  If you dont have all the downloaded materials/textures in the same folder, when you import into VW the textures will not be applied.

 

I am sure you are already quite aware of what I am alluding to.

But....I have downloaded OBJ formatted items where the person who created the 3d object initially, their .mtl file was included in the download, but did not work.  I have no idea why.  That would be way above my understanding or pay grade. :-)

 

  • Like 1
Link to comment

Claes and Kevin,

Thank you all very much. I found that the  name of MTL file in the OBJ file was not named correctly. I spelled out he complete MTL file name and 

it worked out. I also found that in some of the OJJ files you can not edit the mesh when you import it. I tried this and lost all of the textures for the file.

I guess the OBJ files are a bit hit and miss and really depends on who  and how the files are created.

Thanks again for your help.. This is my first time using this forum and it is very helpful.

Best,

 

Link to comment

Oh, good.  You at least discovered why it was wreaking havoc. :-)

 

I will tell ya....it is a bit persnickety when dealing with importing 3ds and OBJ files, when it comes to textures.

 

And yes OBJ ALWAYS imports the items as meshes. Many times there are several meshes.  Do a 'select all' and you will see if there is more than one mesh.

 

Just make absolutely sure you have the textures in the same folder as the OBJ file, and the .mtl file.

Otherwise it will never apply the textures.  You may have also noticed that when you import an OBJ, depending, they almost always come in on a different axis.  At least mine do.  But, it is pretty easy to rotate the object to coincide with the orientation you want.

 You will find that most of the folks here on the forums are very positive and helpful.  Nothing like people in the rest of the world. :-)

 

 

 

  • Like 1
Link to comment

Coop

One more thing regarding importing OBJ files.  I forgot to mention.  I don't have your file to compare, but one reason you may have lost the correct look of your textures on the mesh(es) has to do with the texture mapping you chose.

 

 I attached a file below. It was imported from an OBJ file of a couple of slices of watermelon.

 

** When you open the file, click of one of the watermelon slices and note on the render tab of the OIP the texture mapping designation says "Imported".  You have to use the imported option.  Any other option will look like hell on the object.  

Perhaps check your file/object you had mentioned and see what the render designation is for that mesh.

 

1327930642_ScreenShot2020-12-27at2_41_36PM.thumb.png.9b148ed1ad57be3a5a40dfc9aefdac31.png

 

WATERMELON SLICES v2020.vwx   

Link to comment

@Coop Geeze, I just can't shut up. :-)

Also....if you downloaded the watermelon file, it should have arrived as an open GL rendering using 'very high' as the setting.

 When dealing with curved objects using open GL, you pretty much need to use High or better yet, Very high to have the curved object look right.

 

Should look like this:

 

WATERMELON.thumb.png.8327ccbc54ee2922c7baf1c5c9acea62.png

 

 

Link to comment
29 minutes ago, Kevin K said:

When dealing with curved objects using open GL, you pretty much need to use High or better yet, Very high to have the curved object look right.

 

While this is true regarding curved objects, Meshes are inherently made only of 3D polygons which never have true curves, so this setting shouldn't affect Meshes at all.

Link to comment

 Andy

Did you have a bad Christmas, you ol’  curmudgeon!   😉

You are correct.....I think.

but......if the crease angle is not set pretty high......the mesh will look awful.

Don’ you agree?

My comment mainly had to do with curved geometry in general. I have come upon situations in the forums where some folks had complained about curved geometry on some 3d objects looking pretty faceted in Open GL.  Hence my comment about setting the quality a bit higher. 

Link to comment
1 hour ago, Kevin K said:

 Andy

Did you have a bad Christmas, you ol’  curmudgeon!   😉

 

haha I had a great Christmas!! 😄 

 

1 hour ago, Kevin K said:

but......if the crease angle is not set pretty high......the mesh will look awful.

Don’ you agree?

My comment mainly had to do with curved geometry in general. I have come upon situations in the forums where some folks had complained about curved geometry on some 3d objects looking pretty faceted in Open GL.  Hence my comment about setting the quality a bit higher. 

 

That is quite true about actually curved objects in OpenGL - I just want to make sure folks reading this thread don't mix it up with anything having to do with Meshes since Meshes aren't curved 😉 

Speaking of the OpenGL "Detail" setting, a few months ago I actually filed two enhancement requests on JIRA related to it:

  1. That it should be renamed "Curved Geometry" to better describe its function and to match the analogous setting within Renderworks Styles.
  2. The default setting in standard templates should at least be High because as you describe, the default Low setting is often terrible. With graphics cards being so much better these days this setting should really default to something better.

 

And then unrelated to the "Detail" setting is the OpenGL "Crease Angle" which you also mentioned. This setting relates only to the black OpenGL "Edges" which can be turned on or off. You're correct that low values look odd, so I usually leave this on the default "70."

 

The other thing related to Mesh representation is "Smoothing Angle" which is controlled per Mesh in the Render tab of the OIP (and also has a Document Preferences default). This value is also a "Crease Angle" so perhaps this is what you were referring to (another case of too many things having similar names). Here, values of 50-90 or so tend to be helpful for Meshes that want to appear smooth and curved, while turning off Mesh Smoothing is good for architectural objects with hard edges.

 

5 hours ago, Coop said:

I also found that in some of the OBJ files you can not edit the mesh when you import it. I tried this and lost all of the textures for the file.

 

Unfortunately this is true for Meshes in general. They only retain their imported texture mapping if you don't edit them. If you double click to edit the contained 3D polygons, or Convert the Mesh to Group, you'll lose all texture mapping. I really wish this weren't the case, but perhaps it'll be improved some day.

The one thing you CAN do is marquee over vertices of the Mesh (while outside of it) then drag those vertices around. This retains the internal UV mapping of the imported Mesh while giving you a tiny bit of edibility (can be useful depending on the circumstances).

  • Like 1
Link to comment

Yeah......what Andy said.  🙂
 

That is kind of a rub though, having to walk on eggshells when electing to edit a mesh and it’s applied textures going bonkers.

I  need to mess with that a bit. 
My personality does not allow a mesh to get the better of me.......much to the chagrin of meshes.  🙂

  • Laugh 1
Link to comment
5 hours ago, Andy Broomell said:

 

haha I had a great Christmas!! 😄 

 

 

That is quite true about actually curved objects in OpenGL - I just want to make sure folks reading this thread don't mix it up with anything having to do with Meshes since Meshes aren't curved 😉 

Speaking of the OpenGL "Detail" setting, a few months ago I actually filed two enhancement requests on JIRA related to it:

  1. That it should be renamed "Curved Geometry" to better describe its function and to match the analogous setting within Renderworks Styles.
  2. The default setting in standard templates should at least be High because as you describe, the default Low setting is often terrible. With graphics cards being so much better these days this setting should really default to something better.

 

And then unrelated to the "Detail" setting is the OpenGL "Crease Angle" which you also mentioned. This setting relates only to the black OpenGL "Edges" which can be turned on or off. You're correct that low values look odd, so I usually leave this on the default "70."

 

The other thing related to Mesh representation is "Smoothing Angle" which is controlled per Mesh in the Render tab of the OIP (and also has a Document Preferences default). This value is also a "Crease Angle" so perhaps this is what you were referring to (another case of too many things having similar names). Here, values of 50-90 or so tend to be helpful for Meshes that want to appear smooth and curved, while turning off Mesh Smoothing is good for architectural objects with hard edges.

 

 

Unfortunately this is true for Meshes in general. They only retain their imported texture mapping if you don't edit them. If you double click to edit the contained 3D polygons, or Convert the Mesh to Group, you'll lose all texture mapping. I really wish this weren't the case, but perhaps it'll be improved some day.

The one thing you CAN do is marquee over vertices of the Mesh (while outside of it) then drag those vertices around. This retains the internal UV mapping of the imported Mesh while giving you a tiny bit of edibility (can be useful depending on the circumstances).

 

 

There was in fact a bug in older editions of VW, where it didn't import and process normals correctly. The result was meshes having facets where there was not intended to be there. Normals are what controls what looks smooth or not in meshes in case somebody is wondering. A well designed model should have such information included, and would therefore look smooth where intended almost regardless of mesh resolution. OK, perhaps not always, which you could clearly see in older computer games when looking closer at supposedly round objects. Anyway, as said before, most of these problems have been fixed, though the current 2021 still has some issues with messing up perfectly organised and well structured meshes making them more difficult to use and edit than it has to be.

 

As for editing the mesh resolution, it's not possible. You have to rely on the exporting program to do a good job, so the result can be of very mixed quality. Many programs with OBJ exporting capabilities have very poor shape control and/or control over the texture mapping and resolution.  

  • Like 3
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...