Textue on 3D Model

Hi

My artist created a Model in the Blender as you can see in the following screenshot

Rendered In Blender

Then i export this blend file to OBJ including normal and triangular faces. My Artist also provides me a UV Mapped Textures. all things you can find here

All the Resources for 3D Shoe Model

I load the OBJ file and get the J3O file from it as it is included in above link.

Now when i load the J3O model in my code without explicitly load the texture from the code the model looks with red color on it as seen in the following link,

Red colored Model

so when i commented out textures line in the material file

#map_Kd shoes solve uvs.jpg
#map_Disp shoes solve uvs.jpg

and i load explicitly UV Mapped Textures using following code and set it to my model ,

[java]

TextureKey dm =new
TextureKey(“/Textures/Shoes/shoes solve uvs.jpg”,false);
mat.setTexture(“DiffuseMap”, assetManager.loadTexture(dm));
myModel.setMaterial(mat);
[/java]

it looks like following , i have covered here each side of the model.

http://imgur.com/a/mfiCq#0

so i am 95% getting my expected result but still not getting the result as i can in Blender , so what am i missing ?

I used following light

        [java]   AmbientLight al = new AmbientLight();
        al.setColor(ColorRGBA.White.mult(3.3f));
        rootNode.addLight(al);
	
	DirectionalLight sun = new DirectionalLight();
	sun.setDirection(new Vector3f(-0.5f, -0.5f, -0.15f).normalizeLocal());
	sun.setColor(ColorRGBA.White);
	rootNode.addLight(sun);[/java]

does it have any effect on Model ?

I am hoping a really good reply from JME expert.

Thanks
Mihir Parekh

Just a guess but are you 100% sure that

assetManager.loadTexture(dm)
returns a texture and not null, or throws an exception?

It looks like you have set a red material colour in the material somehow and then that is getting multiplied in with the texture. I’d also suggest checking for a red light. I can see you are using white but check inside the model using the scene explorer to be sure there are no red lights attached to the model.

Your “it looks like the following” link isn’t working so I can’t see that one…

Have you tried:

[java]TextureKey(“/Textures/Shoes/shoes solve uvs.jpg”,true);[/java] (note the true) ?

Check out this video, it explains EVERYTHING.

Hi
it is this link

http://imgur.com/a/mfiCq#0

Please check it.

Thanks

Hi

normen you give me this video link 3rd times(in my every question) I watch it so many times but it starts with model with material already loaded , currently my issue is the model is not applied material properly.

now after comments from the thetoucher it looks like the following

Shoe Model with the edge getting Pixeleted

you will see here the edges are pixeleted and now the only problem you will see here is the Shoelace it does not like a shoelace in Blender or any other 3D modelling Software.

based on the normen video link

when i try to import the OBJ in the jMonkeyEngineSDK

Step -1

Step -2

Step - 3

I am getting following messages from jMonkeyEngine SDK window output application

Unknown statement in MTL! map_disp Cannot locate uvs.jpg (Flipped) (Mipmapped) for material shoes solve uvs.mtl Loaded material definition: Phong Lighting Unknown statement in OBJ! o Child (shoes solve uvs-geom-0) attached to this node (shoes solve uvs-objnode) Child (shoes solve uvs-geom-0) attached to this node (Root Node) Uniform g_CameraPosition is not declared in shader [ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex, language=GLSL100], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment, language=GLSL100]]. Uniform g_WorldMatrix is not declared in shader [ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex, language=GLSL100], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment, language=GLSL100]]. Uniform m_ParallaxHeight is not declared in shader [ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex, language=GLSL100], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment, language=GLSL100]]. Uniform m_UseMaterialColors is not declared in shader [ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex, language=GLSL100], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment, language=GLSL100]]. Root Node (Node): Child removed. Component hidden Unknown statement in MTL! map_disp Cannot locate Models/shoes solve uvs/uvs.jpg (Flipped) (Mipmapped) for material Models/shoes solve uvs/shoes solve uvs.mtl Loaded material definition: Phong Lighting Unknown statement in OBJ! o Child (shoes solve uvs-geom-0) attached to this node (shoes solve uvs-objnode)

now please suggest me something i have 95 % solved my problems based on your answers experts.

@mihir said: Hi

normen you give me this video link 3rd times(in my every question) I watch it so many times but it starts with model with material already loaded , currently my issue is the model is not applied material properly.

Yeah, I asked you to watch that whole video so many times and you still only watched the beginning it seems.

Hi Normen

I managed to get rid of all the problem about JME3.

will you help me on this question

http://hub.jmonkeyengine.org/forum/topic/3d-models-and-direction-light-ssue-in-jme3-canvas-within-swing/

Thanks

@normen

will you help me on this question ?

Question

Thanks