Creating Grass With Maxwell Render

 

If you’ve come here, you’re probably looking for a way to render grass with Maxwell Render.   There are three methods you can use to create grass with Maxwell render and a host application that can generate hair and fur (I’m using max in this case).

1.) Displacement

2.) Instancing

3.) Hair and Fur (If your host application supports it)

Displacement.

The above example shows grass (lawn) created by using displacement.  If your designated area for grass is relatively flat, and you have enough ram, then you may want to consider employing displacement.  There are two things to consider for this process:

1. Grass Material generating displacement

2. Mesh density relative to displaced detail

Let’s keep this as simple as possible.  You want your material to look something like this:
You want your mesh to be about this dense. ( Map your mesh with whatever parameters you feel comfortable with, in this case 150″ sq):
You’ll get a rendering that looks something like this:
Something to note – During voxelization, prior to rendering, your memory will spike to something like this:
IF YOUR MESH IS NOT DIVIDED EVENLY, you will fail.
If your mesh is evenly divided and contains sloped surfaces, you may very will experience the CHECKER phenomenon.
Here the mesh gets more loops, evening it out.  In theory this will work.
But in practice, you’ll probably be forced to battle the evil CHECKER pattern:
Another checker pattern example shown below on a well subdivided mesh.  See where the plane slopes down as it approaches the sidewalk leading to the building.

Instancing

Do you not have a whole lot of RAM for what you need?  Do you have a sloped surface that needs grass?  Do you have a whole lot of time to spare hand painting proxies or waiting for PF sources to export from max?  The above example shows a teapot proxy scattered on a very large plane through the use of a PF Source particle system within 3d Max.  There are two factors to consider here:

1.) Surface area

2.) Scene export times

In the older proxy tutorial, we went through how to paint proxies onto a mesh surface (http://wanderplay.com/rusteberg/?p=46).  This method applies here as well, but do you really want to spend half a day painting individual grass blades, or clusters of grass blades onto the front lawn of a rendering?  My guess is you’d rather not if an operator is available to scatter them for you.

You could use the scattering built in max’s compound objects, but you’re limited to something like 65K instances.  The other option is to use a Pflow particle system.

Example:

If you understood what just happened and were/are able to follow along just by looking at those three images above and not have me explain it, then that’s wonderful.

You could even use maxwell proxy objects in place of the grass model itself and try applying it to a larger surface area.

It will render as expected:

Oh, perfect.  Everything is going as planned.  I’ll have this area covered with real grass geometry in no time.  This is where Density vs. Coverage comes into play with the amount of time you’re willing to spend exporting your scene(s) to render.

Above we’ve scattered 10,000 proxies onto a larger surface area, but we’re far from making this surface lush and green.

So, not a problem you say, I’ll just increase the amount of “particles” generated by the PF source.

You’ll soon find out how long your export times become when employing this method with greater magnitude.

I still think the best way to make grass this way is by following this old tutorial:  http://aias-nebraska.950861.n2.nabble.com/file/n3116621/grass_tutorial.pdf

Ideally, you would want to instance a highly detailed model, or set of highly detailed individual grass blade models and scatter them along your mesh surface, similar to what we did here: http://wanderplay.com/rusteberg/?p=46

These two methods of instancing will work, but to what extent?  With maxwell, you don’t have access to something like vray scatter or multiscatter which eliminates part of the chore of placing millions and billions of articulately crafted grass blade models onto your prescribed surface area.  I have heard of Forest Pack Pro being able to do this with maxwell, but have not tried it.

Hair and Fur

The above example shows grass created using Max’s hair and fur system and rendered with Maxwell Render.  If you have access to an application that generates hair and fur (specifically MAX) then you’re probably eager to try out this method used to create grass with Maxwell Render.  But again, two things to consider before implementing:

1.) Density

2.) Coverage

If you notice in the diagram drawn at the top of this post, instancing and hair/fur spiral off into a cloudy mess of serious questions you’re going to need to deal with at some point along the process.

Let’s see what we can do to help clear some of the fog:

For shots without much “grass/lawn” coverage, I would recommend starting here:

This would render to this:
Or something like this depending on what you wanted it to do:

But if you want to get away with using hair and fur for some acreage?  You might find yourself in the battle of density vs. coverage and how the two make export times bearable.

Below would be a good place to start for a front lawn.  I wouldn’t focus on any of the other hair/fur tools and parameters that aren’t circled in pink for now.  These parameters circled below become sensitive as you begin to cover more surface area:

If we take the parameters from the above example and apply it to a larger surface area (you can see in the background that I’ve imported the lawn surface from the above scene and cut its hair/fur modifier and applied it to the larger surface area used in previous examples).

It will render to something like this (hair/fur settings shown to side):

Naturally, you want the grass to cover more area.  So you increase the hair count from 600,000 to 6,000,000.

Very soon you notice a heavily cow-licked pattern.

To combat that, focus on the three parameters circled below in pink; -Scale -Random Scale -Frizz Tip:

I hope this was helpful.

 

Some Helpful links:

http://maxwellrender.com/forum/viewtopic.php?f=100&t=37630

http://wanderplay.com/rusteberg/?p=46

http://aias-nebraska.950861.n2.nabble.com/file/n3116621/grass_tutorial.pdf

Forest Pack Pro

Multiscatter

Houston Rendering Company

 

Edit (March 17, 2012)  (Happy St. Patty’s Day!)

Useful Information omitted from earlier post by Minhea Balta and Bogdan Caroi (The maxwell masterminds for max):

 

(BEGIN QUOTE)

The hair does not inherit the material from the base object. You need to expand the “mr Parameters” rollup, enable “Apply mr Shader” and drag a Maxwell material onto the material button.

Max hair does not generate root UVs. You cannot map a texture on channel 2, that information only applies to hair systems which generate root UVs (Shave in Maya, Ornatrix and Hairtrix in Max).

To be able to map a texture on the hairs, you need to do the following:

1. Apply the texture on the tip color and/or root color controls in the “Material Parameters” rollup of the hair.
2. Make a Maxwell material and apply a solid white texture on reflectance 0. It won’t work if you just set the refl0 color to white, it needs a texture (this is a limitation of the engine at the moment). Leave the texture on channel 0 (the actual UVs won’t matter anyway, since the texture is white everywhere).
3. Apply the maxwell material on the “mr shader” button.

What will happen now is that Max hair will generate colors for each vertex of the hair based on the textures you applied on root/tip color, as well as all the other material parameters (hue variation, fading etc.). These vertex colors will be exported to Maxwell, which will multiply them by the values sampled from the texture you have on the material. Since the texture is white, the original colors will come through unchanged.

The good part is that you can use the same workflow even if you don’t need textures on the hair. If you apply the material as described here, you will see that you can use the root/tip color controls on the hair modifier, and the render will look the same as it would look with scanline/mental ray (except for the differences in lighting, obviously).

You can find a sample scene here. It has a black/white checker applied on root and tip color and the render should look like this:

PS: using textures on the root/tip color will increase the hair export time, but there’s nothing we can do about that, all the time is taken by Max itself evaluating the colors.

(/END QUOTE)

Original Post Here:  http://maxwellrender.com/forum/viewtopic.php?f=100&t=37630

Comments

  • Tom Rusteberg says:

    I’ve decided to try leaving comments open.
    Please note the math question you’ll need to solve in order to leave a comment/ask a question.

  • Bogdan Coroi says:

    Regarding long export times when using instances, it’s fixed for the next update (2.6.15).

  • Tom Rusteberg says:

    Muy bueno, señor.

  • Sebastian says:

    Thanks for this nice tutorial. However, I have one question: How do you manage to assign different materials for the tip and the root of the grass? I managed to assign maps to those slots, but they are not taken into account by maxwell. So for the moment, I can only control the material of the plane that the grass is growing on and by choosing a material in the mr-Parameter slot control the color of the grass. But then the grass only has one consistent color – no gradient from the tip to the base…

    I’d greatly appreciate your help on this!

    Thank you,
    Sebastian

  • Tom Rusteberg says:

    Hi, Sebastian.

    Have a look at this posted by Bogdan Caroi on the maxwell for max forum at maxwell render where he re-hashed Minhea’s explanation of how this works:

    http://maxwellrender.com/forum/viewtopic.php?f=100&t=37630

    I’ll add the post as a filler to the bottom of the post here for clarification.

    Hope this helps. If not, let me know. Sounds like you are omitting the solid white texture (.jpg, .png, etc.) in the reflect 0 slot for the grass material.

  • federico says:

    Hi, first of all thanks a lot for this tutorial.
    Unfortunatly I’ve got lots of problems in creating realistic grass and I really don’t understand which is the problem.
    I would like lo learn how to meke it with displacement but for some reason it always look bad.
    I’ve followed all your passes but nothing… maybe it’s a problem with the image of the grass that I use.
    I’d like to ask you if it’s possible to have the three images that you used in this tutorial, so I’ll see if I can do it???
    Thanks again.
    Cheers,
    Federico

  • Tom Rusteberg says:

    Hi Federico.

    The displacement map uses texture “grass0133” from http://www.cgtextures.com and the color map 2 uses texture “grass0026” also from cgtextures (type these into the search field and it will take you to them).

    The last map is from this material
    http://resources.maxwellrender.com/search.php#page=2&mode=1&category=&id=1583&search=grass&v1=0&v2=0&tipo=

  • jerome denis says:

    Hi,

    I made a tutorial about Fur in maxwell render.
    you can have more details about it with another method using Hairtrix w/ 3dsmax.

    http://www.edifik.fr/bloging/2012/01/tutorial-fur-rendering-with-maxwell-render-en/

  • Comments closed

    .

    ©Tom Rusteberg | tom[at]wanderplay[dot]com
    error: