Author Topic: Get population positions  (Read 234 times)

Offline rupertbg

  • Member
  • *
  • Posts: 12
Get population positions
« on: January 14, 2018, 01:01:04 AM »
Hello,

Is there a way to get the output from a population of all the members of the pops locations? As like a distribution map / shader or similar?

Offline rupertbg

  • Member
  • *
  • Posts: 12
Re: Get population positions
« Reply #1 on: January 14, 2018, 01:01:41 AM »
I want to get the base locations of all my trees to feed into another distribution

Offline Hetzen

  • Member
  • *
  • Posts: 1557
Re: Get population positions
« Reply #2 on: January 14, 2018, 01:27:39 AM »
You should be able to use the same settings from one populator to another, as long as you keep the distribution tab values the same, as well as matching the random seed.

Offline rupertbg

  • Member
  • *
  • Posts: 12
Re: Get population positions
« Reply #3 on: January 14, 2018, 02:47:40 AM »
That works for a lot of things like textures. But in this case I would like to texture around the base of the locations of the trees within the distribution. The trees don't exist at every point in the shader used for the distribution, they are spaced within the distribution by the populator.

Offline Dune

  • Member
  • *
  • Posts: 12943
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Get population positions
« Reply #4 on: January 14, 2018, 06:07:40 AM »
This has been asked a few years back I recall, but it's not possible, afaik. The only option would be to do it the other way round, but I admit that in a mask for texture around trees, not every space will be filed with trees, unless you dense them up or make a mask that's big and pixel precise.
In case you still haven't seen enough of my work: www.ulco-art.nl

Online cyphyr

  • Member
  • *
  • Posts: 3659
    • richardfraser
Re: Get population positions
« Reply #5 on: January 14, 2018, 11:47:07 AM »
This might work ...
Make your population object invisible but still casting shadows.
Place the sun vertically above your scene.
Place an orthographic camera above your population at the same coordinates.
Create a white ground surface.
Render.

This should create a white image with dark shadows where the trees are.
Save this into photoshop and edit to taste.

The image can then be re-projected using the orthographic camera (you'll need a new render camera) as a mask so you can have your desired texture underneath the trees.

Re-render the scene with the normal camera, sun re-positioned to a more natural position and the trees set to render (not invisible object).

As I say this will work in some circumstances but not for all.
www.richardfraser.co.uk
/|\

i7 5930 @3.5Ghz, 32Gb
i7 2600k @3.4Ghz, 16Gb
i7 980 @3.33Ghz, 16Gb

Offline luvsmuzik

  • Member
  • *
  • Posts: 1719
    • luvsmuzik 1995
Re: Get population positions
« Reply #6 on: January 14, 2018, 01:11:41 PM »
If you initially assign your population density to an image alpha type mask, could you then use that mask with broadened edges for your texture mask.

Like, a crisp line for the trees, then second mask image for texture widens that line, overpainting original mask?

I suppose this would depend greatly on the size of the area you are populating. :)

I remember other programs you could create a mask right on your terrain bmp, I think you could do this with a ratio too, where if you just wanted one tree or whatever, you got one tree per dot. (Or I could be hallucinating) :)

Offline rupertbg

  • Member
  • *
  • Posts: 12
Re: Get population positions
« Reply #7 on: January 15, 2018, 05:25:53 AM »
Thanks guys! cyphyr that's some genius right there..! I think I'm going to try this out, at least for placement of undergrowth with fallen leaves, really neat way of making it somewhat repeatable and procedural.

I am surprised it's not easier.. since the coords have to be in there, it's just a matter of getting them out!

Online cyphyr

  • Member
  • *
  • Posts: 3659
    • richardfraser
Re: Get population positions
« Reply #8 on: January 15, 2018, 07:31:48 AM »
If you had a single undergrowth object (say a bunch of bushes, grasses and scattered leaves you had grouped in another program into a single object) then you would be able to use the same settings (identical) as for your forest and your undergrouth object would appear at the base of each tree.
However you are wanting an area around each tree position point and I think the math for that may be quite complex. Doing it by hand like above may actually be easier .
www.richardfraser.co.uk
/|\

i7 5930 @3.5Ghz, 32Gb
i7 2600k @3.4Ghz, 16Gb
i7 980 @3.33Ghz, 16Gb

Offline Dune

  • Member
  • *
  • Posts: 12943
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Get population positions
« Reply #9 on: January 15, 2018, 07:59:46 AM »
You can also use the grey edges of a soft mask for undergrowth, by using a color adjust; black up, to make the tree area, and another; white down, to make the surrounding mask.
In case you still haven't seen enough of my work: www.ulco-art.nl

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11833
  • Holy snagging ducks!
Re: Get population positions
« Reply #10 on: January 22, 2018, 01:05:32 AM »
Exporting population instance position directly is not currently possible, but something we intend to support in the future. If you just want to re-use the same positions in Terragen itself, you should be able to just copy the population, and maintain the seed value (and the same masks, if any, of course).

- Oshyan