Jump to content

Move terrain in cycle from height map


Recommended Posts

Hello everybody! I'd like to create a terrain that is moving in cycle generated from height map in effective way. I created mesh with 

new BABYLON.Mesh.CreateGroundFromHeightMap('ground', "http://i1198.photobucket.com/albums/aa455/BelindaSaxondale/album/HeightMap.jpg", 200, 200, 50, -20, 20, scene, true);

So I have 200x200 plane with 50 subdivisions. Then I registered before render function in which I take first 51*3 points (51 vertices, cause there is 51*51 vertices) and put it at the end of position array of vertices data of mesh. So it should move the terrain in the cycle, but maybe I'm doing something wrong. Here is my playground: http://www.babylonjs-playground.com/#1CUE8G#5 . I achived something like this here: http://www.babylonjs-playground.com/#1CUE8G#3 but I don't think it's effective way.


Link to comment
Share on other sites

Hi I

Effective, efficient, or not... #3 is very cool... and quite fast.  I have been looking for ways to simulate high speeds... and #3 is does it well.

ArcCam view from re-positioned sphere... crazy ground-hugging speeds.  :)  Fun!  http://www.babylonjs-playground.com/#1CUE8G#8

I think that's fast enough for jet flight sim, or dragster/funnycar racing.  Pretty nice!  Well done.

Add a little vibration, a little banking, and it gets "intense".  :)  http://www.babylonjs-playground.com/#1CUE8G#10

I have no other suggestions.  Sorry.  Just wanted to give #3 the Wingnut Stamp of Coolness.  :)

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...