Viriatos Posted August 19, 2014 Share Posted August 19, 2014 Hello, I'd like to know if there is a way to apply a displacement map to a mesh. I'd like to apply it to a sphere, or a cube... Cheers,Viriatos Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 19, 2014 Share Posted August 19, 2014 Hello, due to the limitation we have with WebGL, this is not something supported right now. But you can do that "manually" by updating the mesh Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 19, 2014 Share Posted August 19, 2014 Also.. if I may (and if I understand the question)... ...if you want to do displacing on a plane... I believe the heightMapGround can be used in certain cases. The shade of gray used in the image... determines the amount of displacement. But it's for planes/grounds, and not usable on spheres or irregulars. (+y-axis displacements only, I believe). *shrug* And, I could be wrong (I often am) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 19, 2014 Share Posted August 19, 2014 I added new toys for you guys (1.14):Mesh.applyDisplacementMap() Sample: var sphere = BABYLON.Mesh.CreateSphere("Sphere", 32, 3, scene, true); sphere.applyDisplacementMap("/assets/amiga.jpg", 0, 1.5); Wingnut, Viriatos and Mark Bufton 3 Quote Link to comment Share on other sites More sharing options...
Viriatos Posted August 20, 2014 Author Share Posted August 20, 2014 Oh man! That is freaking awesome Deltakosh! Thank you so much! 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.