Terrain Generation

Great, happy it works! Be extra careful with the Clear All Instances button since it does exactly what is says without being able to undo.

It may erase hours of work if you aren’t careful, need to improve that UX a bit.

Uff, thanks for this advice. Anyway I now must first think of buying an Editor license to have a private project. I am skeptical though, I worked with other editor in the past (e.g. Coppercube) and it was more intuitive, those functionionallities I really need and appreaciate comes as addons from your company :slight_smile: Btw. the mistake on myside was that the paint script wasn’t loaded by default.

1 Like

Makes sense! The Playcanvas team is hard working to improve the editor and I can say things are moving faster and faster.

If you have any suggestions or feature requests you can freely add them to the editor repo here, they are always taken into consideration:

1 Like

Thank you for sharing this useful material @Leonidas, I’ve been playing around with your project here https://playcanvas.com/project/734054 but can’t get it to work on iOS devices (terrain shows completely black, see screenshot below), do you know what may be happening by any chance?

Hi @bayo and welcome,

Ah yes, I think I had the same issue once on iOS, it came down to the textures used by the materials I think. Some of the included textures were compressed to png by unity dtx5 textures I think, and iOS on WebGL1 complains. Try using a different set of textures and see if it makes a difference.

Thanks @Leonidas, and it does definitely look like something like that is happening, but shouldn’t it be handled by PlayCanvas sending the right texture format for the device? (what is described here)

I’ve selected PVR and clicked on “compress” so I understand PC generates that compressed format for the texture as well so that if an iOS device is rendering the app, then it’ll use those textures, but it doesn’t work and it renders the same black terrain. I’m missing something here most probably, so I’d appreciate if you can point me to the right direction. Thanks!

I think in this specific case the issue is with the original diffuse textures, not the compressed ones. It’s not a Playcanvas bug most likely, but how those texture color channels are used (rgb and alpha). I will see if I can reproduce this again.

Try to use a different set of textures and see if the bug is resolved on iOS.

@bayo I can confirm the bug, it seems when using a splatmap with four channels (RGBA / png) it breaks on iOS. I will see if I can fix this on my shaders, in the meantime consider using three terrain channels with a simple RGB splatmap.

@Leonidas thanks, I’ll create my own 3-channel textures and try it out but I’m new to this so it’ll take some time for me. I was just wondering if this is related with iOS not having proper WebGL2 support or it can be fixed by adjusting the shaders?

I vaguely remember there was an issue with how some textures including an alpha channel are filtered on iOS, have to do some research on this.

I’m not able to make it work, I’ve just created a new base material for the terrain from 3-channel JPG and it leads to the same result, works well on Desktop (Chrome) but not on iOS/iPadOS. (see project here: https://playcanvas.com/project/751453/overview/uranus-tiled-terrain)

I’d appreciate if you can provide an example to fix this issue @Leonidas! Thanks

Hi @bayo,

I’ve just tried using a RGB splatmap instead of a RGBA one, on the terrain and that fixes the problem on iOS. Check it out on my public project:

1 Like

Thank you @Leonidas, that did the trick. Also I’m not sure wether if this is a bug in the code or is just happening on my editor but I also had to change this line in uranus-terrain-splatmaps.js:

this.useAlpha = this.textureChannel3 !== undefined;

to this one:

this.useAlpha = this.textureChannel3 !== null;

In my case when Texture Channel 3 is “Empty”, the variable is null and not undefined.

Thanks again!

That’s interesting, this.textureChannel3 is an editor attribute, I was pretty certain that is set to undefined if not used. Thanks for catching this, I will definitely take a look.

Hi! i am facing the same issue, how did u solve it?

<3

Hello @Leonidas,

I hope everything is well with you. We are looking at making a bigger than usual project with playcanvas but would like to use advanced features included in the deprecated Uranustools. Is there a replacement coming soon (UranusTools) or equivalent tools planned that would be included in playcanvas?

Thank you for your time

Hi @memleak,

If you are looking at terrain generation specifically, then sadly there isn’t any new product planned from Solar Games. The interest was quite small for terrain extensions.

I’ve done recently a group class on advanced performance optimizations for PlayCanvas, the class recordings and materials are available here: Class Open Worlds: Mastering High-Fidelity Scenes in Web Games - Elanra Studios

3 Likes

Registration done! thank you for the hint!

1 Like

I bought the course too and am waiting for my access to the files!

1 Like

You are most welcome guys!