Dieterich Posted October 18, 2018 Share Posted October 18, 2018 What best way to create dynamic surface elevation? In my case, I want up/down elevations in one surface...as shown in the figure the elevation points in blue. This my starter case: http://www.babylonjs-playground.com/#3SLQPI#2 Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted October 18, 2018 Share Posted October 18, 2018 Can you use a texture for that? http://doc.babylonjs.com/babylon101/height_map Else you would need to manually edit the mesh data: http://doc.babylonjs.com/how_to/how_to_merge_meshes Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted October 18, 2018 Author Share Posted October 18, 2018 Hi @Deltakosh Hey, see this: http://playground.babylonjs.com/#1XBLWB#227 This example is more approximate. One question. How up/down the subdivisions? OBS: I don't use image for create surface.. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 18, 2018 Share Posted October 18, 2018 http://playground.babylonjs.com/#1XBLWB#228 Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted October 18, 2018 Author Share Posted October 18, 2018 Great! ? I need learn the option to update vertices.. But, why the 'updatable' do not necessary in 'CreateTiledGround'? or I don't know correctly your function?? Why on define 'wireframe' false, the faces they are not connected? http://playground.babylonjs.com/#1XBLWB#230 Quote Link to comment Share on other sites More sharing options...
jerome Posted October 19, 2018 Share Posted October 19, 2018 you could also consider using a ribbon : http://doc.babylonjs.com/how_to/ribbon_tutorial Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 19, 2018 Share Posted October 19, 2018 1. Updatable is a hint for the graphics card. You should use it when you know that the mesh will be updated multiple times: this way the data will be in a memory that both CPU and GPU can reach. It is less efficient than setting updatable = false because in this case the data will be in fast GPU memory. When updatable = false, calling setVerticesData will recreate the content (which is ok if you do it just a few times) 2. This is because your faces do not share vertices: You can replace the TiledGround by a regular ground: http://playground.babylonjs.com/#1XBLWB#231 Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted October 19, 2018 Author Share Posted October 19, 2018 @jerome @Deltakosh Your tips are productive. I'm elaborating some examples and in the sequence I will ask some tips. Thanks a lot! see you later. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted October 22, 2018 Author Share Posted October 22, 2018 Hi! How make the smooth appearance? it's possible? http://www.babylonjs-playground.com/#88AZQ#47 Quote Link to comment Share on other sites More sharing options...
jerome Posted October 22, 2018 Share Posted October 22, 2018 if you set a random elevation each vertex, you'll get something very sharp. You could use some math function to get more linearity or a perlin noise function Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted October 23, 2018 Author Share Posted October 23, 2018 This is new for me, 'perlin noise function'. I go look this function.. The problem is that my surface must be dynamic, I have to think better how I'm going to do .. Thanks @jerome Quote Link to comment Share on other sites More sharing options...
coolroar Posted October 23, 2018 Share Posted October 23, 2018 I made this http://playground.babylonjs.com/#2VXLRC using: Way-to-go JohnK Scroll to end of code for how to use Bezier smoother. ? ? JohnK and Dieterich 2 Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 23, 2018 Share Posted October 23, 2018 Smooth and dynamic ? http://www.babylonjs-playground.com/#88AZQ#51 Dieterich, ssaket and coolroar 3 Quote Link to comment Share on other sites More sharing options...
coolroar Posted October 23, 2018 Share Posted October 23, 2018 @ -- JohnK: Wow! Beautiful & Voluptuous! ? ? JohnK 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted October 23, 2018 Author Share Posted October 23, 2018 ??????? @coolroar & @JohnK I'm speechless to describe your work. Good work dude! Great! coolroar and JohnK 2 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 24, 2018 Share Posted October 24, 2018 Flagging as solved! Thanks guys! 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.