procedural population variation

Started by Dune, September 24, 2010, 09:04:37 AM

Previous topic - Next topic

dandelO

Ahhh, so multiplying by a fractal will keep the world space setting from the get node. Very good.
Where is that square scalar going to?

Instead of abs and square nodes I'm using a smooth step between -1 and 1, I don't like the perlin transitions with abs/square, to drastic. They're really minimized with a smooth step scalar.

This thread is great, so many possibilities! :)

j meyer

dandelO - thanks for confirming.
               Haven't looked at Ulcos file from the beginning of this thread,but
               compared to his set up posted in the other thread i have just
               a single PF as break up not his array of nodes and it seems to
               give a different result.Maybe i'll post an example later,got to get it from
               another machine.
               "...it still  involves adding surface layer to each object-part shader you
                want to affect, though." Ain't that necessary with the color function
                input,too?  ???

dandelO

Well, when you load an object, it comes with a default shader attached. Even if an image is specified for that texture, you can still use the colour function input of that default shader to specify how much of that image/colour is applied to the object part, and where it will be applied.

Hetzen

Quote from: dandelO on September 25, 2010, 11:51:26 AM
Ahhh, so multiplying by a fractal will keep the world space setting from the get node.

No it doesn't. Not by my tests I'm afraid.

Volker Harun

The first question I'd like to answer:
Quote from: dandelO on September 25, 2010, 11:51:26 AM
Where is that square scalar going to?
As you can see, there are two Pops ... the square scalar goes to the Part's input of the first Pop ... which is just the same you got with the file on page 1 of this thread. It worked there without even have plugged the PF into the other Part of the only active Pop ... before the both Pops got the same function to run ...

Quote from: dandelO on September 25, 2010, 11:51:26 AM
Ahhh, so multiplying by a fractal will keep the world space setting from the get node. Very good.
2 years ago I would say: 'YES' but I am not sure anymore ... it would be a great help for us knowing what the difference of the 'Get position' and the 'Get Position in Geometry' is. The last is clear ... it does not care about any textures or displacements and is not scalable. The first one is not scalable either, but acknowledges displacements after a 'Compute terrain', doesn't it (<--- this is an honest question) ... and this is a wink to Matt, Oshyan, Jo ... ;)
Quote from: dandelO on September 25, 2010, 11:51:26 AM
Instead of abs and square nodes I'm using a smooth step between -1 and 1, I don't like the perlin transitions with abs/square, to drastic. They're really minimized with a smooth step scalar.
This is quite a good idea ... good ... ehmmm .. in means of GOOD!!!!! ;)
Quote from: dandelO on September 25, 2010, 11:51:26 AM
This thread is great, so many possibilities! :)
I feel a bit alien here, as I have more working possibilities with the Mac - while I do not know if mine is the correct version at all ;)

Cheers,
Volker

j meyer

#50
dandelO - that's what i wanted to do with the fractal break up: mixing the image
              and a color,but i'm not sure anymore.(see below)

all - meanwhile i've played with Dunes tgc and by comparing and mixing it with
     my approach i found a) the results are pretty similar and b) i was wrong
     thinking the PF had an effect(a 'normal' effect that is) as break up shader,
     actually it's just brightening up the masking/blending a bit.When i tried it
     yesterday i started with another noise flavour and when i changed it i got
     a huge difference and so i mislead my self,i guess.Sorry.
     But on the other hand it seems strange that with perlin noise the coverage
     of the surface layer is working (the green is visible) and when it is set to
     ridges just the original color (orange) is visible.
     For the sake of completeness i attach my result from yesterday.
     [attachthumb=#]

PS:Hey Volker,it's not that often one can see mac-users in that situation these days. ;)

Volker Harun

Hey jmeyer ...

... right ,-)

About the PF ... it may matter having one or two colours enabled ... having one changes from transparency to visibility, having two may overwrite the above colour, scalar information.

dandelO

I thought it was a good one too yesterday, then realised the fractals were still only working around each object when I raised the scales or something. We need a way to simply force a fractal over the desired space, there has to be a way, I've even tried an invisible connection from 'compute' terrain, which feeds the planet, to the fractal but still, only per-instance coverage. All instances take their coverage from different points in the fractal(the point in world-space of which they sit, I'd bet), otherwise they would be textured the same in each instance. They aren't, though.

Here's what I've been playing with then, a simple combo. It only uses 2 perlins; large scale/small scale. I started out with 4 but it's just to keep it simpler for now. The good thing about the container node is that, it serves as an added contrast control for the function. [attachimg=#]
I just go into the parts shader, open the clip there and plug into the default shader colour function from there because, I figure, this would be a good type of thing to enclose inside objects you'd likely want to colour vary easily, vegetation models for example. If you loaded the model in a population, you'd be able to enable population variation in one or two clicks for that object.

I'd like to know more of the functions, to be able to make the perlins more pretty but this is all good practice. :P

dandelO

I don't know if I'm using the 'smooth step' scalars in their most correct context, I'm not great with maths functions but according to the node description, this should make a smooth curve, from values 0>1, I'm finding I need negative numbers to achieve the kind of smooth curve I'd like. But, whatever, it's working for creating a nice smooth blending option, if a bit harsh in the images.

Hetzen

#54
Hi Martin.

The smooth step scaler makes a black and white ramp from an input with a base constant to a ceiling constant.

In other words

If I had an input of something that gave me a value of minus infinity to positive infinity, like Get Altitude, I can create a greyscale ramp from say 1000m to 5000m, where everything below 1000m is black, and everything above 5000m is white, and everything in between is a value of grey.

If you want to put a curve on that ramp of grey, then you need to have a look at Bias and Gain functions.

http://www.planetside.co.uk/docs/tg2/noderef/window_1_13_1.html?MenuState=fABEAAQABAAAAQEABAAAAABAQAEAEAEAAAQABEEAEAQdVVVVXdVVVBAEAAAAEAAAAAAAAAAAAAA

http://www.planetside.co.uk/docs/tg2/noderef/window_1_13_4.html?MenuState=fABEAAQABAAAAQEABAAAAABAQAEAEAcVVVVABEEAEAQdVVVVXdVVVBAEAAAAEAAAAAAAAAAAAAA

Those two links show you the curves you can apply.

*** Edit. I thought the output of the smooth step was linear, it seems it isn't. I now realise why some of my stuff doesn't work how I expect it. Any chance of a linear step scaler Matt?

Hetzen

Mind you, there is nothing stopping you using that ramp to drive more functions, like Sine waves or other trig equations, of which I'm sure Volker can explain more about. Could even be the scale of a Perlin noise, or multiplying another chain of nodes from 0 to 1, ie blending.

jo

Hi Hetzen,

The smooth step does make a smooth curve, not a linear ramp:

http://www.planetside.co.uk/docs/tg2/noderef/window_1_16_2.html?MenuState=fABEAAQABAAAAQEABAAAAABAQAEAEAcVVVVABcFAEAQdVVVVXdVVVBAEAAAAEAAAAAAAAAAAAAA

The advantage of using the gain or bias functions is that you have some control over the shape of the curve, however you only a smoothly transitioning curve with the gain function with gain values greater than 0.5 (IIRC!!). In all other cases, for both gain and bias, you will get discontinuities (i.e. sharp edges) at the start and/or end of the curve.

Regards,

Jo

Volker Harun

Quote from: Hetzen on September 25, 2010, 07:00:22 PM
Mind you, there is nothing stopping you using that ramp to drive more functions, like Sine waves or other trig equations, of which I'm sure Volker can explain more about. Could even be the scale of a Perlin noise, or multiplying another chain of nodes from 0 to 1, ie blending.
I use the smooth step after trigging with sines and/or cosines ... not before, yet ... but it is interesting ,-)

But first, about the Perlin noise which is basically a random driven Sine ... so somebody might think about distorting the 'Get Position' with a Sine ... well, one step further, with a low scale Perlin ... just a guess, but I'll give it a try ...

thanks to the inspiration you just gave me in the posts above :) ;) ;) :)

Edit: Thanks Jo for your fast response

Hetzen

#58
Quote from: jo on September 25, 2010, 07:06:18 PM
Hi Hetzen,

The smooth step does make a smooth curve, not a linear ramp:

http://www.planetside.co.uk/docs/tg2/noderef/window_1_16_2.html?MenuState=fABEAAQABAAAAQEABAAAAABAQAEAEAcVVVVABcFAEAQdVVVVXdVVVBAEAAAAEAAAAAAAAAAAAAA

The advantage of using the gain or bias functions is that you have some control over the shape of the curve, however you only a smoothly transitioning curve with the gain function with gain values greater than 0.5 (IIRC!!). In all other cases, for both gain and bias, you will get discontinuities (i.e. sharp edges) at the start and/or end of the curve.

Regards,

Jo

hi Jo

Ha ha, I was just editing my post after re-looking at the reference site. Could you tell me how to make the smooth step linear? I've been working on a set of functions that make crashing waves on any shorline, and I've been heavily relying on Smooth Steps, under the miss assumption that the output was linear. This makes things a lot clearer on why I'm not getting things to happen when I wanted them.

Many thanks

Jon

Hetzen

Actually, and sorry for taking this thread off topic a little, the solution for a linear step is the top right hand corner of this node network. So I've kind of answered my own question. LOL. Any chance of putting this into a single node form Jo?

http://forums.planetside.co.uk/index.php?action=dlattach;topic=10582.0;attach=26288;image