UVW Maps

I created an animated model, but when I export it and import it into jme, the .j3o file doesn’t have a material. I have a .material file (exported from 3DS). When I make a new material myself and make the UVW Map as diffuse, the texture is not applied well. What should I do to make it work right? (Either by using the imported material or by making a new material)

What do you mean “not applied well”? Maybe you just need to flip the texture? The uv coords should be stored in the mesh.

I honestly don’t know what’s happening. It’s like applying a UVW map to an object it’s not made for. I am trying out a new model which should work.

Did you try flipping the texture? I cant help you if you just keep babbling about some problem without giving insight.

I tried flipping it, but nothing happened…



About the problem - I have made a model which comes with a .material file. I made it using 3DS Max. However, the material is not applied to the .mesh.xml file. I tried making a material file myself and added the UVW.jpg as a Diffuse Map. However this didn not display the model correctly. Then, I tried making the UVW.jpg file as a Color map, and it does show up correctly on the model. However, it lost a lot of quality.

I found the problem. Apparently when I load a new model, jme can’t find the UVW.jpg requested by the .material file. Therefore it is applying a red material to the model. What should I do to make jme load the .jpg?



P.S. The UVW.jpg is in the same folder as the other files.

When importing, make sure the material file has the same name as the mesh. So you say the texture is in fact applied correctly but it (obviously) doesn’t look like a 3DS render preview?

The error is Cannot locate resource: UVW.jpg (Mipmaped). jme doesn’t find the UVW.jpg and thus makes the model’s material RED(this is what is says). I will try to export again, maybe there was some kind of error.

Avoid using .material files try to use .j3m.

@glaucomardano, But I was using the diffuse map for the UVW and it was not displaying correctly. If you could tell me why this was happening, I would appreciate and follow your suggestion.

Anyway, I solved the problem. What I did was drag-and-drop the .jpg from a folder on my computer into my model’s folder in JME. That solved the problem.



@Normen, thanks for your help.

I managed to make the Diffuse Map with UVW work by ticking VTangent, but the quality dropped a lot.

Dropped from what? The plain red material? xD

No lol, from the .Material :stuck_out_tongue:

How did you get to set the VTangent from a .material file?

My question is where did you see the “good quality”? If you compare to the render output of 3dMax then thats an unfair comparison, 3dMax uses non-realtime raytracing.

@normen, When I added the .jpg into the model folder with the .material the quality was much more superior than when I made a new material. However, I did notice that the .material has the following lines in addition to the UVW.jpg:

ambient 0.5882 0.5882 0.5882 1

diffuse 0.5882 0.5882 0.5882 1

specular 0 0 0 1 10



@glaucomardano, From the new material not the .material.

Can you upload the difference between them xD?

With the latest nightly, you can create a j3m file from any geometry, do that and check what parameters you are missing.

@glaucomardano, I didn’t understand what you mean. But the most evident difference is the ambient, diffuse and specular maps.



@normen, will try!



Thanks a lot everyone for your help.