I was wondering if anyone could help point me in the right direction for generating fractal lines and foliation in Marble as line work. Essentially the impurities in marble creates its pattern, and I would like to generate this in Grasshopper rather than tracing an existing. I’ve started with Fields and then with land contours but it doesnt get that “blocky” feel to it.
Fractals is not the way to do that. Controlled recursion [kinda a “special” kind of swarms, so to speak] is. That said speed is the paramount issue … most examples that I’ve seen are slower than any Harley Davidson. I have some “similar” defs (I bet that Tom J has as well [swarms]) but they are carried over 100% via C# code. Notify if you want one for playing around.
But if I was you … I would do it the good old way: trace a real thing and forget computers.
I ended up just line tracing it on Illustrator and importing the lines into Rhino… sorta cheating, but I don’t really have the time to delve into the complex maths and scripting
There is no complex in the script I published. Just sliders in order to duplicate classical marble texture.
Nevertheless it was an interesting question
Hi Laurent, huge fan of your work you have posted on GH forums. Is there a way to apply this technique to a sphere instead of a rectangle? Only interested in constructing a mesh for rendering, not extracting contours.
Bust instead of applying contour I apply Mesh Iso Splitting, so you need to put a value (double not point) at each vertex of the mesh then iso-splitting then colorize.
Here an example with no cut on the sphere.
I use a icosaedron sphere of my own. You have to specify the maximum number of vertices. Here less than half a million. I put many choices. All the equations are in C# to go faster.
Sphere is radius 1, so as noise is scale dependant. I advise you to use 1 unit objects, but it is not mandatory. You can lower the number of vertices to go faster.
Hope it helps.
Hi Laurent,
I was just wondering if you knew a way in which the pattern can become more sparse the further it gets from an attractor curve? I tried to play with the script you supplied, but I just cant seem to work it out.
We the graphics guys do this usually with a technique called Domain Warping which is similar to Laurent’s answer just warp your noise function in a noise function instead of using trig: double myNoiseValue = noise( myPosition + noise( myPosition ) ); noise here should probably be instead a fractional Brownian motion/fractal sum but a simple noise will do and is faster.
Note getting periodic noise is really easy once you get the gist of it, the trick is simple: mod your coordinates, is that easy. So you take your UVs and simply do % with the size of the texture, it doesn’t work for everything but for most “classic” noise generation techniques like Perlin, Value, etc… it is that easy. There are examples for that online search for tileable perlin or whatever shader and there probably exists a shadertoy that does it.
Hello Laurent, I admire your work, but, I have tried to transform procedural texture to a texture file, with this file of yours, but I cannot convert it into an image, could you please explain how you do it a little clearer with an image of the file gh. I appreciate your help
Take a Mesh Plane (Bitmap will be (number of face+1)*(number of face+1))
Take a component that put colors on a Mesh (here Fast Noise Lite from Nautilus)
Plug a Gradient if you want something different than black and white
Use Object to Image that try to convert a rectangular mesh to an image, it converts also a File Path or an image !
Then export using Save Bitmap from BITMAP+ plugin
For tileable I think an extra pixel row and column could help. It is the main problem of conversion between mesh and image. Most of the time color is on vertex but for image color is on pixel (face for a quad mesh). So you could use