Sign in to follow this  
juanmajr93

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.

DB

Share this post


Link to post
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.

image.thumb.png.2b1c7baa68d859f8da5838a6aaa975a6.png

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.

 

Share this post


Link to post
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.

Share this post


Link to post
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.

image.thumb.png.44c6ebb6f016563455799f38899fa723.png

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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.