Three.js: plane geometry drawing suggestion

Created on 28 Jul 2015  路  7Comments  路  Source: mrdoob/three.js

By my last reaserch i have been using THREE.PlaneGeometry or THREE.PlaneBufferGeometry for creating topografic applications and by this mean it would be better for real ground visualisation to create a plane havieng 4 triangles for a cell instead of two that there are now. So i am suggesting to add option to the type of the drawing applied in the geometry. What do you think?

Suggestion

Most helpful comment

As discussed here, and in #6920, there does seem to be interest in alternate tessellations of terrain geometry.

I do not believe PlaneBufferGeometry will be changed at this point.

All 7 comments

In what sense do you feel 4 triangles per cell is "better"?

As an aside... THREE.PlaneBufferGeometry uses indexed BufferGeometry, meaning the vertices and normals are shared. That is great for smooth terrains.

For low-poly, faceted terrains, you can use the same geometry, because MeshPhongMaterial supports flat shading using screen-space derivatives. (In other words, you do not also need non-indexed geometry with unique normals per face.)

So, perhaps THREE.TerrainBufferGeometry could have 4 triangles per cell.

In the topographical logic the elevation points influence the nearest points by the nearest neighbor logic. So it is arbitrary to connect the bottom left vertex with the top right and not connect the bottom right with the top left cause they are equally distanced.

So i believe that for this purpose is best to connect both and create 4 triangles instead of two, creating a middle intersection point that its elevation is based on the 4 vertexes elevation and not only two.

With this you can actually create a triangle hill while with plane geometry it wasn't possible.

  • THREE.PlaneBufferGeometry
    proposenow
  • THREE.TerrainBufferGeometry
    propose

They went beyond this in alternativa3d engine:

GeoPlane

This kind of "hexagonal" mesh is more isotropic.

OK, I hacked up something. We can see if the extra faces help. Maybe @makc's suggestion has merit.

screen shot 2015-07-28 at 9 51 03 pm

I thinkk it will help though i cannot test it. @makc 's suggestion might have merit but its not useful for topographic data.

On the contrary, @makc 's suggestion in right on form. Here is a short paper explaining why an isometric grid is in many ways prefereable to a regular grid for heightmap terrains.
isogrid

[1] ftp://ftp.cs.brown.edu/pub/techreports/05/cs05-14.pdf

As discussed here, and in #6920, there does seem to be interest in alternate tessellations of terrain geometry.

I do not believe PlaneBufferGeometry will be changed at this point.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

donmccurdy picture donmccurdy  路  3Comments

scrubs picture scrubs  路  3Comments

ghost picture ghost  路  3Comments

Bandit picture Bandit  路  3Comments

clawconduce picture clawconduce  路  3Comments