Jump to content

Creation of ground


Recommended Posts

I would personally create the ground as a squre, and use a material/texture with an alpha channel to create any shape you wish to be rendered. I believe this would be far simple than what is currently being discussed; however, I'm not certain what the final use will be, and there may be a few rare cases where masking the geometry with an alpha channel for renderig may not produce the results you require - such as in the case of particle collisions.


Link to comment
Share on other sites

Hi @Deltakosh, @dbawel, @Wingnut, @jerome

l have considered that create a ground like a irregular figure is imposible with BabylonJS. If I use a material or texture with an alpha channel, I don't get the results that I want. This material is applied to all parts of ground.


Another question is relative to the creation of some information layers overlapping to the ground. My first idea was drawing a polygon whose points had the coordinates x and z (choosen by me) and y (defined by the height of ground). However, It does not work because de polygon is plane. Could you help me?

Thanks in advance.


Link to comment
Share on other sites

This might be worth a try.

Create a polygon matching the shape you want http://doc.babylonjs.com/tutorials/mesh_createxxx_methods_with_options_parameter#polygon

Increase number of vertices within polygon by adding this function http://babylonjsguide.github.io/snippets/Increasing_Facets

Use a heightmap image with low level fur material to change vertical height of vertices by using the customize the material including a heightexture.

Away from PC for a week plus so cannot give a PG example.

Link to comment
Share on other sites

hi @JohnK I have set the polygon under the area that I have to cover. See it in the follow image. The follow goal is to define the heightmap of this polygon which must be the same to the ground. My final objective is to delimite different areas of the ground which represent an interesting feature of the terrain represented.


Maybe another solution could be the representation of custom mesh where I could define each point and set them to the level of ground. Other solution could be an extrusion of polygon to the level of ground. Both can be developed?

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