Noise, Perlin noise and esthetics of random

Here it is, a title which, as usual is quite confusing. First of all here we will not discus mathematical nature of various random number generators (which is also an interesting topic). And we will focus on esthetics of random. Random… what? Well anything random I guess.

So as I see it there are two ways of making things esthetically more interesting*. One would be depicting more. Say we have a plain wall, we would want to see 5 layers of paint which where applied, and in some parts the paint is cracked and we see bricks, also we see a spider web and so on. This is one approach, and it is a best way to achieve visual detail, and make our frame more interesting. But it takes time to construct both wall, and spiders and dirt and so on. Another approach is to increase detail by adding random elements, which by themselves do not depict anything in particular, but in certain context might be perceived as intended detail.

plian white wall
plian white wall
rich white wall
rich white wall

Again noise is just noise. But if we use gray noise placed above depicted fireplace, viewer will think its a smoke. If we add same gray pattern of noise on plain wall, viewer might interpret it as a dirt on a wall. This way is much faster. And this is what we will talk about.

First of all lets see a simple Perlin noise pattern, and a multiple scaled Perlin noise patterns. (image A)

perlin noise, taken from wikipedia
perlin noise, taken from wikipedia

And in picture “B” we see variations of Perlin noise (here I am not certain if it is actually a perlin noise, probably not, corrections are welcome) which intend to depict something more precise then abstract noise itself.

cedural maps "Celular, Dent, Perlin marble, marble", 3ds max, image B
procedural maps “Celular, Dent, Perlin marble, marble”, 3ds max, image B

So a simple comparison could sound like this.
Perlin Noise. A boring plane noise which is rather abstract and doesn’t depict anything in particular. Which is also a good thing as an element to construct more sophisticated noise like effects.
Now there is nothing better then Scaled multiple Perlin noises. It has different size elements (see image A) and is almost a god in cg world (no?). And variations of Perlin noise, which could be modified to depict wood and other interesting patterns. But what is the difference between Perlin noise – and multiple scaled Perlin noises? Well, I would say that its all same plane noise, but it goes towards depiction, towards sophistication, towards no randomness.

So desired noise for image enhancement, should look like intended detail rather then just random detail. What I want to say, its not the detail itself that is a valuable a detail, its a detail that has something behind it. And its quite tricky to make automatic algorithms that would not only add detail such as Perlin noise but a noise of a sort that somehow depicts something, without a necessity to actually take care of what it depicts. And for that I think we need to look in to such procedural maps as “planet” in 3d s max. Its is gone in new max versions.. (why?). Also in some older posts I suggested to build materials, or procedural maps that would “feel”the geometry they are applied upon. Especially the last link talks about an extra detail on edges of mesh.

One example from real world. Some days ago I was walking in a street and saw a window. It was dirty and covered in paint. But the paint was not running down, but upwards. Now first thought would be that it is an unneeded detail, which , if it where a CG shot, not a real life would make no sense and would complicate understanding of an image or a shot. And then I found a possible reason for paint running “upside down” Most likely the glass was already dirty, and a person who made window used dirty glass without directing it in any particular way from point of view of paint on glass. What I am trying to say, is that observer will always try to find explanations, and be it correct or incorrect, one always might find reason behind something. And here is the question: If it would have been a CG shot, would it be a bad shot, because if one notices this it makes them uncomfortable, ads an unnecessary level of thinking and so on. Or is it a good shot, because rather then having a clean boring “plain”glass we have some visual details…

So I guess the point of this post is to make a note, that we do want detail, but not just any detail, we want it to be “in the context”. It has to depict something, somehow. And if it actually doesn’t depict anything in particular, we should strive that a viewer would find its meaning on his own. Its a tricky task, and I guess.

—————————————————————————————————————————————————————–

*Here I have to make a note and remind you that I am by no means implying that more complicated is better, more detailed is better, visually overwhelming is a desire. But In some cases it might be the case (or some of these statements at least). Just imagine a white wall, which is shot in a close up, and all u see is just a wall. It covers hole screen. Now say a wall is white. So we can imagine a situation where we have a whole image containing only of pixels of rgb value 255,255,255. If you would not know beforehand that it is a wall, wouldn’t you say, its just blank white screen? So in some cases more detail is better. And hole today’s post is dedicated only to this situation, where more detail is better.

——————————————————————–

I have remembered this blog article of mine sis I found this cool interview with Ken Perlin himself! One nice idea he has is: if something is too complicated, add another dimention to it. What does that mean? Listen to his interview at fxpodcast here:

link to fxpostcast with Ken Perlin about noise, aesthetics and perlin noise too!

another article here: link

Advertisements

tiling mirroring and rotating. addition to surface mapping, part 2

Next thing we could consider is having our source texture (which now is all rotated and nicely distributed along
our wall or whatever surface) flipped or mirrored in each triangle. here I guess I should add an image to show what I mean.

 

orientation. flipping mirroring and so on...
orientation. flipping mirroring and so on...

So if u see 1 image shows our source texture, second one is nice hexagon, which we created by rotating our source texture.
now third one is more complex. as second one we get its shape and structure by rotating original source texture, but in addition
to that we mirror, flip, and rotate the source texture after it is already in its correct position. meaning, only after we rotate it.
well, again, hard to explain here using words, just have a closer look at third image and try to imagine what actions must be taken in order to get this
result using only source image.
Ok, so lets imagine our new tool is already capable of achieving what we described above. why to stop, lets add some more cool stuff.
next thing would be more textures. in this case we used one source texture and we created triangle out of it, then we rotated and copied it, and we have
all our imaginary surface nicely covered.
now we see that all elements of our surface, meaning original texture is same everywhere. it is rotated, flipped, mirrored, but essentially it
is same texture, and we don’t need lots of time to spot that. fells so unreal right?
so imagine now we have set of original textures. they are same in shape (image in bitmap forms same triangles) presumably also image is same,
but with slightly different coloring, or some of source textures have some cracks, some dirt or might be they are just made out of different glass,
therefore they reflect light in different way, or might be some of them has mirrors where the color is in others.

hexagon. with same..or different triangles wich form it?
hexagon. with same..or different triangles wich form it?

So we need an ability to have different source textures used in our final image generation. it might be random (for forming cracks) or very precise and
deliberate (say for constructing other patterns with different materials, while preserving original image)
Now interface for this is still quite a question. any input?
After we implement such an option to our generator, next logical step would be context awareness. what I mean by that. well we sed that
possibly we want cracks or dirt. and we achieve that by randomly adding some individual tiles which have some dirt applied in source image.
next step would be that our generator would recognise the world. it should assume rain direction (from up towards down along z coordinate with some random directional shifts)
And this is all because we see that dirt does not appear on a walls in totally random places we can distinguish areas where we will have more of it.
that would be where wall reaches ground, for one. also all sorts of dirty water forms nice patterns beneath windows. And so on. so I will discuss
something very similar in next post. (can’t link to it before I actually wrote next post, can I :) )

more coming in part 3, very soon :)

tiling mirroring and rotating. addition to surface mapping, part 1

Oh, i have a blog? seems I forgot it for a while :)  So some ideas on textures.

We use different textures for creating all kinds of materials for our 3D models.
In some cases we use tiling and mirroring for different ways to apply textures on existing 3D objects with uv coordinates.
But in some cases we use textures in architectural situations where we have, say, couple of tiles to cover whole wall. while having a nice texture of say one tile by tilling and mirroring we can,
make it cover whole wall.  To achieve some more variable results we use brick procedural map generator (in 3D max) which basically helps us to put our
tile image in more variable fashion.
But if you ever looked at islamic art and architectural tradition, you will see that some parts of ornaments and tilling can blow your mind with its complexity.

Here I add some articles, which are very interesting regarding this topick.

Geometry feat cloaked in medieval Islamic tile,
“Cintamani” and Islamic Tiles,
A Discovery in Architecture: 15th Century Islamic Architecture Presages 20th Century Mathematics,
Q1 Project – Islamic Tiles,
The Art of Mathematics Islamic patterns,
Sometimes you would look at the wall but fail to see contours of single pattern which is repeated.
tower
tower decoration pattern

To some extent same can be said about baroque wallpapers in Europe. And probably in any culture and time period you could find very complicated pattern arrangements.

Vintage Wallpaper
http://www.vintage-wallpaper.com

So while analysing couple of arabic patterns I thought why do i have to spend hours tilling and mirroring and rotating stuff in Photoshop, if it theoretically
could be done directly in material editor.
Many patterns have a basic triangle shape. So if we have correct texture which contains our desired basic pattern element in triangle shape, we could
instead of tilling or mirroring it rotate it. Sins all bitmaps, as far as i know, are rectangle in shape, we would need to find and identify our triangle element wich we
would use for rotation. technically I guess we could develop a type of bitmap which is a triangle in its shape. I guess its resolution would be defined not as
say 640×480 but i don’t know, 1 pixel at top row, 640 at bottom row, 480 pixels height or something like that.
But we will try to work with traditional bitmaps here.  So say we open a texture in our brand new material editor. then we should define a triangle in
one or another way. i guess our material editor should let draw a triangle on top of texture, something like guidelines in Photoshop. We would
make sure these guidelines matches our triangle shape in bitmap as close as possible. next step would be to chuse which corner of triangle is our pivot point,
or in other words where will be its rotation centre.
rotation of images
according to angles of our triangle new material editor should copy and rotate texture in a number of times which is closest to full circle.
(say our pivot point of triangle is 45 degrees, therefore material editor would copy/rotate our original image exactly 8 times, if i am still able to count :) )

So next thing, after we have nice circle with texture which repeats itself not by tiling or mirroring but by rotation, we would need to describe how to make many such
circles to cover our full wall with new pattern.
Here I discovered there are 3 types of triangles. perfect ones, good ones and bad ones.
perfect triangle is the one wich has 60 degrees angle in each corner (picture bee hive)
good one is when the degree of its pivotal angle is such number that after dividing 360 from that number u get something like: 1,2,3,4,5 .. 25…5356544444 – a whole number,
and not 5.22321445524… and this is also a description of bad triangle. what i mean is that the number to form a full circle should be always a whole number.

hexagon is formed out of 6 tryangles which have 60 degrees corners
hexagon is formed out of 6 tryangles

anyways. so a triangle with 60 degrees corners can cover any surface. all other “good”triangles also cover whole surface, but with some gaps between themselves.

good and bad triangles
good and bad triangles

this is also ok. but we should have an option to export this “gap”to a bitmap file, so user could draw what he or she wants there in Photoshop, and import
it back to our map generator. so basically if we use any other than 60 degree triangle, we need two textures, not one, to form our surface.

more, coming soon.

more about booleans

I recently had an idea for a small animation.
I was thinking to use some moving objects, which would generate “blob mesh”
but all of it should be contained in one form or shape. I know its hard to understand what I wanted to do, but that does not mater, while
here i am concerned only with technology, or rather a way to do it.
So i was thinking to use boolean thingy to “contain” my object. or rather to cut parts of it which go out of my “container object”.
And I noticed that it seems to be impossible.
my plan was to use animated object to generate a blob mesh.
and all of it should have a very specific shape, which would have been rather impossible to make, but very easy to cut using boolean.
But it seems boolean is not existing as a modifier, only as a separate object, which I find quite disturbing.
Why can it be as a modifier? Might be the reason is unstable topology of resulting mesh? or its not implemented cos of computing time? i noticed that using booleans with something that has more then 10
vertexes become quite slow :) (well numbers here are somewhat ironic obviously)
so be it, but still I want it functioning. it can have big annoying message “are u crazy” or something… (are u sure u want to proceed and count each boolean operation per frame)  Anyways it could be only calculated each frame separately, almost as a different object.
But now, how can i do it? basically all I can imagine is to create my animation, lets say its 100 frames. and to perform boolean operation on 100 copies of my animated object, and render, or use only one
of these resulting objects per frame. but it would be a madness. any ideas?????

5.2 Prototype Comparison

ok, sorry for such long scilence.

i was away, abrod, home and so on…..

……………………………..

The following figures show some tree trunks generated with Vue6 personal learning edition and trunks generated with Xfrog 3.5 demo version which will be shown in comparison with some models generated with by the automatic tree generator which I propose in this thesis.

standard xfrog tree model

Fig 36. Trees generated in Xfrog

standart vue 6 trees

fig 37. trees in Vue6

tree trunk generator

Fig 38. tree trunks created with trunk generator prototype

————————-

You can visit my web page here

dont like english? u can (try) readig it in lithuanian or anny other language here! alternative, has no lithuanian :(