Kilombo Posted January 26, 2015 Share Posted January 26, 2015 Good evening everyone, long time no see. I've been away for a while, and didn't made many changes to my project. The first thing I made when i get my hands on, was to update to the latest release. Everything worked fine. But the images using "BABYLON.Mesh.CreateGroundFromHeightMap" changed, and lost some colors. Can some one give me a hand on this? The first image is relative to v1.12, the second is relative to v2.0. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 26, 2015 Share Posted January 26, 2015 Any chance of seeing the code used to create the texture? Is it possible that you are setting a parameter (like diffuseColor or emissive attributes for example) that might change the texture's color properties? Might be a change in the shader and not a change in the height map code. Quote Link to comment Share on other sites More sharing options...
Kilombo Posted January 26, 2015 Author Share Posted January 26, 2015 No prob mate, here you go. //Criação de chão da base. var gmat = new BABYLON.StandardMaterial("gmat", scenes[1]); gmat.diffuseTexture = new BABYLON.Texture("Textures/Ground_1.jpg", scenes[1]); gmat.diffuseColor = new BABYLON.Color3(.15, .05, 0); var ground = BABYLON.Mesh.CreateGroundFromHeightMap("ground", "Textures/heightMap.png", 200, 200, 250, 0, 6, scenes[1], false); ground.material = gmat; Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 27, 2015 Share Posted January 27, 2015 Hi,Try removing the diffuse color, or set it to 1,1,1. See if that helps. Kilombo 1 Quote Link to comment Share on other sites More sharing options...
Kilombo Posted January 27, 2015 Author Share Posted January 27, 2015 Yap... It worked. Thank you for the help. Do you know why ? What have changed ? Quote Link to comment Share on other sites More sharing options...
joshcamas Posted January 28, 2015 Share Posted January 28, 2015 diffuseColor in the new update can change the color of the diffuse texture. Not sure why, I guess it could be useful somehow. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.