TerrainEdge 3 (need testers, feedback, ideas, etc)

TerrainEdge (v2.67)
Procedural world generation and terrain management tools.

Features | Changelog | Plans Ideas

Old screenshots: Output | Interface

Video of basic landscape generated in 10 mins (New)

v2.67released February 25th

  • Fixed max-terrain-elevation miscalculation.
  • Fixed detail-related features that were showing detail meshes as “Unknown”.
  • Fixed control points for curve and terrace opreators.
  • Fixed surround foliage on trees.
  • Reimplemented auto-save to stop TE from losing your settings when you play or recompile scripts (won’t trigger a popup message either - it’ll just notify you via debug.log.
  • Changed configuration loader - it’s much faster now. (it was necessary otherwise autosave was irritating!)
  • Extended functionality of splat generation (more control over range - and the elevation fix).
  • Several other interface glitches fixed.
  • Extended replacement shaders to include add-pass.
  • Added Triplanar shaders, adding multi-UV tiling in the process.
  • Splatmap import function added.
  • Pseudo flow-mapped texturing (see below) - will replace or compliment with erosion/sediment mapping when I improve erosion features and tackle the texture-at-seam issues in 2.68)
  • heightmap noise painter (which can paint across terrain seams)
  • libnoise operators implemented: Abs, Invert, ScaleBias, Exponent, Turbulence.
  • new libnoise operators added. (WindexWarp, TEWarp, possibly more…)
  • new libnoise generators added: (fBm, Het.MultiFract and Hybrid MultiFract).

2.67 Known Issues:

! - New generators probably not exact implementations, will check and review.
! - Splatmap importing is on it’s initial implementation too - I’m expecting problems with it!
! - Splatmap generation tree generation were slow (see below)
! - Flow-map texturing settings do not save with the rest of the configuration.
! - Attempt to clone allegorithmic shader was a failure!!
! - Procedurally generated terrain textures sometimes don’t match up well on terrain seams.

UPDATE (28 Feb): Texturing and trees were generating VERY slowly in 2.67. To address this please use the replacement TerrainEdge script (Texturing is about 5 times faster and tree generation is about 20-30 times faster)

795469–31397–$te267.unitypackage (95.8 KB)
795469–31492–$TerrainEdge_267_fix.rar (25.7 KB)

Thank you very much this tool is really great

Holy cow, Syanyde! This looks like exactly something I have needed. Very nice feature list too.
I’ll be glad to give you feedback and test it. My project makes heavy use of terrains, and this would make working with them much easier! I’ve been using World Machine 2 to generate the tiled terrain, and was starting to think about matching up the seams, etc.

Beautiful, I can’t wait to try it out. If you get bored, a web player would be sweet…but the unity package is good also.

Here are a few suggestions I can think of:

When placing trees, I’ve noticed that having a few detail meshes around the base (like a bush, or a clump of grass) really helps. A tree standing in the ground with nothing around it just looks barren sometimes. It would be sort of like clumping or noise for certain detail items, but around the bases of trees.

Looking at your screenshots/feature list, when mass placing trees can you control the size of the trees? Unity always seems to use the default size of trees when I mass place, instead of what set in the inspector. It pretty much means I don’t use mass place.

Can vegetation be placed depending on the current tile splat value? For example, no grass on a rock or sand tile.

Thanks! I’ll be testing later today… Already I got some features you’d might want to implement: Maybe some updated terrain editing tools; like nice slopes etc.

Also, a Tunnel feature would be awesome, but that’ll probably be too big of an undertaking, as that can’t be done with heightmaps…


I got this error

http://imageshack.us/f/707/immagineptf.png/

@jc_lvngstn

WM2 was my primary inspiration for NoiseLab as I hadn’t found anything else capable of creating massive, varied landscapes (I might do a node-based version when my Unity GUI skills improve). There’s still a few features I need to add but I think I’ve captured a lot of the possibilities of WM2 in TE… I’ll keep trying to add more though.

I agree with your trees/foliage comments too, although use of noise channels for things besides the heightmaps (eg. splatmaps, trees, detail, etc) is already planned - I will implement something in the TE:Trees module so that you can specify surround-details for trees with adjustable distance, density, etc. per-detail-prototype-per-rule (so you can have multiple tree rules that have different rules for their surrounding details (eg. so you can make the same tree have less detail around it at higher elevations/slopes/etc.))

Also, 2 additional observations with trees. Trees with very dense foliage can reduce the growth of grass surrounding the trunk and so appear to have patches of mud or much thinner grass, etc. surrounding the trunk. Also, in autumn, some trees tend to be surrounded by leaves - For this reason I’ll probably add some controls over the ground texture beneath trees too. - And… still on the subject of trees, sometimes the ground is raised by the roots of the trees too - this is also something I’ll look into implementing into the TE:Trees module’s rules/options at some point.

Refined control over trees (colors, sizes, etc.) is something I’m currently working on (trying to get it implemented in the next release which should be ready in the next couple of days). Can’t say how effective it’ll be until I’ve tested it but I don’t think there’ll be any problems. - and finally… yes, we can plot instances/layers/etc based on any other terrainData so I’ll add splat-prototype to the tree/detail rules for you soon.

@ThomasQ

Thanks for the reminder, a slope tool is on my to-do list but I had forgot to mention it in my original post. For tunelling, there are shader/trigger/collider techniques (which come with physics related headaches), there’s the portal approach (but it means every tunnel/cave/etc. will need to be entered via a path that takes a 90 degree turn and there’s another option based on slicing terrain up into smaller and smaller chunks to provide a seam where you need it… but it’s messy and is likely to create terrain that’s incompatible with terrain-paging systems. - None of these are easy to automatically implement but I will look into the options we have available for this once the more basic features are implemented into TE. (Unfortunately, I’ve only been coding c# for about 3 weeks and not yet explored Unity’s mesh-related functions so I’m still not totally sure what I will and won’t be able to do!)… if I do make any progress with tunelling/overhangs/cave-entrances/etc I’ll send you a PM.

@cod

Thanks for the bug-report… - I noticed that “turbulence.cs” is where the errors are coming from. Thing is, LibNoise’s turbulence operator isn’t used until v2.64 (which I haven’t released yet). I guess one of the other generators or operators must be referencing it. I’ll investigate further and if we cannot find the problem soon, I’ll add logging/debug features to track all the LibNoise functions called by TE (and the parameters used) so that we can clear up the problem quickly.

could u fix that please :smile:?

Haven’t clicked on the link, cos I couldn’t figure out what you meant with the title. I finally did and will try asap.

Syanyde, if there is anything I can specifically test or help with, please let me know. The project I am working already uses a lot of terrains with tiles, so I’ll be able to work that quite a bit.
Already impressed with the features you have, and I haven’t even gotten my hands on it yet.
Control over the ground texture beneath trees is a great idea.

One other suggestion came to mind, not sure how difficult it would be though…
Is it possible to apply the terrain noise functions/erosion to the BRUSH, and not the entire terrain?

Yeah, same here.

@jc_lvngstn … Not sure if I can hook directly into the default terrain brush but we might be able to do it with gizmos. I’ll look at how others have done this sort of thing and see what I can do. I remember using the erosion brush in 6x0’s Terrain Toolkit - but it seemed laggy to me (maybe a combination of the crappy computer I was on at the time and the fact it was having to call SetHeights repeatedly) but I’ll certainly look into this as it’d be a better alternate to the regions stuff I was planning.

@Wolfos … Load the package, create a terrain object, add 2-3 textures, a detail brush (grass, etc) and a tree. Then click “TerrainEdge” in Unity Editor’s “Window” menu to launch TerrainEdge. If you get stuck after that, let me know.

What is the exact licensing of this? I see both LGPL and GPL, last time I checked GPL had some nasty clauses about making your own source code available. LGPL is more lenient and only requires you to make any changes you make the library available.

I merely ask because if its GPL then its really not useable for anyone… simply including it in a unity project (which effectively means linking it) is a breach of the license. However if its really LGPL there is no problem at all.

Cheers,
UnLogick

I took a look at the source code, and have some feedback. I really hope you’re able to sort out the licensing and provide this as LGPL.

First I suggest splitting the various filters into separate classes, derived from a base class that supports the shared methods. You can make each class responsible for their GUI update or you can make it publish a list of properties and then do some generic code to handle this. This would make it much easier for others to add their own filters. Also it would make it easy to use this tool at run-time too.

Cheers,
UnLogick

Thanks for heads up UnLogick…

There is no license on TE itself, just for LibNoise. As this is released as an editor script, I figured developers would just remove TE and LibNoise when they are finished authoring content - as it wouldn’t need to be a part of their game engine.

As for the resulting content, it can be exactly generated through other generators and in the realms of IP litigation, can be demonstrated as a case of ‘prior art’. Additionally, using art assets created by a GPL licensed application within your commercial game engine doesn’t mean you are breaching the agreement. It would have to contain the source code (or assembled binaries, etc)…

TE’s use of LibNoise isn’t derivative, it’s delagatory but it’s irrelevant, whether TE is obliged to inherit the license or not… If you remove TE and LibNoise after you’ve made your world… you should be okay, at least as far as I can see in the license agreement.

(and I’m not aware of any art-asset-generated-by-a-GPL-licensed-app being used in another engine and that other engine being held to the GPL’s terms - it would make a lot of GPL licensed art tools obsolete to commercial developers.)

So… just remove TE and LibNoise when you’re finished with them - and don’t include those scripts in your game (you won’t need them in the game anyway!!) :slight_smile:

I took a look at LibNoise and only the “libnoise example sources” use GPL, so if you can make sure you don’t use parts of that code you can change the license to LGPL and all will be fine. :slight_smile:

Once you do that I think I can find a little time to help you out, structuring the code a bit. Right now its a lot of good functionality that’s wrapped with in a big mess. :slight_smile:

This is absolutely brilliant!

Funny thing is, though. When expanding terrain, it takes a shitload of time to finish, even though it seems to be done in like 3 seconds.
EDIT: may be related to the fact that I’ve only got one texture in the scene.

Some initial tests:
I imported a 128x128 heightmap (windows), set the size to 512x1024x512

Detail:
setting the strength at .06 or less showed no details at all. Setting it at 0.07 looks like full detail, very thick grass. So, I would think that strength = density?

Height: Setting it to less than 0.38 shows no grass. .38 and above = grass all over, full coverage.
Slope seems to work great! Love it.
Noticed a wide strip of no grass going across my terrain…like somebody took a giant lawn mower and cut straight across.
Added another grass to the terrain, it showed similar results. So tested with 2 grasses on the terrain.

Trees:
Added one tree. Height was from 0 to 1. Slope was from 0 to 90. Strength .153.

Strength appeared to work fine. The trees only appeared in the bottom part of my terrain…not lower in elevation, but on the bottom tenth side of my terrain. Along the bottom edge, if that makes sense, in a narrow band. Kinda like someone planted a band of trees with that same lawn mower.

I’ll test some more later.

Thanks, I think I’d already removed the example sources in the 2.63 release. :slight_smile:

I had been meaning to change some parts of the code (introducing structs, enums, etc.) and batching declarations into groups but I’m kinda learning as I go and was going to go back over the code before I release as v3.0 to tackle my messy code. That said, any help or advice would be greatly and humbly appreciated.

Working on this now, initially with random probability but will later make it depend on noise. Either way, I’ll play with this now to make sure detail can be applied at lower levels, I know the exact problem you’re referring to as I’ve noticed that too.

The height (in terrain/detail/tree rules) is based on the heightmaps maximum size rather than just the height-extents of the current terrain object. This may be part of the issue but I will make a test terrain with a gradient from zero to the heightmap’s max value and run some tests using that to make sure the values are adjusted if they are inaccurate.

Regarding that wide strip of no grass, it’s related to not clearing values as it iterates through the x:z coords - I fixed the bug for textures but didn’t realise it was elsewhere… I’ll get it fixed ready for the weekend. I’ll also investigate the issue with trees for you too and post back as soon as I figure out what the problem could be.

Hopefully will have v2.64 ready by the weekend.


@all … Thanks for all your feedback so far. Really appreciating it. :slight_smile:

i just had a quick look at your tools – really a nice start!

but before adding more sophisticated features like manipulating the terrain textures according to the placement of trees – which i would really like – i think it is time to implement just some basic features which unity should already have done years ago – e. g.:

  • resizing the the terrain splatmap and detailmap without loosing all your work (plus undo and export/import functions maybe…) this would be extremely helpful to balance your terrain’ s appearance and its rendering costs.

  • some more manual tools like limited painting of a texture by slope angle / height.

  • painting not of single trees or grass textures/detail meshes but defining some kind of vegetation group like: dense forest consiting of e. g. 5 different trees, some grass textures, 2 – 5 detail meshes and a terrain texture would be great.

lars