Creating grass with VrayFur
In this article I will show my favorite technique to create grass with Vray and Vray fur, as some techniques to configurate an make it look realistic. I will also show some tips and tricks that will allow us to render large regions of grass. As I see it there are other techniques very gereralized like displacement maps and modeled geometry I home this article help you to improve your grass.
Vray Fur Creation
First I will create a plane and over it a Vray Fur. You can find the Vray Fur in: Command Pannel-> Create-> Geometry-> Vray-> VrayFur
The Vray Fur button is only active if you have selected some object thats geometry like the plane. The icon that represents the Vray Fur in the viewport is the one that will show us the Vray Fur Parameters on the command panel.
The basic parameters to configure Vray Fur are the following:
Length: The lenght of the fur
Thickness: The Thickness of the grass
Gravity and bend: This two parameters will work together to bend the grass, the higher the bend, the more the grass will be afected by gravity
Taper: This parameter will narrow the tip of the fur. A value of 1 in taper will make each one of the fibers to have a zero thick tip.
I configure this parameters to what the image shows and get my first render.
In the distribution parameters the default configuration is per area. With the default value the amount of grass on the scene is low, it is very important to know that the viewport only shows a preview of what the grass will be, but it doesn´t show the full amount of grass that it will be on the render, and also you should notice that the amount of grass that is displayed on the viewport is related to how many subdivisions the plane has.
The value of configuration that defines the amount of grass that the Vray Fur will have is the value of per area on Distribution, increasing this value we can increase the amount of grass on the scene. Per Area will add fur depending on the area of the surface and not the amount of subdivisions or polygons that the surface has.
Before creating the material I will ceate a VraySun and VraySky, and will render using a Vray Physical Camera and a GI sistem, aside of this the other configuration that I change was to turn on the Gamma and Color Mapping of F10 and in the VrayPhysicalCamera Parameters I turned off vignetting and put the white balance on Neutral.
The material that I will create for the fur will be a VrayHairMtl, this material has a transmision parameter that will simulate that the light goes trough the Grass giving it a more realistic look. It is very important to chose a good diffuse map for grass because it will be the one that defines the color of each strand. The texture that I will use I got it from www.cgtextures.com here is the download link.
On the Vray HairMtl I will use some of the presets that say matted so it will configure the specularity with a low Glossiness. In my case I use Brown Matted, I will connect the grass map to the Transmission_Texture of the VrayHairMtl. For the ground material I will only use a VrayMtl and I will connect to the difusse map the Earth Texture.
When you apply the materials the Vray HairMtl should be applied to the VrayFur Icon, and the ground material to the ground plane. The mapping on the plane controls how the texture is applied to the grass that is why it is very important than the ground plane to be correctly mapped, I use a UVWmap modifier to make the texture smaller till you can se clearly the texture on the ground, in my case the size of the uvwmap was 1 meter per side since I am using a correct scale. After aplying the materials this is the resulting render.
Currently the render can look realistic but we still can do a lot for it. Vray Fur has several channels on which we can mapp most of its parameters, for example the direction, the length of the grass and it´s thickness. Using this parameters we can create variation on the grass, just using a noise and connecting it to some of this channels; by doing this I will also increase the value of length( I increased to the double, wicht was 20 cm), to counter the fact that the noise will make the overall length the grass smaller. The size of the noise is vital to get a good result, but this size depends on the scene you are creating, the kind of grass that you want, and on the scale you are using, in this example the value used was 3 on size of the noise and the rest of it´s values were left by default.
Other tools to give realism to the grass could be the VrayDistanceTexture map. This map can make the grass interact with its environment or with objects that are on the scene and that we want to affect grass, this could be stones, or a stone walkway, and we can avoid grass to grow over them just using the Vray Distance Texture.
The VrayDistanceTexture is a procedural map that by default, gives a black color on the zones near to the objects added inside the VrayDistance Texture and it generates a white color when this objects are far from the surface of the object that has the map applied. It has a value called distance, which is a distance where the map will start the transition from white to black. On the next image 3 boxes were created simulating stones over the grass, I also create a Vray DistanceTextureMap and this 3 boxes were added inside the VrayDistanceTexture, the boxes were also hidden and the map was connected on the plane´s material diffuse channel, to show the colors that the Vray distance texture will generate because of the boxes. Beside this I turned on the insede solid option on the Vray Distance Texture, which will make the center of the objects also show a black color in case that the boxes penetrate the ground plane.
If we connect this VrayDistanceTexture on the length channel of the Vray Fur, and we return the original diffuse map to the ground plane material, the result is that the grass wont grow on the black zones of the VrayDistanceTexture. This way we can create zones with no grass, for planters or arround objects like trees. If we want we can combine the noise map with the Vray Distance Texture, just connecting the noise to the channel named FarTexture on the VrayDistanceTexture
There is no need to connect the Vray Distance Texture to the diffuse channel of the ground plane material, I just did this to show the colors that the VrayDistanceTexture creates.
On this render I also connect the VrayDistance Texture on the thickness Map of the VrayFur, to avoid than the short grass look thick.
Using two textures that come by default on 3dsmax we can add grass only on certain zones using the density map channel, matching this map with other map channels over the plane. It is very important to understand how the textures interact among them on 3dsmax and how we can link them to create networks than give more visual interest to our scene.
Level Of Detail
The level of detail secction allows to the user diminish the amount of fur generated at a certain distance from the camera. You can configure this parameters once you turn on the level of detail checkbox, and the parameters are:
Start Distance: The distance at which Vray Will start to diminish the amount of fur, before this distance the amount of fur remains the same.
Rate: Rate is also a distance, is the distance after the Start Distance value, at which Vray will diminish the amount of fur by half and increase the thickness of the fur twice, and this will be done every rate distance after the start distance.
Configuring this two values we can render long areas of grass with out worrying about very long render times and this diminish also the use of memory.
Increasing memory to avoid long rendertimes
When we start to render large amounts of geometry, is very common that we run out of memory, when this happens the rendertimes can increase a lot like 20X more than if we don´t run out of memory, this is a very common problem when we start to add grass, vegetation, or just a lot of polygons to the scene. You can know that you run out of memory when the render dialog displays a text that says "Unloading geometry" to avoid this we can increase the value of Dynamic memory limit to a value that is 1 Gigabyte less than the memory that your computer has. So if your system has 8 Gigs just set the value to 7 Gigs, by default this value is set to 4 Gigs which is 4000 Mb.
This example shows how modifying very few parameters we can make realistic grass. This knowledge can be extrapolated to many examples, it is very important that you know you can map the lenght width and density channels of the Vrayfur because this are your main tools to create variation and push realism.
The VrayDistance texture can help you to make objects interact with the VrayFur, diminishing the amount of grass on the zones close to objects, you could use this map on other channels like bend or gravity to bend the grass when an object is placed over, but you might need to modify the colors of the VrayDistance Texture to get the desire result, this channels multiply the original values, so modifying them still affects the look.