New release: Tiled Terrain Manager v1.20

What version does it say you are running BTW?

Great that you found something. Indeed there is a console error:

Ok that’s all very odd - no primitive 0 - didn’t know that was possible - but I have it… hmmm.

In the editor can you select the tree and then type this in the CDT console?

editor.call('viewport:app').assets.get(editor.call('selector:items')[0].json().id)._editorPreviewModel.meshInstances[0].mesh.primitive

It should return an array - I’m guessing it won’t. Or an empty array or something.

It returns a populated array.

Right ok, I must somehow be caching the wrong app. I’ll try to fix that too.

1 Like

Ok I’ve pushed version 1.4.3 - should fix those issues. Your trees will decimate, but I wouldn’t lol - that’s as low poly as it gets without losing details. The decimator will hit it’s target triangles, which is fine for normal models, but a bit pointless with the error levels when the model is already low poly. So good for characters, complex buildings etc.

Baking works for me.

Not sure how long it will take for 1.4.3 to make it out to you. Normally Chrome Store is updated within 10 minutes.

That’s great Mike! Happy that those tools of yours are getting better and better.

They are quite necessary when planning on doing something a little larger than the usual playcanvas scope.

New release: v1.15 - New parameters for the terrainDistribution script added.

  1. distMapChannel: Select the colour channel to be used to extract coordinates. This allows packing multiple distribution maps in a single image file. The terrain splatmaps used for texturing can be used here e.g. to populate all grass areas with bush/grass models.

  2. distTile: Apply the distribution map only to a specific tile. Input -1, -1 to apply to the whole terrain.

  3. distTileArea: If distTile is set, distTileArea defines the size of the area in tiles to cover, starting from the distTile tile. Default value is 1,1 which is the size of a single tile.

Public project:
https://playcanvas.com/project/484386/overview/tiled-terrain-manager

Test build:
https://playcanv.as/b/j7SU4Bf7/

Playing with the parameters you can achieve some funny results, like this great tree wall:

Here is a tutorial aimed for beginners on how to integrate the Tiled Terrain Manager with your project.

Just enabled batching on this tiled terrain sample, and draw calls went down from a … 1000 to less than 100. No additional coding required, just created two batching groups (rocks and trees), tweaked the AABB size and … that was it.

Awesome! Big worlds are coming in PlayCanvas.

1 Like

Very useful! Thanks for sharing.

1 Like

Some tips on performance:

  1. You can take out shadows if you don’t need it from one of the Lights.
  2. Use mipmapping for the splatmap textures. (Apparently, Leonidas turned it off, not sure why…). I find mipmapping also gives a better appearance when viewing the terrain from afar with less sharp-dotty pixelation.
1 Like

It seems the splatting shader material appears very blackish/dark on iphone 5. Not sure about other IOS/mobile devices. Anyone able to solve this issue?


edit:

I managed to get the splatting shader to work on mobile (iphone and such…). I’ve modified the splatting shader and colorMap assets to use an opaque texture (pure RGB with black background) and a grayscale opacity map that may optionally be used in the shader. What you could do with your assets is load the splat PNGs in photoshop, go to Layer > Layer Mask > From Transparency to seperate out the layer into alpha channel and RGB channel seperately…save out 2 files. But actually, you don’t really need the Opacity map image in most splatting4 cases, because the blackness is often good enough to roughly indicate the amount of alpha involved already. eg. if not using opacity map: Sample the “alpha” color as some blackness with max( 0.0, 1.0 - mixmapTexel.r - mixmapTexel.g - mixmapTexel.b).

1 Like

The Links are offline. Is this still available?

The original version is down due to deprecated code.

It has been rewritten from scratch and with in editor support. The generated terrains will render in editor making level editing easy.

It is going to be released soon as a part of a suite of PlayCanvas editor extensions.

2 Likes

Wheeeeennnn??? :smiley: giggling

1 Like

Very soon! Will be posting in the next days an update on my Twitter account.

I see, keep us informed too :wink:

1 Like