Rectangular Noise

Started by Hetzen, March 09, 2010, 11:28:51 AM

Previous topic - Next topic

mogn

OK here is my solution, which I think is both faster and avoids any conditionals.
To avoid the conditionals you draws a curve (strait or with zero slopes at the endpoints)
with samples of a simple function, this is done by a "Mix scalar function", thus eliminating the expensive noise functions.
Sampling a non symmetrical cosine function with about 100 degrees difference between the samples do the trick.
1) creating input to the functions:
    divide the x-value by the major scale (100)
    take the floor value of this generating Xi =  ...-1,0.1.2...
    subtracting this from the x value gives the controlling value S.
    You might apply a "Smoth step" to this value if yoy want.
2) The two samples values is then: (Minor scale = 10)
     Left value: 100 + 10*cos(sqrt(3)*Xi+0.25)
     Right value: 200 + 10*cos(sqrt(3)*(Xi+1) +0.25)
     sqrt(3)*Xi is calculated as Length(Xi) which is the most expensive operation in this scheme.
3)  the sample of Xi is fed the the left input of tin Mix scalar
     the sample of Xi+1 is fed into the midle input of the Mix scalar
     the controlling scalar is fed into the right most input of the of the Mix scalar.

This give you a never repeating and non symmetrical slopes.
     

Hetzen

That's an interesting approach. Thank you for taking time out to think about this problem. I'll give it a shot tomorrow and let you know how I get on.

mogn

I made a nice cake with similar approach.

Hetzen

I was having a play with some voronoi noise and came up with this....

The wobbly parts in the middle arise from the underlying noise in the cliff being stretched too far by the angle not getting enough computed normal triangles.

Kadri

#19

Looks nice Hetzen  :)
This and many other techniques you and the others make should be default options in TG2.

Remembered me of Oshyan's photo :

http://www.facebook.com/photo.php?fbid=2508025954821&set=a.2508003594262.93484.1678235043&type=3

Hetzen

Thanks Kadri. I've been looking at this as a texture you apply to a terrain through a surface layer.

I'm still experimenting, like trying to break up the noise so that the horizontal splits aren't as regular, tweaking the noise scales for the verticle cracks and finding a sweet mix spot in the strata scale variation.

I stuck this on Efflux's tgd he posted in the sharing section, with the above texture, and the bellow pic is was what came up.

Efflux's good idea of using Get Altitude to determine mix events I think, could work here in achieving sharper rocks at the top and smoother water eroded at the bottom.

Hetzen

#21
I've been using a Get Altitude to drive a voronoi cell/dif combination, to get the random spaced horizontal steps. What I would like to do, is be able to increase the lateral displacement as altitude rises through a step, to try and give me flat sides to the outcrops.

My problem is that voronoi gives me no ability to modulo a random step. Can a series of sin functions allow me to create a ramp between irregular steps?

Edit.

Having another look at mogn's ideas above, could be the answer...

mhaze


TheBadger

#23
resurrecting

Does anyone remember if the file Hetzen was using here above was ever posted?
It has been eaten.

mogn

@Badger: Thanks for your PM. Do you want infinity numbers of Squares with random colours (or scalars),
or do you want a transform of a circle to a Square?

Dune

Do post it here, if you can, Mogn. Never enough Square noise choice.

bobbystahr

Quote from: Dune on September 24, 2014, 03:42:47 AM
Do post it here, if you can, Mogn. Never enough Square noise choice.

Hear Hear!
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

TheBadger

Hi Mogn And wow, thanks for the choices!

QuoteDo you want infinity numbers of Squares with random colours

Correct me if I am wrong, but squares with random colours made of blue nodes is how you built the quilt network?
And if so, I basically understand what that node file is doing. My problem with it that I don't understand which node in the network does what. Also, I see that the colors are important, I just don't understand how exactly to manipulate them, or what their limitations are.

But to answer your question, Infinity rectangles with random color  :) All vertical. I mean all in the same direction length wise. If that makes sense. But I don't know the difference between colors and scalers or how one may be better than the other, Im sorry to say. So I defer to you to decide what would be the most useful for achieving the effect on a terrain.

Quoteor do you want a transform of a circle to a Square
Well this just sounds like an awesome tool! And would be very useful. If you can build something like that I imagine I could really get certain effects into particular areas.


I admit my difficulties are mostly my own fault. I used your previous files in already very complex networks.
I will start again with any new clips you post in a proper way. I will take just those clips and explore them on a simple default planet by them selves, so I do not confuse my self any more than I need to  ;D

Thanks Mogn, whatever you feel like creating is welcome.
It has been eaten.

mogn

#28
If you have a circular area and v is the the angle (range 0 2PI) from the center to the current x,z.
You can tranform the circle to a N sided figure in the following way:
q = mod(v , 2PI/N)
w = cos(q - PI/N) / cos(PI/N)
multiply current x,z by w.

The with and heigth in the Quilt are decided by the two Perlins (P) as P*50+100.
The colours are selected from a noise functin in the middle of of these rectangles.
So replace one or both of the two perlins with a constant to limit the size of the rectangles.

Dune