There seems to be a ton of stuff on the polycount wiki about tips and techniques for making trees, but virtually nothing on making good grass. I've tried a number of different tecniques including hand painting and photo sourcing them and keep coming up with stuff that just looks goofy.
I've seen how the udk does grass from their gdc demo, but then after
reading this thread (which looks awesome by the way) and specifically
this post from Autocon, from I'm thinking actually making flat planes of grass is the more cost effective way to go.
So, what is the method all of you use?
Replies
But for a standard scene, I would create them in clumps.
I like to use Soulburns Object Painter script to randomize plane sizes, set them to randomize on x,y,z rotations and begin placing clumps together till they look good, then attach themp into a complete section, tweak manually, and then begin placing those sections around in key areas. I never use single planes and scatter them absolutely everywhere, keeping them in groups give me more control and faster call rates. It's also easier on the sorting.
If your map has a lot of opacity dead space it's generally a good idea to trim the geometry tighter to the opaque areas. This helps if the geometry is set to cast shadows to give it more of an organic shape instead of square and boxy, and it also help keep from having the camera look through opacity maps and decide what the player can and can't see.
Keeping in mind what the player will see and have to look through is always important to every environment artist and something I don't think we consider often enough when constructing stand alone pieces.
In this case its probably better to add a few cuts and shrink the impact of the opacity maps than to save a few polygons. This becomes pretty important for things like branches and hair or tattered cloth. Things that would be very expensive to model every detail, but you still want to hug it close enough that you're not causing giant opacity planes to float around and cause issues.
You also want to read up on Alpha test and Alpha sort if you're going to use opacity maps.
Depending on how you set your opacity maps they could be really process intensive especially when partially opaque pixels are stacked (alpha sort), or they can be a simple on/off operation (alpha test). Most engines will default to alpha test because its faster even if you feed it a map like on the left it will process it as if its on the right. If you plan to use alpha test its better to define the edges of your alpha yourself rather than let the engine decide and deal with all kinds of background bleeding.
It's still a good idea to set your background color to something similar to what is around the edge of your image.
1) Fugly black line.
2) Better.
3) Apply a gradient to the map to help fake the shadowing toward the inner part of the tree.
I think there is a lot more info in the polycount wiki too, so it might be a good place to check.
Thats the issue with alphas. =\ It's either...
A) DXT5 with Alpha Blend, looks great but is unlit (more expensive)
or alpha to coverage
http://www.polycount.com/forum/showthread.php?t=79595&highlight=cottage
about halfway down the page he breaks down his methos for making his foliage. It gives you a lot of control over how you want it to look, and allows you to easily render out crisp alphas, diffuse, normal, etc. It takes a little longer but IMO the end result is nicer than just trying to paint something or using photosourced textures.
Thats a really neat way to do it. The other nice thing is that you can just rotate around the models to get different silhouettes. Instant variation. :thumbup:
i dont know why you dont have that in your list, is it a bad idea?
but when i need to do foliage i copy my whole diffuse and blur it and put it as background behind the original.
(so instead of a gradient the blurred image)
Those images where from 2-3 years ago and the gradient was a simple way to help shade the cards toward the inner part of the tree. I had another example that's long gone that showed that effect, it really doesn't matter for this discussion, but you get it anyway heh.
I forgot to mention baking high poly models, it can be a GREAT way to get normal maps too. The funny thing about the grass in that texture I used, it was created by baking several strips of high poly fur many months ago heh.
I think we should incorporate your image into the foliage portion of the wiki, Mark. Like he said, grass isn't particularly covered, even though these concepts are somewhat....but hey, why not just add it? lol...
http://wiki.polycount.com/GrassTechnique