juanmajr93 Posted February 12, 2017 Share Posted February 12, 2017 Hi this is my heightmap where blue area is the lowest and orange color is the heightest. However, babylonJS interprets the orange/red color to the lowest zone like blue area. How can change this? Thanks Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 12, 2017 Share Posted February 12, 2017 The heigtmap are textures with colors of black and gray. http://doc.babylonjs.com/tutorials/height_map Quote Link to comment Share on other sites More sharing options...
Raggar Posted February 12, 2017 Share Posted February 12, 2017 If you use the 'Black and White' filter in Photoshop, you can adjust the strength of all colors, like the blue, orange, green etc. This took literally 5 seconds, and I'm sure there is something in GiMP that creates the same result if you prefer a free application. Quote Link to comment Share on other sites More sharing options...
jerome Posted February 12, 2017 Share Posted February 12, 2017 Else you can also change the default behavior here : https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.mesh.vertexData.ts#L1410 Quote Link to comment Share on other sites More sharing options...
jerome Posted February 13, 2017 Share Posted February 13, 2017 I just added the ability to define your own color filter : var filter = new BABYLON.Color3(1.0, 0.5, 0.2); BABYLON.MeshBuilder.CreateGroundFromHeightMap('m', url, {colorFilter: filter}); The ability to change the way the gradient to elevate the ground altitude is computed. Default : Color3(0.3, 0.59, 0.11) as usual grey gradient. Just wait this PR is merged in the core, please. JackFalcon, Dad72 and NasimiAsl 3 Quote Link to comment Share on other sites More sharing options...
juanmajr93 Posted February 13, 2017 Author Share Posted February 13, 2017 yeah! @Raggar I did it. I used Photoshop to change the image that is the same that you posted. I was my solution. Good advice @jerome thanks! 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.