Planetside Software Forums

General => Terragen Discussion => Topic started by: freedomfries on July 16, 2013, 04:07:24 PM

Title: grass placement question
Post by: freedomfries on July 16, 2013, 04:07:24 PM
Hi Forum!

I'm a newb to terragen and hoping you could help with a placement issue with a grass clump population. I'm using 2.5 on Windows 7 64 bit. If you look at the gif of my first scene, the grass population seems to grow over the terrain, and up the trunks of trees, without really following the terrain. The pic has renders with grass enabled and without, so you can see my terrain underneath. I simply want the grass to follow this terrain, including the little mounds.

My grass population is connected to the compute terrain node, so I'm not sure what is going on here. It's a short grass, with scale variation of clumps from .5 to 1.5.. Other than that, I haven't changed variables. And yes, I made sure that "sit on terrain" is ON. Any suggestions are greatly appreciated.

Title: Re: grass placement question
Post by: N810 on July 16, 2013, 04:32:02 PM
It kinda looks like the grass is displaced some how,
is it connected to the base terrain or some displaced surface ?
Title: Re: grass placement question
Post by: freedomfries on July 16, 2013, 04:54:40 PM
Quote from: N810 on July 16, 2013, 04:32:02 PM
It kinda looks like the grass is displaced some how,
is it connected to the base terrain or some displaced surface ?

The population is connected to the compute terrain node. As it should, right? But yeah it does look like it's hovering over the terrain, in fact, there's no shadow from the grass visible. Clearly it looks above it, but I see no reason why. There's no extra transform... Shouldn't it follow the terrain?
Title: Re: grass placement question
Post by: choronr on July 16, 2013, 05:11:30 PM
Did you use a distribution shader for the grass setting maximum height and/or slope?
Title: Re: grass placement question
Post by: freedomfries on July 16, 2013, 05:22:10 PM
Quote from: choronr on July 16, 2013, 05:11:30 PM
Did you use a distribution shader for the grass setting maximum height and/or slope?

No I didn't. I'm attaching another screen cap of my population and node tree... Pretty standard stuff I would assume.

Title: Re: grass placement question
Post by: Tangled-Universe on July 16, 2013, 05:33:27 PM
Do you displace the terrain below the compute terrain?
I see a node called "rocky texture" which is a powerfractal by the looks of it.

You may try connecting the very last shader of your network, the one which output goes into the planet node, into the populator "terrain shader" input port as "sit on terrain" shader.

The "sit on terrain" shader (2nd tab in populator node) is the shader the software uses to calculate the surface the population needs to be put on.
Now you use the surface calculated by the compute terrain, but if you displace below that compute terrain then there's a chance that the populations don't align with the terrain anymore.
Displacing "a little" (yes, arbitrary) is ok, but if it's too much then you may run into issues.

So if you displace much then you may need to use the last shader of the network to have the populations sit on.
If even that doesn't work then it's even possible you may need to add a compute terrain after your very last shader.
HOWEVER, you don't need to connect it to the planet per se.
That's the versatility of these nodes, you can decide which part uses what kind of "state of information".
Title: Re: grass placement question
Post by: freedomfries on July 16, 2013, 07:26:50 PM
You are correct, I am using a couple power fractals. Those are used for the distribution of color only (snow caps, green valley) of my surface layers. I made sure to turn off the displacement of the nodes in this part of my tree (the shaders). Nevertheless, I tried what you suggested, first connecting my grass population to the last shader, then mapping a new compute terrain after said shader and using it in the "sit on terrain" field. Neither worked.
Title: Re: grass placement question
Post by: paq on July 17, 2013, 12:14:53 AM
Hi freedomfries,

First please forgive my english :)

It's pretty hard to say if the grass are following the terrain (or not). I would suggest to first using a pretty small and constant scale (no scale variation) to have a better overview of what's going on.
Maybe the grass clump size hitself is pretty big ?  The default value of the clump diameter is 10 m, did you change it ? because even if your populator spacing is very low, there are lots of overlapping grass that follow the 'flat' terrain.

What is the 'average' size of the little mound ? (there is a mesure tool above the render preview windows). If a mound is about 1 m, clump patch size should be smaller ... (you can access to the clump node by double click on the little cross of the pop grass node).




Title: Re: grass placement question
Post by: Klas on July 17, 2013, 02:58:59 AM
Try a smaller value of gradient patch size on "Compte terrain".
Title: Re: grass placement question
Post by: Tangled-Universe on July 17, 2013, 12:53:29 PM
Quote from: Klas on July 17, 2013, 02:58:59 AM
Try a smaller value of gradient patch size on "Compute terrain".

Yes that would be my next suggestion too, although the default 20m can deal with almost anything in many cases, but you never know.

The other suggestion of making a small population in front of your camera to see what's really going on is something you should definitely do too.
Title: Re: grass placement question
Post by: freedomfries on July 18, 2013, 03:18:28 AM
Thank you all for the helpful hints. Changing clump size, terrain  compute settings and clump placement did help. It's still not perfect as you see.

1) Can I get my grass to grow properly over my little mounds? Otherwise I guess I can place individual objects there... Perhaps I have hit the limit? I will try an even finer grid on compute terrain.

2) The grass is on very high quality, and still renders like noise. I see no shadows in it. Is this the best the grass object can do? IF yes, I'll have to use some imported geometry because frankly it doesn't look realistic. Check out my render settings. I turned them up pretty high.

Thanks again!
Title: Re: grass placement question
Post by: Oshyan on July 18, 2013, 07:28:46 AM
The built-in grass object is intended largely for background and fill-in. If you're looking for high-quality, realistic grass in the mid-to-foreground, you should definitely use an imported object. Also, the built-in grass object is a flat plane of grass blades, so depending on the size you set for that plane, it may stick out since the grass plane does not conform to the terrain (the base of the grass plane instance may be sitting on the terrain but the plane still can extend away from the terrain and appear to be floating). To avoid this you can use smaller grass patch sizes.

- Oshyan
Title: Re: grass placement question
Post by: freedomfries on July 18, 2013, 04:02:45 PM
Thanks Oshyan, this was really helpful... As for the shadow casting, I suppose it's not casting shadows, just adding extra color on top of your ground plane?

I'll move on trying to make this hero grass...
Title: Re: grass placement question
Post by: Matt on July 18, 2013, 05:42:08 PM
I noticed that you have turned off "Ray trace objects" on the render node. You'll get best results by turning that on.

The grass clumps should cast shadows. It's possible that rendering without ray trace objects could affect small-scale shadows. I'm not sure if that's the problem here, but try turning that on anyway.

The grass clumps could be made to flow over the terrain a little better if you activate "lean to normal" on the populator, but you will still run into some problems because the grass clump radius is quite large. A small radius can help with that, but ultimately you may want to replace with more realistic grass models.

Matt
Title: Re: grass placement question
Post by: paq on July 18, 2013, 10:39:10 PM
Well this default grass object is not bad at all, I use it all the time :) Maybe an option to get a little bend on the strip would be welcome.
Title: Re: grass placement question
Post by: Dune on July 19, 2013, 02:45:50 AM
@paq. I agree it's very useful. You can enhance its usefulness by adding some color variation into the default shader's color input (PF+transform shader, set to world position).
Title: Re: grass placement question
Post by: freedomfries on July 22, 2013, 12:00:03 AM
Thanks Matt!

I think I turned off raytraced shadows because the tutorial suggests to do so, however I innocently assumed that it would mean the scanline engine with shadow maps would be used. I have a background using Maya, and so I have habits or expectations that may not apply.

Turning 'Raytrace objects' back on in the render settings did help the grass casting shadows!

To Paq: That actually looks pretty sweet... How did you get it to grow so well? Can you share your settings? With a little color variation, this actually seems like it can be a very serviceable grass system for certain applications. I want to try those settings.
Title: Re: grass placement question
Post by: paq on July 22, 2013, 11:29:31 PM
Hi freedomfries,

Here's the scene, for T3 ... if you dont have it I can post the settings.
Title: Re: grass placement question
Post by: freedomfries on July 23, 2013, 01:54:07 PM
I don't have t3 YET... But I'm ordering it asap... I didn't realize it was available already. How are you liking it?

Thanks for the scene I'll take a look at it when I can!
Title: Re: grass placement question
Post by: paq on July 23, 2013, 04:40:20 PM
I love it but I'm not sure we have the right to discuss about it more in detail  8)
Title: Re: grass placement question
Post by: freedomfries on July 24, 2013, 09:27:22 PM
Oh you're too cool for school... ;D