Planetside Software Forums

General => Terragen Discussion => Topic started by: sboerner on August 31, 2020, 03:34:14 PM

Title: Placing a population on an imported mesh
Post by: sboerner on August 31, 2020, 03:34:14 PM
I'm not sure this is officially supported (this thread (https://planetside.co.uk/forums/index.php/topic,4816.msg50332.html#msg50332) indicates it wasn't as of 2008) but it's working for me, sort of.

The catch seems to be that you can't rotate the mesh in Terragen. If you do that, you lose the spacing variation between the instances. The attached image shows unrotated original mesh (left), mesh rotated in TG (center), and mesh rotated in Blender before import (right).

Has anyone else had any luck with this?
Title: Re: Placing a population on an imported mesh
Post by: Kadri on August 31, 2020, 08:07:35 PM
Population on imported objects works since a while.
But as you see there is a bug since more then 2 years (i think) that makes it problematic when you rotate the population in Terragen.
Title: Re: Placing a population on an imported mesh
Post by: Kadri on August 31, 2020, 08:46:49 PM
I just got curious how the problem would look in motion.

@Matt looks like the population objects jump-jitter around to find the right place on the object.
There is kind of a banding, wave change in the population.
Title: Re: Placing a population on an imported mesh
Post by: WAS on August 31, 2020, 08:57:44 PM
Nice investigation. Definitely a interesting effect. Wonder if that sheds some light.
Title: Re: Placing a population on an imported mesh
Post by: sboerner on August 31, 2020, 09:13:42 PM
I'm seeing the problem when I rotate the mesh. Rotating the population doesn't seem to have any effect. (These are just quick tests, mind you.)

Good idea, Kadri. If I have time I'll try animating this, too.
Title: Re: Placing a population on an imported mesh
Post by: Kadri on August 31, 2020, 09:43:42 PM
Quote from: sboerner on August 31, 2020, 09:13:42 PMI'm seeing the problem when I rotate the mesh. Rotating the population doesn't seem to have any effect. (These are just quick tests, mind you.)

Good idea, Kadri. If I have time I'll try animating this, too.
Yes that is the problem. But i wanted to see how the population handles the rotation change too more easily.
This is the original bug problem thread:
https://planetside.co.uk/forums/index.php/topic,21503.0.html
Title: Re: Placing a population on an imported mesh
Post by: Kadri on August 31, 2020, 10:27:07 PM
This example does have only the object rotation (from 0 to 60 degree by the way).
Looks like the population does have a problem with the Y coordinate.
From the old thread i remember that rotating the object in the Y axis wasn't problematic.
Only rotation in X and Z was a problem. This looks kinda consistent here...i don't know.

By the way as i looked now i just got curious why there are only 2 parameters (a,b) for distances between population objects.
Wouldn't be 3 better as an option? I wanted to use smaller distance in Y while animated just to see if that does have any effect.
Title: Re: Placing a population on an imported mesh
Post by: sboerner on August 31, 2020, 11:02:15 PM
Thanks, Kadri. I completely missed that thread and it didn't show up in my searches.

For the test posted here I just rotated the mesh in Y. Same result when the object was rotated on all three axes though.

Maybe there are only a and b parameters because populations are placed on two-dimensional surfaces, sort of like uvs.
Title: Re: Placing a population on an imported mesh
Post by: Kadri on August 31, 2020, 11:04:25 PM
With zero space variation the change looks like lines crossing...squares.
Title: Re: Placing a population on an imported mesh
Post by: Kadri on August 31, 2020, 11:09:37 PM
Quote from: sboerner on August 31, 2020, 11:02:15 PM...

For the test posted here I just rotated the mesh in Y. Same result when the object was rotated on all three axes though.
...
Really? Interesting. Maybe it was depending on the object. If the object does have changes in Y when rotated it gets problematic.
I mean the position of a population object doesn't change for a horizontal plane that is rotated in Y... Just guessing of course :)
Title: Re: Placing a population on an imported mesh
Post by: Kadri on August 31, 2020, 11:12:33 PM
Quote from: sboerner on August 31, 2020, 11:02:15 PM...
Maybe there are only a and b parameters because populations are placed on two-dimensional surfaces, sort of like uvs.
Yes could be. But for Terragen still sounds better with 3.
But this isn't any deal breaker as you can control this kinda with the density shader.
Just another option.
Title: Re: Placing a population on an imported mesh
Post by: Kadri on August 31, 2020, 11:24:23 PM
Arrrggh...
After 4 years there might be a workaround (and a very much stupidly easy one).
I am making another test to be sure.
Title: Re: Placing a population on an imported mesh
Post by: Kadri on September 01, 2020, 12:26:13 AM

Ahhh...sorry... Just a stupid chance because i used a cube.
Still testing but no workaround unfortunately :(
Title: Re: Placing a population on an imported mesh
Post by: Dune on September 01, 2020, 01:44:04 AM
There might not be a workaround if it's inherent to the way Matt wrote the population thing. Maybe it calculates not in real 3D space (like noise), but takes a definite number of Y-layers, and calculates per layer. So from the side you'd 'see the layers'. Very interesting thread though, and nice experiments, I like that!
Title: Re: Placing a population on an imported mesh
Post by: Kadri on September 01, 2020, 07:27:09 AM
Could be. Curious what Matt will say.