Get population positions

Started by rupertbg, January 13, 2018, 09:01:04 PM

Previous topic - Next topic

rupertbg

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?

rupertbg

I want to get the base locations of all my trees to feed into another distribution

Hetzen

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.

rupertbg

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.

Dune

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.

cyphyr

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.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

luvsmuzik

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) :)

rupertbg

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!

cyphyr

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.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Dune

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.

Oshyan

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