Rectangular Noise

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

Previous topic - Next topic

Matt

Thanks Johnny. I need to check my code to see if that's what I'm doing, but it sounds familiar. IIRC I was getting discontinuities. I'll take another look. Awesome :)
Just because milk is white doesn't mean that clouds are made of milk.

jmgibson

That's the inherent problem with the voronoi algorithm.  Its discontinuous by design at the seams.  Mainly because it was designed to generate seams.  :)  In theory you could super sample the seams with a filter to smooth it to bevel the plane pairs inside the checker loop but I've never tried.

Quote from: Matt on October 21, 2014, 04:20:21 PM
Thanks Johnny. I need to check my code to see if that's what I'm doing, but it sounds familiar. IIRC I was getting discontinuities. I'll take another look. Awesome :)

Hetzen

Quote from: jmgibson on October 21, 2014, 03:59:18 PM

Gosh, thanks Matt.  What a compliment.  I think I still have the VFL code for that function.  I think we called it "Bouldering" at the time.  I can track it down and send it to you when I have sec.  If I recall correctly I also implemented it as a SOP in Houdini and it looks AWESOME animating.  I will see if I can find it but here is the general solution:

Loop over a 3x3x3 cell area centered on the current jittered cell center C, finding the neighboring cell centers Ax = A0...A8.  Define each cell's boundary surface to be the surface, Sx, half-way between C and Ax with the normal Nx = normalize(Ax - C).  Project the point P, being processed along P - C onto Sx.  Call this ray intersection Ix.  Remember Ix and dx = distance(Ix, P).  The closest boulder face after the loop is the one with the smallest positive dx.

Fascinating. Thank you for posting. Do you have any links or images we could see?

Tangled-Universe

Quote from: jmgibson on October 21, 2014, 03:59:18 PM

Gosh, thanks Matt.  What a compliment.  I think I still have the VFL code for that function.  I think we called it "Bouldering" at the time.  I can track it down and send it to you when I have sec.  If I recall correctly I also implemented it as a SOP in Houdini and it looks AWESOME animating.  I will see if I can find it but here is the general solution:

Loop over a 3x3x3 cell area centered on the current jittered cell center C, finding the neighboring cell centers Ax = A0...A8.  Define each cell's boundary surface to be the surface, Sx, half-way between C and Ax with the normal Nx = normalize(Ax - C).  Project the point P, being processed along P - C onto Sx.  Call this ray intersection Ix.  Remember Ix and dx = distance(Ix, P).  The closest boulder face after the loop is the one with the smallest positive dx.


Thank you for joining this discussion Johnny.

I'm curious too to see any links or images created with the method you described, just to see what's possible in principle :)

Matt

Quote from: jmgibson on October 21, 2014, 04:25:55 PM
That's the inherent problem with the voronoi algorithm.  Its discontinuous by design at the seams.  Mainly because it was designed to generate seams.  :)  In theory you could super sample the seams with a filter to smooth it to bevel the plane pairs inside the checker loop but I've never tried.

I imagine there must be some surface that sort of shrink-wraps the voronoi boulders without this discontinuity, and that's what I was trying to find. Supersampling sounds like it will be expensive, but perhaps I'm not thinking of the right way of doing this?

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

I don't mind a discontinuous normal, or sharp edges where planes meet, if that's what you mean. I just don't want the surface position to suddenly jump at a cell wall.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

bobbystahr

Quote from: Dune on October 21, 2014, 02:50:55 AM
Thanks for your comprehensive post, Matt and Oshyan. I was thinking along the same lines, but can't stop experimenting. As a matter of fact I've experimented before with procedural vdisp setups, like you mention, Oshyan, but you can't help getting weird unnatural crossovers, where the 'membrane' overlaps, so I dropped that. My latest experiment was with a repeated and procedurally multiplied/changed vdsip map, while using several angles for displacement and several angles where what should displace in what direction. But the main problem is indeed that a displacement is relative to a greyscale (PF or vdisp) and it's origin in space; it won't fill the space, or fold the membrane into the end of the '3D space's whiteness'.
If the surface is already vertical or horizontal you can get blocky stuff, but not when you start out of smooth rounded slopes, TG should then displace that with a biased number or something, based on Y, X and Z in some blocky mathematical relation.
This morning I was thinking about using angle and slope based tilt and shear, fed by blocky pf's..... so that'll be next. And make a better vdisp map in mud (I'll try it image based, Jochen, thanks).

Tilt and shear doesn't work.

maybe not Ulco, but that's a damn fine surface.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Tangled-Universe

Here's something neat...just 2 vector displacement nodes and a strata shader :)

Oshyan

That looks extremely nice Martin!

I think any strictly rectangular, volumetric function is going to have issues being used as a displacement source at certain angles. You have the edges of each square in each dimension at some point, and this could end up just looking flat or crappy at some angles, right? If you want something that presents square shapes that are oriented toward the surface they are displacing, regardless of angle, then you need to take the surface normal into account when generating your function, and indeed a volumetric function probably isn't what you want (you're faking the appearance of it I guess, but to actually accomplish it the results need to vary by surface normal I think). Anyway, just some thinking out loud, might not make sense. ;)

Regarding smoother Voronoi, Inigo Quilez has written and shown some interesting info/examples on this:
http://www.iquilezles.org/www/articles/smoothvoronoi/smoothvoronoi.htm
http://www.iquilezles.org/www/articles/voronoise/voronoise.htm

- Oshyan

Dune

If you need flat squarish rocks, you should start with a quite straight angle and smooth base, then work the finer displacements in outside/around the blocks.

N810

That one looks realy good TU.  :D
Hmmm... wonder what this button does....

Dune

 ;)

Tangled-Universe

That looks pretty cool Ulco :)

Quote from: Dune on October 22, 2014, 02:38:59 AM
If you need flat squarish rocks, you should start with a quite straight angle and smooth base, then work the finer displacements in outside/around the blocks.

I suppose for this render you did the above? ;)

Unfortunately I have no idea what you actually meant here :D

Dune

#163
Yes, I did. Well, if you start out with rounded shapes it's harder to get straight edges. I also limited to verticals, and used a get normal to project stretched PF's onto certain angles. Doing something with an image map now, which works much better as you have to softly ending lines from the PF's.
And I prefer displacement versus vecor displacement, because blocks will be square holes on the other end (unless you use 4 angles, instead of 2).

Image map shader...

TheBadger

#164
Thanks for the in depth posting guys.

@Oshyan,
Were you going to continue where you left off?

...

So, where are we exactly then. The vector is the best way forward or not? Ulco thinks no it sounds. Or at least it sounds like there are an abundance of problems with every option. But what is really the best general or specific solution of the options that have been explored so far? I mean, what do you guys think now is the best place to invest effort and time of the the various ways of doing this? Still vector?

I would hope (I do hope), that at least one method of making rectangular faces and addressing the issues of applying the form to a terrain, could be distilled down to a manageable method (for lack of a better way to say it), that everyone can use. Not simply a clip file, but a method.
Of course, if this is still moving along and there is more ideas being worked out then this may not be the right time to ask that.

As for me, I simply want to make specific images. But if you guys inadvertently transfer your powers to me through this thread then thats fine too! Don't hold out hope though that you are making me smarter. Before this thread and even during parts of it I thought I understood a 5 sided rectangle, Now I think I may be brain damaged  :-\
It has been eaten.