thanks.
and i hope i can make both systems work hand in hand in the near future.
ATG has been released today.
you can get it here: Unity Asset Store - The Best Assets for Game Making
How is this different from your impressive looking foliage shader.
both share the (deferred) translucent lighting and some of the basic concepts as far as the wind animation in the vertex shader is concerned. but while afs’ grass shader simply overwrites the original shader and uses the built in functions to draw all grass on the terrain, the advanced terrain grass goes a step further and replaces unity’s grass rendering on the terrain in order to get rid of almost any spike on the cpu.
afs addresses grass, foliage and trees. atg focuses on grass and smaller foliage. it is limited to unity’s terrains giving you better performance and much more lively shading.
Any chance getting this to work on a regular mesh instead of Unity terrain? Unity terrain itself is a thing to avoid if you care about performance.
atg uses the same abstraction as unity’s terrain.
so to make it work with a custom mesh you first would have to create height map like data e.g. using ray casts.
next thing are the density maps: atg does not come with a custom grass brush but relies on the terrain tools. so you would have to feed in density maps somehow else.
right now the easiest solution would be to create a height map from your mesh and assign it to a unity terrain.
then populate the terrain with grass so atg can grab all needed information from the terrain.
when it comes to rendering simply do not draw the terrain but use your mesh instead.
atg lets you safe all data (heights and density) to a scriptable object. so when you are ready you may even remove the terrain completely (although you will have to make minor tweaks to the script).
Ok, thanks for the workaround. That will do for now. A native solution would be nice though
let’s see what the future will bring. once there is a native or at least widely used solution for mesh based terrains i might add native support for that
what do you thinks is
so i can use the two in a project?
I’m having some issues with sideways grass along seams between multiple terrains, any good solution for this given that I’d like the be able to keep the grass conforming to the terrain normals everywhere else (since it looks so much better)?
I’m also getting some strips of land that are not getting grass applied, like a long bald strip of land that crosses multiple terrains, any ideas?
right now wind will look different. and afs does not support atg grass lighting in deferred. so you would have to use the atg deffered lighting shader.
but it should work.
oh, i have never seen something like this before.
so it would be very helpful if you could send me your terrains (without textures) and a scrren shoot from your settings in the grass manager.
alternatively you could also write your terrain settings (size, height map resolution, detail resolution) here so i can reproduce your problem.
i guess i will have to use more aggressive safe guards when sampling the terrain normal.
that is even more strange. do you have a screen shoot which shows where on the terrain this happens and how it looks like (pattern)?
i just did another quick test and split a 1026x1026 height map into four 513x513 chunks.
then i imported these 4 height maps on four terrains each 200x200x100 meters in size, laid out some grass and attached the grass manager to each terrain.
using a cell size of 12.5x12.5 meters i do not get any artifacts as far as the rotation of the grass is concerned!?
see screen shoots below.
so having your data would really be helpful to get your problem solved
fig 1 screen shoot showing the junction of the 4 terrains. the terrains here are not stitched so you can see a seam in the foreground. grass however seems to be fine.
fig 2 same four terrains. now stitched using stitchscape.
Hi,
Screenshots below as requested, I’ll package up the terrains and send them to you via DM (they’re a store asset so didn’t want to put them on here directly).
The grassless section, you can see by the dark grass bottom left that it crosses multiple terrains.
The same settings are used on each terrain (9 terrains total in a 3x3 arrangement)
Hey,
Briefly read the documentation, still two questions:
- It is fully compatible with MapMagic grass generation ?
- The maximum render range can be raised (unity default is 200) ?
Thanks!
i don’t know what “fully” means. mapmagic writes to the terrain (prototypes, densities), atg reads from it.
you could raise the render range. but i would never do so as it will most likely kill your fps.
Hmmm… I thought that´s what these packages are for ? But okay, then I´ll skip this. This is the function I´m actually looking for.
sorry, but what do you mean?
atg can simply take over rendering of grass generated by map magic – but unfortunately not from terrains which are generated at runtime.
and as far as the grass distance is concerned: there simply is no way to render grass at a distance of e.g. 500 meters as grass produces a lot of overdraw thus exhausting the fill rate.
Thanks for the reply, that was the answer I was looking for because my terrain is generated on runtime.
As for the grass distance: There are other packages (like uNature) that can increase the draw distance of grass. I wasn´t sure if this package here is also capable of that.
unature will suffer from exact the same problem: overdraw.
this will always limit you in case you use mesh based grass. you may however combine it with e.g. screen space grass which might kick in at far viewing distances.