Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on February 10, 2010, 10:40:10 PM

Title: Population on a displaced plane not working as expected
Post by: cyphyr on February 10, 2010, 10:40:10 PM
Hi there
I'm working on a project at the moment that is using positively and negatively displaced planes to create floating mountains as in Avatar. The process seems to work great bar a few teething problems (each mountain has to be individually tuned) except when I try to place a population on the displaced plane. If the plane is at 0 altitude then the population sits on the displaced surface just fine, however if I raise the plane I just cant get the population to sit properly.
The populations "Sit on terrain" is set to the displacement of the plane or a transform node. I have tried:


And combinations of the above... .. .

Any advice greatly appreciated.

Thanks

Richard
Title: Re: Population on a displaced plane not working as expected
Post by: Dune on February 11, 2010, 02:34:19 AM
Perhaps another compute terrain? And what if you branch off the same 'floating' displacement from the main terrain, add another compute terrain, set the object Y at the plane height, and sit the pop on the newly displaced 'terrain'. The branch off leads nowhere, of course.

---Dune
Title: Re: Population on a displaced plane not working as expected
Post by: Tangled-Universe on February 11, 2010, 03:45:08 AM
Quote from: cyphyr on February 10, 2010, 10:40:10 PM

  • moving the Object Marker to the same hight as the plane


Hi Richard,

Do you mean that you have set the Y-value to 100 in the translate coordinates of the populations?
If the populations sit nicely when the plane is at 0 altitude you'd expect that they would sit correctly when you offset the translate for the populations.
However, since you're displacing with fractals you'd be aware that the plane has different displacements at altitude 0 compared to altitude at 100m.
So the offset would be based on calculations made at 0m altitude and then simply shifted up 100m -> mismatch.

Can you post a screen of your setup?
Maybe this has to do that somehow the main planet's normals and texture coordinates are taken into account. Am not sure.
Intriguing problem to solve :)

Cheers,
Martin
Title: Re: Population on a displaced plane not working as expected
Post by: cyphyr on February 11, 2010, 07:33:16 AM
Thanks for the feedback :) Its amazing how things seem clearer when you hear them back sometimes.
Replacing the PF with an image maped displacement has solved the problem entirely. I'll have to work on finer detail but as  (in this case) most objects will be a distance from the camera this should not be too much of an issue.
Now to try to figure out to get round the opacity and shadows issue :)
(Planes still cast a square shadow even when that have an opacity mask ... .. . )
Richard
Title: Re: Population on a displaced plane not working as expected
Post by: cyphyr on February 11, 2010, 07:28:06 PM
Nope. still not working as expected, maybe I'm flogging a dead horse here :)

Using just image mapped hight-fields helps, if the objects don't have any scale variance. If they do (I usually give my populations a -0.5/+1.5 scale variance to start with) the population is displaced verticaly (I think proportionately) with the smaller scales lower and the higher scales highest.

Any ideas, solutions ? I don't want to have to use multiple populations for each "mountain" but that may be the only way to go.

:)

Richard
Title: Re: Population on a displaced plane not working as expected
Post by: cyphyr on February 11, 2010, 08:22:52 PM
SOLVED  ;D

Keeping the planes at 0 altitude and using displacement ofset did the trick :)
Title: Re: Population on a displaced plane not working as expected
Post by: nikita on February 11, 2010, 08:25:46 PM
Quote from: Tangled-Universe on February 11, 2010, 03:45:08 AMDo you mean that you have set the Y-value to 100 in the translate coordinates of the populations?
This works too ;)
Title: Re: Population on a displaced plane not working as expected
Post by: Tangled-Universe on February 12, 2010, 06:23:54 AM
Quote from: cyphyr on February 11, 2010, 08:22:52 PM
SOLVED  ;D

Keeping the planes at 0 altitude and using displacement ofset did the trick :)

Haha damn, of course! I figured it out that offsetting pops might not work, but why didn't I think of offsetting the displacement in that same post :P Great that you've worked it out. Looking forward to see the result Richard! :)

Cheers,
Martin