Jump to content

Simulating a far away Horizon.


aWeirdo
 Share

Recommended Posts

Hey all,

I was wondering if anyone knows any good ways of simulating a far away horizon?

With a completely flat ground mesh with 2 subdivisions, it isn't really a problem, since you can just scale it to 1000 x & z without much performance impact.

But when you need to add smooth height differences in the ground mesh to simulate a real area of ground,
you'll need a massive increase in indices in the ground mesh,

Protentially creating a huge performance impact on low-end devices.

Example; 
//1000 x 1000 ground, un-comment "subdivisions = scale;" at top of code section, and it jumps from 24 indices, to 6million, and even at that point, any height differences applied will not be super smooth.
http://www.babylonjs-playground.com/#1BXWQM#0

Link to comment
Share on other sites

I have a scene in dev where the camera moves a lot.  I found using 2 meshes worked well.

First mesh is the mountains.  It is irregular shaped.  The 2nd is a circle plane (built in blender, 32 verts).  You will never see "the corner" on a circle, so it does not need to be that big, vertex wise. 

I make the mountains mesh go through the circle plane very slightly, but in your case I would put the smaller terrain-ed mesh just slightly above the circle plane.  Hopefully, you will not be able to tell.

Link to comment
Share on other sites

Appreciate the responses guys :)

@JCPalmer 
Very interesting approach, i'll definitely look into that.
 

@meteoritool 
I'm not using any fog for this specific scene, the plan atm, is to add far away mountains and stuff on a skybox,

But i need the actual ground mesh to look and feel like it's going on forever, 
(Simular to the middle part of this picture)
salt_desert-t2.jpg

Link to comment
Share on other sites

you can build your plane directly in BJS (just set the tesselation parameter to 32 if you want only 32 vertices) : http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#disc 

you could also build some immutable SPS to depict the mountains (or anything else in the distance) with just few vertices : http://doc.babylonjs.com/overviews/Solid_Particle_System#create-an-immutable-sps

or unless what you have in the distance stays in the distance far away, maybe you don't really 3D for this and some sprites or textured billboarded planes could do the job 

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