Home Technical Talk

Good method for making grass cards

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

  • Shogun3d
    Offline / Send Message
    Shogun3d polycounter lvl 12
    Really depends on the player size, size of the world, view distances, engine limits, etc.

    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.
  • bgoodsell
    Any advice on creating the texture on the cards?
  • Shogun3d
    Offline / Send Message
    Shogun3d polycounter lvl 12
    Painting would be the best way as you have more control of your alphas that way. I just paint my grass. http://www.brusheezy.com/ you can also check out some nature brushes, maybe some grass stuff there to help you along.
  • Mark Dygert
    Yep overdraw and opacity sorting can quickly become huge issues so you want to limit the amount of opacity maps you use and their impact on the scene.

    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.


    TreePlanesExplained01jpg


    It's still a good idea to set your background color to something similar to what is around the edge of your image.
    TreePlanesExplained00jpg
    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.
  • Shogun3d
    Offline / Send Message
    Shogun3d polycounter lvl 12
    Nice explanation Mark!!

    Thats the issue with alphas. =\ It's either...

    A) DXT5 with Alpha Blend, looks great but is unlit (more expensive)

    B) DXT1 Opacity Mask, Hard edge can look shitty but can be lit and cast shadows
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    kaburan wrote: »
    Nice explanation Mark!!

    Thats the issue with alphas. =\ It's either...

    A) DXT5 with Alpha Blend, looks great but is unlit (more expensive)

    B) DXT1 Opacity Mask, Hard edge can look shitty but can be lit and cast shadows


    or alpha to coverage
  • CrackRockSteady
    As far as the best way to make the textures, modeling the grass and rendering it to a plane works pretty well. Check out this thread:

    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.
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Yeah don't forget to edit your vertex normals. Helps sell the effect even more.
  • bgoodsell
    Does 3d studio max have any sort of paint effects similar to Maya?
  • NordicNinja
    As far as the best way to make the textures, modeling the grass and rendering it to a plane works pretty well. Check out this thread:

    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:
  • xXm0RpH3usXx
    Offline / Send Message
    xXm0RpH3usXx polycounter lvl 13
    @mark:

    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)
  • Mark Dygert
    The blur method works pretty well, I've used a large smudge/smear brush. I've also sampled colors and painted around the edges as well as done the blur method and depending on the piece copied and scaled it. The important thing is to be mindful that the background can bleed into your viewable image, especially when mip-mapping takes place you're in good shape.

    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.
  • tristamus
    Offline / Send Message
    tristamus polycounter lvl 9
    Really nice, good discussion guys.

    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...
  • Eric Chadwick
    gtg, but here would be a good place to put stuff
    http://wiki.polycount.com/GrassTechnique
Sign In or Register to comment.