saltemishel

Members
  • Content count

    38
  • Joined

  • Last visited

About saltemishel

  • Rank
    Advanced Member
  1. @Deltakosh Arr, sorry about the later reply didn't realised there's a second page already. Thank you! Anyway, in case anyone needed it, you need to include the latest version of the custom shader in order for it to work. https://github.com/BabylonJS/Babylon.js/releases/tag/v3.0.0 inside dist>>materialsLibrary>>babylon.customMaterial.min.js Thanks all!
  2. Woo~ Cool. Thanks! Works like a charm. I thought it's going to involve a lot of vector stuff. Thanks again!
  3. Hi All, How do I move the camera/mesh towards the direction it's facing and side ways? I tried to search in the forum but the examples links are always expired or something. Thanks
  4. Cool, so is the new method using the flat shader or is it converting to flat meshes but using another method? Thanks~!
  5. hmm.. nope just change the colour but still the same.
  6. @sable sorry about the noob question, I'm not sure if I'm missing anything, though you've already show me the playground. It looks like this after I implement this material, maybe I'm doing it wrong? https://www.dropbox.com/s/w4bx67e9gd36h6k/Screenshot 2017-07-13 11.34.12.png?dl=0 this is what I did: this.mesh = BABYLON.Mesh.CreateGroundFromHeightMap("ground", "media/graphics/sprites/heightmap.jpg", 256, 256, 50, 0, 50, wgl.game.currentScene, false, this.successCallback.bind(this)); var mat = new BABYLON.CustomMaterial("cm", wgl.game.currentScene); mat.Fragment_MainBegin( "vec3 U = dFdx(vPositionW);" + "vec3 V = dFdy(vPositionW); " + "vNormalW = -normalize(cross(U,V));" ); this.mesh.material = mat; Ow it says Uncaught TypeError: BABYLON.CustomMaterial is not a constructor Edit: I implemented this library, the error is now gone but it's still looking like in the screenshot https://preview.babylonjs.com/materialsLibrary/babylon.customMaterial.min.js
  7. Ya, I think converting the whole mesh to flat feels a bit overkill too. In the meantime, I try the options to have 2 different mesh and doing the ray intersection way too. Thanks for the suggestions
  8. Hi Jerome, Thanks for the info, do let me know when you have the fix for this. Thanks!
  9. Hi @Deltakosh, I've modified this playground to flatshade it. http://www.babylonjs-playground.com/#1LEGTP Modified version: http://www.babylonjs-playground.com/#1LEGTP#3 Thanks!
  10. Hi All, It appears that .getHeightAtCoordinates() doesn't correctly when I'm using .convertToFlatShadedMesh() Without converting to flat shaded mesh https://www.dropbox.com/s/fydn2uq78ek43qm/Screenshot 2017-07-12 10.50.08.png?dl=0 After converting to flat shaded mesh, the boxes starts to float everywhere https://www.dropbox.com/s/982wiz0rnjfshvm/Screenshot 2017-07-12 10.52.03.png?dl=0 Can this be fixed? Or is there a way for my to make the ground flat shaded without using .convertToFlatShadedMesh()? Thanks.
  11. Basic scene not playable in IE11 windows 8.1

    Aww..it's ok, turns out threejs doesn't work on that mechine too.
  12. preloading meshes before creating scene

    I'll keep the same screen then. Thanks
  13. Basic scene not playable in IE11 windows 8.1

    Thanks, looking forward to the good news.