Planetside Software Forums

Support => Terragen Support => Topic started by: Mr_Lamppost on August 05, 2007, 10:24:03 AM

Title: Vanishing grass
Post by: Mr_Lamppost on August 05, 2007, 10:24:03 AM
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:

(http://www.ironworld.org/tg2-td/images/vanishing_grass.jpg)

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.

(http://www.ironworld.org/tg2-td/images/vanishing_grass_crop_move_q0.5.jpg)

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 1.8.76.0) 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:

http://forums.planetside.co.uk/index.php?topic=1249.15 (http://forums.planetside.co.uk/index.php?topic=1249.15)

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
(http://www.ironworld.org/tg2-td/images/vanishing_grass_crop_q1.jpg)

Quality 0.2
(http://www.ironworld.org/tg2-td/images/vanishing_grass_crop_q0.2.jpg)

? ? ? ? ? ? ? :-\

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
Title: Re: Vanishing grass
Post by: bigben on August 06, 2007, 09:09:24 PM
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)
Title: Re: Vanishing grass
Post by: Matt on August 13, 2007, 08:03:53 PM
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.

Matt