Forum Discussion
AI Complaint Department
Here is the issue with the PNG OBJ and MTL. All the files were producing these names, and I still have one that is unusual. This one was running through Visual Studio.
// This does not look like a normal file name. Cylinder Mesh Mesh_Cylinder Mesh_Cylinder_Phong[32] it should be Mesh_Cylinder_Phong[32] or even better Phong[32] and everything was getting named like this plus. I believe this issue corrupted one of my png's and it was parsed as path Mesh about 10 times then lightening png.png which is unusual. Even the AI was complaining about these names when I was debugging. Either visual studio was or is giving wild names, or something internally was adding them. You have to open the files and view the source code to see the issue. Every file I had in the assets did this applying Mesh about times or this Mesh_Cylinder to each name. This is one I might have missed, and it was made in the Graphics Designer. I thought might have been Blender that did this but do not recall running this one through blender. It was test png with a red texture and I all I did was change the name to a new PNG called lightning to test the texture in my Visual Studio app. Embedded resources
newmtl Cylinder Mesh Mesh_Cylinder Mesh_Cylinder_Phong[32]
illum 2
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.000000 0.000000 0.000000
Ns 1.000000
map_Kd Lightning.png
this is the OBJ example
mtllib Cylinder.mtl
#
# Cylinder Mesh Mesh
#
g Cylinder Mesh Mesh
#
# Cylinder Mesh Mesh_Cylinder Mesh_Cylinder_Phong[32]
#
usemtl Cylinder Mesh Mesh_Cylinder Mesh_Cylinder_Phong[32]
v 1.000000 2.500000 0.000000
v 0.951057 2.500000 0.309017
v 0.951057 -2.500000 0.309017
v 1.000000 -2.500000 0.000000
v 0.000000 2.500000 0.000000
v 0.000000 -2.500000 0.000000It might be addressed already but as descriptive as possible. The problem occurs when you use Object Viewer. Ocne you have scene.obj you click that file. You have to add an object like a teapot for example. You click on the mesh of the teapot and in the right panel there will be an option to add a texture. There is a down arrow on the edge where it says name or something similar where it says texture. That's where you pick the earth.png for example and it applies to the model. Save the file and look at your mtl file names they will be normal. Close the mtl file normally. Click on the obj file so everything opens in the viewer again. Do same thing you did earlier just changing the name of the png to a different png in the object viewer and you'll see the texture applies to the model. Save the file. Open your mtl file and see what changed bedsides the png file name. All your paths will say mesh mesh or something similar. So when you have 3 materials for a mesh they all would change to mesh mesh mesh material1 for example. So every time you edit something and save in the object viewer you get another mesh added to the other files names from just loading object viewer making a change and then saving the file.