Jump to content

Tri planar terrain


TheDude
 Share

Recommended Posts

@DigiHz Data So here's the deal, after experimenting, it turns out that all normal textures need to be added for it to fully work.It says:

Quote

// The 3 diffuse textures must be set, even if they share the same texture reference

But then says:

Quote

// In the case of normal maps, it is not necessary to set the 3 textures

So Either this is the real bug or the second quote was meant to be true when the developer created the extension.

Link to comment
Share on other sites

Also while I'm at it @Deltakosh getHeightAtCoordinates only works work CreateGround and not GreateGroundFromHeightMap, i'm not sure if this is a bug of a feature yet to be added? Did not find documentation of GreateGroundFromHeightMap in the classes section because there is no page?Anywys thought I would let it be known because this is a useful function for placing trees on and other stuff on the terrain.

Link to comment
Share on other sites

could you reproduce the bug in a PG please ?

The computation of the height normally should work for any GroundMesh mesh, so for ground generated from a height map too : http://jerome.bousquie.fr/BJS/demos/getHeightAtCoordinates.html

 

doc : http://doc.babylonjs.com/classes/2.4/GroundMesh

+ MeshBuilder for height map ground : http://doc.babylonjs.com/classes/2.4/MeshBuilder#static-creategroundfromheightmap-name-url-options-scene-rarr-groundmesh-classes-2-4-groundmesh- 

Link to comment
Share on other sites

Actually there's no bug : http://www.babylonjs-playground.com/#1OUIMU#5

You just started to call getHeightAtCoordinates before the ground has finished to be computed (classical mistake). There's a delay in the height map texture download time, so the mesh isn't yet finalized when you call getHeightAtCoordinates()

You need to make sure, with the parameter onReady (a callback function) that the mesh is finalized before starting any computation on it.

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