Working with the Grass Renderer in the Nature Pack

I got the Nature Pack installed in my own project by exporting the Grass project as a package, then importing that package into my project.

I was easily able to attached the grass generator script to my landscape object. The overall results are just plain awesome!

But when I went to modify the jungle_grass.tif texture file, something funky happened. I only did a replace color on the background layer and saved the file under a new name. I didn’t change the alpha channel or the bumpmap (lightmap?) layers at all. But now I’m getting this line artifact along the top of each grass billboard as if the alpha channel has changed. This goes away when I swap back to the jungle_grass texture.

Here is a screenshot of the artifact, and a link to the new texture file.
I got the Nature Pack installed in my own project by exporting the Grass project as a package, then importing that package into my project.

I was easily able to attached the grass generator script to my landscape object. The overall results are just plain awesome!

But when I went to modify the jungle_grass.tif texture file, something funky happened. I only did a replace color on the background layer and saved the file under a new name. I didn’t change the alpha channel or the bumpmap (lightmap?) layers at all. But now I’m getting this line artifact along the top of each grass billboard as if the alpha channel has changed. This goes away when I swap back to the jungle_grass texture.

Here is a screenshot of the artifact, and a link to the new texture file.
http://www.eduweb-labs.net/wolf/grass_dry.zip

Any ideas? Thanks!

Try changing the texture property from “Reapeat” to “Clamp” in the Inspector.

Bingo!

Thanks heaps,
Steve

The caveat here was that when texture wrap mode is set to repeat, then texture filtering at the very top will fetch&average pixels both from the top of the texture and the bottom. If the bottom pixels are not transparent (as is most likely the case with grass) then you get such artifacts.

I’ve tried out the Nature Pack grass and really like it. However, I find the way the grass billboards rotate to face the camera a bit odd. Is there any way to make the script generate the grass billboards with random rotations and then just leave them alone once the game is running?

Just a thought.

The solution is to use much narrower grass textures. The ones in the demo scene are too wide in my opinion. (But then wider textures = less billboards = better performance)

The nature pack is just a collection of scripts, so you can just dive in and change them.

d.

If you do change them to your satisfaction and feel like sharing them, please post variations to the Wiki in the Unitree section!

If I get anything working I’ll post it here. Unfortunately this isn’t an area of Unity I know much about, which is why I asked the question.