Planetside Software Forums

General => Terragen Discussion => Topic started by: bigben on January 26, 2008, 10:37:21 PM

Title: (In)Consistent tree placement with animations
Post by: bigben on January 26, 2008, 10:37:21 PM
Following on from an animation issue alluded to by Mr_Lamppost (http://forums.planetside.co.uk/index.php?topic=3234.msg33233#msg33233 (http://forums.planetside.co.uk/index.php?topic=3234.msg33233#msg33233)) I've been running a few tests to try and reproduce his problem.  As I had started from the TGD being used in the post (http://forums.planetside.co.uk/index.php?action=dlattach;topic=3234.0;attach=8893) I actually found myself having problems trying to reproduce things working correctly (as was my previous experience). First few tests were trying to get things to work, first with the TGD mentioned, then with a new TGD with just the population.

Attempted fixes:
Title: Re: (In)Consistent tree placement with animations
Post by: bigben on January 27, 2008, 12:02:14 AM
The last time I saw a problem like this was with water, but the latest update fixed that, exposing the seed value, allowing it to be fixed.  Populations on the other hand have had the seed value visible as long as I can remember, although for some reason it appears to be broken. I'm not sure if I've rendered an animation with objects using the latest update prior to this, so at the moment I'm wondering if something broke with the update?

... Tried reducing the movement increment of the population and it appears that the placement is linked to the population's location.  Thinking back now, I don't recall rendering an animation with a mobile population. I had set them up for performance testing of the populator, but may have only rendered animations with mobile population density shaders.

This is potentially a bad thing because you need to move the populations with the camera in an animation to maximise performance. You can mask the distribution of a population to a small area to reduce the number of objects but the time the populator takes to calculate a population seems to be solely dependent on the area of the population, not the number of objects. To maximise performance then, you need to minimse the area of the population to only cover the area in which you require objects to be rendered, which requires moving it with the camera.

If the coordinates of the population of the used to calculate the placement of objects this might be better with a random, constant vector, specified with the seed value (or just a fixed one? ... tweaking the seed should provide enough control over variation?)
Title: Re: (In)Consistent tree placement with animations
Post by: Oshyan on January 27, 2008, 12:10:49 AM
It's sounds like something may have been broken since the last version. We'll look into it.

- Oshyan
Title: Re: (In)Consistent tree placement with animations
Post by: Mr_Lamppost on January 27, 2008, 07:30:33 AM
Thanks for checking my results.
Title: Re: (In)Consistent tree placement with animations
Post by: bigben on January 28, 2008, 02:57:19 AM
I'm glad I did because I would have ended up facing the same problem eventually.  :)
Title: Re: (In)Consistent tree placement with animations
Post by: Mr_Lamppost on January 28, 2008, 04:45:48 PM
I am sure it was working in at least one of the early versions, I did the test expecting it to work and thus support my idea that instances are placed at Voronoi cell centres. 

See:

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


***EDIT*** I know you know this bigben but the link is for the benefit of other people in the future when the two threads have become separated ;) ***/EDIT***
Title: Re: (In)Consistent tree placement with animations
Post by: Matt on January 28, 2008, 08:51:22 PM
The Populator was never designed to have its centre and area parameters animated, unfortunately. If you animate these values then the population will change from frame to frame. It has always been this way (although in some situations you may find that some things remain fixed relative to the population boundary).

I see the value in being able to animate these parameters, so it may be something we can improve in future updates.

Matt
Title: Re: (In)Consistent tree placement with animations
Post by: bigben on January 29, 2008, 01:41:10 AM
Thanks Matt

At least I now know I'm not going mad when I'm trying to remember whether I animated the population before or just the masks  ;)