Jump to content

Dynamic Terrain


jerome
 Share

Recommended Posts

better resolution but bigger terrain : 300 x 300 quads ... big LOD in the distance ([4, 3, 2, 2, 1, 1, 1, 1]) and more detailed map : 2000 x 2000 points, so 4 millions of coordinate triplets

http://www.babylonjs-playground.com/#FJNR5#130

I suppose this fulfills the requirement about the ability to depict things miles away in the distance :D

Link to comment
Share on other sites

I just updated it so there are a little less terrain computation ... but GUI computations added :D

I add the same issue than yours a couple of days ago although the scene was unchanged (FPS drop). After profiling, I discovered that my browser was suddenly unable to optimize the terrain code for no visible reason. I just upgraded my browser to the latest version (chrome 59) and it worked back at 60 fps.

FF may be a bit slower on my machine but it's always more than 45-50 fps anyway.

Link to comment
Share on other sites

  • 1 month later...

Hi Jerome.

I love this extension! Thanks a lot.

I am using it for a hobby project where I need a finite square world. In the screenshot below i have populated my square world with pine trees, but the map continues infinitely in all directions:

world.png.082ef12579718b76b6d947d7606c0b3b.png

In the documentation you state that "by default, the terrain sees the map as infinite".

Is there a way to prevent this? I would like to show the map only once with no repeating at the edges. Is that possible?

Link to comment
Share on other sites

Thanks Jerome.

Using that approach I can prevent the user from looking at or exceeding the edges of the world, which might be a solution for me.

But I am trying to make some kind of 3rd person strategy game where it is possible to zoom all the way out and see the whole world surrounded by nothing but transparency.

Like this:

world_no_background.png.c3f3d348edc3ec2d883989be236adc4c.png

Or even better with a base like this:

world_w_base.png.a57824fce52af6b4670b0feb7b7b1cb6.png

I need the world to get cropped at the edges while retaining the ability to zoom and pan freely.

I can't see this is possible with your approach or am I missing something?

Link to comment
Share on other sites

Actually the dynamic terrain uses a not that big mesh in order to depict huge landscapes by moving and morphing it according to the camera movement.

In your case, you seem to need to display a static terrain, some kind of a part of a landscape if I understand well. Your terrain doesn't seem to need to move with the camera.

I think the best tool in this case is not the dynamic terrain but an updatable GroundMesh that you would morph according to your data.

Link to comment
Share on other sites

  • 1 year later...

Here are the two new features :

- the parametric terrain position from the camera, instead of the camera hooked mandatorily to the terrain center

- the ability to restrict the perimetric LOD computation, when enabled, to some terrain sides only. Example : the camera flights and looks only straight ahead so no need to set a perimetric LOD on the terrain lower side, neither on left and right sides. The upper distant side is enough. 

https://github.com/BabylonJS/Extensions/blob/master/DynamicTerrain/documentation/dynamicTerrainDocumentation.md#camera-position

demo PG to come soon

Link to comment
Share on other sites

Just having an idea about an extra feature for the dynamic terrain : a solid particle map data. ... The possibility to set solid particles in the terrain from a map of data : here, here and here, set a house, there, there and there set a tree, etc. Describe positions of objects in the map and they will dynamically be set on the terrain when flought over by the camera

if I can achieve such a thing of course ...

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.

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

Loading...
 Share

  • Recently Browsing   0 members

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