multiple objects in population idea

Started by oysteroid, January 13, 2015, 11:21:47 PM

Previous topic - Next topic

oysteroid

I was surprised to discover that there is seemingly no way to use multiple objects in a population, such that the populator pulls randomly from a group of objects for each instance. In a forest, for example, it looks quite unnatural to have the entire thing composed of one tree repeated endlessly. But if you use multiple populations in order to use different variants, you inevitably end up with many overlapping trees. Of course, you could make a group of several variants into one object and populate an area with that, but this is problematic too, looking too patterned.

I hope a feature allowing multiple variants in a population comes soon! It seems a very important one to have for software such as this! And it would be nice if you could control the relative quantities of the various variants.

Since this isn't currently possible, has anyone found a solid strategy for handling this problem?

I did a little thinking and came up with one idea. I used a paint program in which I can create custom brush tips that can be sprayed, and which retain their original color. I made three tips, one each for red, green, and blue, each with a colored spot in the middle, surrounded by a black ring. I then sprayed these all over a black background. The idea is to use an image generated this way as a density shader for the populator, but to use the red component for one population, the green component for another, and the blue component for a third. This assures that an object from one population can never occupy the same location as an object from one of the other two. The colored spots are exclusive. And the idea of having a black border around each color spot is to help avoid objects of different variants overlapping. For example, if there is red right next to green, an object keyed to red could be right at the edge, and an object keyed to green could be right at the neighboring edge, resulting in an overlap. The black areas give a little margin.

Here is how it works in an early test:
[attachimg=2]

Here is the node setup:
[attachimg=1]

But of course, using R, G, and B components limits you to three variants. I don't know of another way to key a particular color other than red, green, or blue in Terragen. Do any of you? Anyway, it occurred to me that I could make a similar image with any number of colors, take it into Photoshop, select one of the colors, make a monochrome mask from that, and do this again for all the other colors. The masks could then be used in Terragen. Even though they are different images, the exclusivity is retained. It would be a bit cumbersome, but any number of objects could be distributed this way such that no two different objects ever occupy the same spot.

And the nice thing about manually spraying the colored spots in a paint program like this is that you can easily control the relative frequencies of the different variants.

Now, if only there was a way to avoid occasional overlaps inside a single population...

Does anyone have any other ideas that might work? This method I came up with seems possibly a bit flawed.

oysteroid

Here is a test with six color keys using Photoshop to turn each of the six colors into a separate mask.

[attachimg=1]

oysteroid

Here are tests with and without the image map coloring the terrain. I also added a power fractal mask that modifies all of the color keys. With a bit of tweaking, it seems like the idea might work fairly well with some trees and whatnot.

[attachimg=1]

[attachimg=2]


Upon Infinity

This has been mentioned before.  I think they're working on a new populator for this kind of function.

bobbystahr

Quote from: oysteroid on January 14, 2015, 12:58:31 AM
Here are tests with and without the image map coloring the terrain. I also added a power fractal mask that modifies all of the color keys. With a bit of tweaking, it seems like the idea might work fairly well with some trees and whatnot.

[attachimg=1]

[attachimg=2]



It should be possible to use the Fakestone shader as a mask  for populations. I already use it to keep the grass out of the Fakestones.
You'd need to make multiple Fakestone shaders tho but it could work.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Dune

I appreciate your effort! But, unless something like this can be done 'automatically' in TG, it's a lot of work, and as you stated, prone to repetition. Overlapping instances would really be only a problem close by, and still, in nature trees have tendecies to grow very near to eachother sometimes, and how wide should the 'black circle' be? For every kind of tree different. Hard.
I have never really seen any overlap issues in my stills, though I can imagine overlap would be more visible when you do a landscape for animation, that you walk/drive/fly through.
When I populate, I make PS masks, and can rule out certain areas for certain species by just (partly) deleting the white form 'the other white' (like shrub/low trees in verges of high stands). Then copy these masks into a RGB file, and use the blue nodes to separate again.
But again, this works for stills, not for worlds to be travelled, so I do appreciate your thoughts!

Oshyan

We're definitely aware of the need for these kinds of features for the populator and we intend to add them at some point in the future.

In the meantime, this is a clever and creative workaround. I would think there should be a way to separate out more masks from a single image using color variations, but I'm not certain at the moment just how to do it. Dune has done some R,G,B based stuff in the past too, but I'm thinking more like using something like multiple Color Adjust shaders to "select" certain color ranges or something and create different masks out of them. I'll think on it a bit more, but any of you Function Network wizards feel free to chime in too. :D

- Oshyan

mrjrdnthms

+1 for this feature. I would love to see it. For me I'd like to be able to:

1. Have a single population node.
2. Connect to a single mask to define where forest should be.
3. And then a collection of objects connected to the population each with a proportion control that lets me set percentages for the objects (e.g. 20%, 20%, 60% for three objects).

Minimum distance separating objects in a population would be a nice control as well.