Jump to content

Height Map changes from 1.12 to 2.0


Recommended Posts

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.





Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...