Grass population

Started by MuT7, August 13, 2009, 02:15:21 PM

Previous topic - Next topic

MuT7

Hello there,

I'm rather new to using terragen, but I've gotten a hold of the basics, however I'm having an issue trying to render a landscape with...grass on it. I'm trying for a decent close up view, so I've opted to use a population instead of just some shaders. I downloaded a few grass patch packs and attempted to populate the scene, however whenever I decrease the object spacing (I'm assuming thats how to get more 'grass'), Terragen usually crashes.

Do I need to use a more powerful rig or is there something I'm doing wrong?

Thanks for the help ! ;D


domdib

Some more information would be helpful before the question can be answered; e.g. which grass patches? what spacing? and/or you could always post the TGD file here.

MuT7

Oh sorry, here's the tgd, I was trying to use the one of the grass patches from Mr Lamppost's basic grass pack from here:

http://forums.planetside.co.uk/index.php?topic=6630.0

I set the spacing as 2, previously I tried inserting populations of different patches on the same place to have some variation, with higher spacing values but that didnt work either =/

domdib

I think the problem is that you have created too big a population. Recall what your issue was? To create convincing CLOSE-UP grass. But you are populating an area 7000 by 7000, stretching way into the distance. That requires an enormous number of instances, which in turn requires lots of memory, which is probably what is crashing TG2. What you should try is to populate a much smaller area near the camera, and then use a grass shader of similar colour in the middle and far distance.

MuT7

Alright thanks a lot, however I looked around at various other renders and other people seemed to have populated a large area with grass, is that just a clever use of shaders or is there a trick to it?

domdib

People use various techniques to fake vegetation, as you'll see if you dig around. What does seem to be best practice is that you only use high quality grass patches (or trees) in the near distance if you can help it, as TG2 can use up a lot of memory quickly - when the 64-bit version comes along, this will presumably become less of an issue. So in the medium to far distance, it's usually better to either downgrade the quality of the population, or fake it with shaders.

Hetzen

Ideally, I'd like to be able to shift a population area over time, so that I can populate only where the near ground is in relation to a camera move. This could only work if the population seed is exclusive to the planet's x,y,z coordinates, rather than the population area's. Is this the case at the moment? Just thinking out loud.

Dune

Thinking out loud as well, and perhaps not understanding what you mean, but what if you attach a distance shader to the pop? Then wherever the camera goes, the pop will redistribute. You'll need a huge basic field of course, and I don't know if an empty field will take up memory as well.

---Dune

Hetzen

#8
That is a method I already use. The problem is that the population rectangle still has to calculate the non instances, so the larger the population area, the more non-instances it would have to spend working out. With a moving area, the instances will be less, although it would still have to calculate each frame, but then so would the other method.

It would be interesting to know when working out each instance, whether each x,y,z is worked out on the planet's coordinates defined by the population area. Or, the instance is worked out in the population area's x,y,z. Maybe a quick test could clarify....

Hetzen

Just done a quick test. I've created a 100m square population, and shifted the centre by 10m in z. As you can see, the instances are in the same place, except offset by 10m in z. So the population creates it's instances based on the internal x,y,z of the population area, not the planet's. So moving the population area would not work as it stands. I wonder if it would be difficult to impliment using the planet's coordinates, because it could be a neat way of keeping render over heads down, especially when coming to render moving camera sequences.

Matt

I may be able to do that.

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