Vanishing grass

Started by Mr_Lamppost, August 05, 2007, 10:24:03 AM

Previous topic - Next topic


I have been having problems with populations of grass clumps on and off for a while now.  The grass sometimes disappears close to the camera, here is a relatively simple scene (Abandoned long ago), which shows the problem:

I increased the length of the grass to make the effect more obvous. The quality setting was 0.5.

The grass close to the camera appears to be placed below the ground, here is a small cropped region with the camera in a different position where the grass in visible.

I have searched for an answer to this problem and came across this from Matt.

Quote"Smoothed texture coordinates"

The Compute Terrain node performs both of the above functions. However, when it calculates the texture coordinates it actually generates a slightly modified version of the coordinates which are later used for special effects in the Surface Layer, and these are the "smoothed texture coordinates".

The smoothed texture coordinates serve as a smoother version of the terrain that can be utilised by the "Smooth effect" in the Surface Layer shader. These smoothed texture coordinates are also essential to the correct functioning of the "Intersect Underlying" feature in the Surface Layer. This is broken in the current public release (build but has been fixed and improved for the next update.

The scale over which the smoothing effect operates is controlled by the "patch size" in the Compute Terrain, and this therefore affects the results of the "Intersect Underlying" feature. I intend to provide some documentation on this upcoming feature when we release the update.

The full thread is here:

Can any one tell me if I am right in thinking that the positions being used to place the instances in a population are being derived from the "Smoother" terrain and if so is there a work around?

The quality setting has a curious effect, at lower settings some grass is visible close to the camera. Again small crop region renders to demonstrate:

Quality 1.0

Quality 0.2

? ? ? ? ? ? ? :-\

Sorry about the big inline images; I can't find a way to include them as expandable thumbnails as they are references to images hosted elsewhere rather than being attracted to the post.

I have attached the tgd
Smoke me a kipper I'll be back for breakfast.


The elevations are very negative (foreground around -900m) which is a known problem with object placement. If you raise the terrain and camera you should be OK.

[edit] If you insert a computer terrain between the last shader and the grass population you'll recover the grass in the foreground, but you'll also have some grass in the sky (see the first point)


I would not recommend Ben's suggestion here. If the problem is caused by additional displacement after the Compute Terrain node, the solution is to use the very last shader as the "Terrain shader" input to the Populator (by default the Compute Terrain node is used).

However, the cause of the missing grass may be due to the large size of the clump of grass. They do not sit well on sloping surfaces, and the only solution is to use smaller clumps.

Just because milk is white doesn't mean that clouds are made of milk.