Map color changes after importing model in jme

Hello sir, I have been using blender for editing my 3d model and also for applying material and textures on it. Whenever i am importing model from blender to jme my model renders correctly with textures but my map color also gets change. I tried to fix many times but still the same issue appears. The thing i figured out only after UV mapping this thing happening. please help me how to fix this issue. Many thanks.

I tried to attach the image but it asking link for the image. How can I attach image which is saved in my system? same for code button also. after pressing it it is giving only java tag. I am newbie please don’t mind my silly question.

Images: http://imgur.com

Code: Cut + paste into the java tags.

Here it is…when i imports model without material it doesn’t effect map but when i imports model with material, map color gets change. Below are the link for the images with and without material.

Link for image Without material …

Link for image with material…

Please help me why it is happening and how to fix it. Seems like my image is not displaying after pressing image button so i am pasting link directly below…
without material link(http://imgur.com/LqVPV1Z&9cqyMjJ#0)
with material link(http://imgur.com/LqVPV1Z&9cqyMjJ#1)

It’s because you are using the “pretty imgur page with all of the buttons” and not the actual image link. Click on the image first. Use that link.

You will know it is the image link because it will have the full image name + extension.

Regarding your issue, is that in the JME Scene Editor or in your own code?

Thanks for your kind reply pspeed. Its not in JME scene editor. I imported the model from blender and executed my code and found this issue again and again. I changed my model even though the same issue. Seems like its glowing my map after importing it. Have you seen my image?. Definitely i am doing some mistake but where i don’t know.

Yeah, I clicked through to the image. Before I asked to see code then I wanted to make sure it was your code.

You can also try loading them in the SDK’s Scene Editor to see if you have the same issue.

Otherwise, we will have to see code to figure out problems with your code.

You mean in “Edit in scene composer” option. If it is the same option you are referring then i am not able to see my model there. It is showing black screen with one cube. Below are the code which is loading my model and attaching to the root node.

[model_player = (Node) this.app.getAssetManager().loadModel(“Models/mesh0001.mesh.xml”);
model_player.setLocalScale(3f);
model_phy = new CharacterControl(new CapsuleCollisionShape(1.5f, 15f, 1), .1f);
model_phy.setPhysicsLocation(new Vector3f(0, 10, 0));
model_player.addControl(model_phy);
this.app.getRootNode().attachChild(model_player);]

I think map color is not changing its glowing. is isn’t?

@pankaj8932 said: You mean in "Edit in scene composer" option. If it is the same option you are referring then i am not able to see my model there. It is showing black screen with one cube. Below are the code which is loading my model and attaching to the root node.

[model_player = (Node) this.app.getAssetManager().loadModel(“Models/mesh0001.mesh.xml”);
model_player.setLocalScale(3f);
model_phy = new CharacterControl(new CapsuleCollisionShape(1.5f, 15f, 1), .1f);
model_phy.setPhysicsLocation(new Vector3f(0, 10, 0));
model_player.addControl(model_phy);
this.app.getRootNode().attachChild(model_player);]

Well, somewhere you are also setting up a light and loading the town, etc…

In the scene composer, did you turn on the light?

Yes, As in tutorial mentioned i need to add light to view the scene in the screen. If it is the case(adding light) then it should create problem for both with material and also without material. I deleted that line of code which adds light after that i am not able to see my town map.

yahooo…it got fixed…I modified this line “ambientLight.setColor(ColorRGBA.White.mult(1.3f)); to this ambientLight.setColor(ColorRGBA.White.mult(0.3f));”. Still don’t know why i need to reduce the while. I think in blender it is also adding light in the model but how it is effecting to map?.. Please explain me why it was effecting map. Many thanks for all your reply pspeed.

Explanation of basic lighting calculations.

http://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0CEkQFjAC&url=http%3A%2F%2Fgraphics.cs.cmu.edu%2Fnsp%2Fcourse%2F15-462%2FFall04%2Fslides%2F08-shading.pdf&ei=1BwaU6-bJI-f7gbk0IHACw&usg=AFQjCNFsY2eIJKlm2BYzjFzLwKnOYbY20Q&sig2=Z9U-vsXS9qqJsb1NZ1rAKQ&bvm=bv.62578216,d.ZGU

@pankaj8932 said: yahooo.....it got fixed......I modified this line "ambientLight.setColor(ColorRGBA.White.mult(1.3f)); to this ambientLight.setColor(ColorRGBA.White.mult(0.3f));". Still don't know why i need to reduce the while. I think in blender it is also adding light in the model but how it is effecting to map?... Please explain me why it was effecting map. Many thanks for all your reply pspeed.

Lit materials are prone to an effect called “saturation” similar to overexposure in a digital camera.

It’s possible the map material is so bright that 130% lighting is saturating it. For instance if you have a pale pink material with diffuse color (red=1.0, green=0.8, blue=0.8) and the shader multiplies that by 1.3 (for 130% lighting) you end up with all components >1 which saturates to white (red=1.0, green=1.0, blue=1.0).

Light sources and lighting components add, so if you have multiple light sources or a material with both diffuse and specular components, it’s fairly easy to saturate, even with fairly dark materials.

Lit materials are invisible in the absence of light sources, which explains why deleting the light source made the map invisible.