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 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

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.


I used to love this, and now its gone. Does 3Dmax evolve or does it degrade? Planet Procedural Map.

Ok, this line was just for fun, but.. There used to be such cool procedural map called planet. Ok it had its limitations. I would have liked to be able to add complicated maps inside each color slot of planet procedural map. But still, it was very good map. To me it was as important as noise and smoke.

noise & smoke procedurals
noise & smoke procedurals

I used to use three of them to achieve very nice random organic shaders. Ofcourse it was written to simulate planet surface, but that’s, to me at least, is only one way to use it. I used it in any situation..  But now I have 3D max 2010 and I see no Planet!!??

max 2010 vs max 9, where is planet procedural map?
max 2010 vs max 9, where is planet procedural map?

What happened, am I blind? Whats so good about it? I will add some pictures here:

planet functions
planet functions

Ok. there must be a reason why its gone. Might be its old code, somehow not compatible with some other newer elements.. So why not to rewrite it?

But if someone decides to do so, lets add some more functions to it.

In original Planet we have function called Iceland factor. It was probably the reason I used planet.

But one can increase or decrease island factor to whole generated procedural . To all its elements.

Why not to separate this effect, so we could apply it to separate elements of planet map, called colors. Now here its a bit hard to explain. Pls look at previous image and next ones.

island factor
island factor

Or, even cooler, might be we could add a map for each color slot, as how and where island factor should be high or low. What I mean is, if we change value per color slot, it would affect whole contour of that color slot, what if we could add noise or smoke material there… (i should update last pictures adding map selection button to each noise factor, i guess…  it simply would work as either value (0-1) or as a map.)

We also have blend water and land switcher. As far as I understand if it’s on, max generates gradient transitions between colors. Again, why not to have this option separately for each element, or color. And here is my proposal for Planet Pro :)

planet pro
planet pro

Ok, continent size and water size hardly make sense, but, common, that’s just an idea, not a finished procedural.  What you think of it? Could we have water regions and land regions like well… like a groups of colors? so we could apply some stuff to a bigger regions compared to one color?

like this might be:

planet procedural map pro 2
planet procedural map pro 2

Here is a text from 3d max 9 help file, describing planet material.

Here they say it’s not good for bump maps, but actually I loved it for rusty, heavily corroded surfaces.

Planet Map

Planet map used to create another world
Planet is a 3D map that uses fractal math to simulate the colors on the surfaces of a planet. You can control the size of continents, percent of ocean coverage, and so on. This map is meant to be used as a diffuse map. It does not work well as a bump map. 
Tip: The Material Editor's sample slot doesn't show the planet effect very clearly. To help get the effect you want, double-click the sample slot to get a larger sample slot, or assign the map to geometry and render the scene. Another way to preview the planet map is to use the Material Editor Options dialog to set the 3D Map Sample Scale to equal a main dimension of the object you are applying the map to. For example, if you want to use the planet map on a sphere with a radius of 20, change the map scale from 100 (the default) to 20. 


Continent Size—Sets the size of the fractal noise pattern used to generate the continents. Can range from 0 to 100. The higher the value, the larger the continents. Default=40. 
Island Factor—Sets the size of the fractal noise pattern used to generate islands and mountains. Can range from 0 to 100. At 0, the geography is very low. Higher settings create a more rugged landscape. Default=0.5. 
Ocean %—Sets the percentage of the planet's surface that is covered by water. Default=60.0. 
Random Seed—Sets the seed for pseudo-random generation of the pattern. Changing this number can completely change the pattern, even if other settings remain the same. On the other hand, a different Planet map with the same settings including the same Random Seed will appear the same. 
Water Colors group 
The colors in these three swatches are applied to the water areas of the planet surface. 
Water colors—Click a swatch to display the Color Selector and change the color. Color #1 is the "center" area of the water mass, Color #2 surrounds Color #1, and Color #3 surrounds Color #2, meeting the land. 
Land Colors group 
The colors in these five swatches are applied to the land areas of the planet surface. Their arrangement continues that of the water colors. 
Land colors—Click a swatch to display the Color Selector and change the color. Color #4 is the shoreline of the land, meeting the water; Color #5 comes next, working toward the center of the land mass. Color # 8 is at the center of the land mass. 
Blend Water/Land—When on, the boundary between water and land is blended, giving a hazy appearance. When off, the boundary between water and land is sharp. 

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?????

1.3 Various Factors Which Influencing a Tree’s Appearance

There are various factors which influence the look of trees. This might include weather conditions such as sudden cold or lightning. Various diseases can change the way a tree looks in many ways. Insects behaviors also are a reason tree’s visual characteristics change. What follows are some important factors for regarding a tree’s appearance.

If the temperature rapidly changes, the tree bark and wood can crack. The cracks might appear in a place where there is already some type of internal tree defect. When the temperatures change very fast, different layers of wood contract and expand at different speeds. This difference makes wood crack. Usually, in the summer cracks heal themselves by growing a new layer of wood, but a crack usually reappears subsequently in winter. This leads to the formation of so called “frost ribs” or “seams”.

Often such cracks appear close to the ground, and provide an opportunity for disease and insect penetration, which later results in the tree rotting (Seifert and Woeste 2004). A surface crack called “Winter Sunscald” appears when the sun heats the tree bark, and at night time when the temperature dramatically changes. Such wounds kill the inner layers of the bark. The thinner the bark, the less the winter sunscald affects the tree (Anonymous. 2006).

crack in trunk

Fig 8. A frost crack injury on a Cherry Bark Oak. Image taken from:

John Seifert, and Keith Woeste. 2004 Environmental and Management Injury in Hardwood Tree Plantations. Planting and Care of Fine Hardwood Seedlings

Lightning strikes do not necessarily kill a tree, but usually the damage is considerable. The damage could be in the form of burn marks or cracks in the trunk and exploded bark. Usually such trees are removed, since most of the defects mentioned above lead to the slow decay and death of the tree (Seifert and Woeste. 2004).

Black Knot “Apiosporina morbosa” is a disease which is mostly found on plum and cherry trees, which can be wild or cultivated. The disease makes black knots with an irregular shape in the wood tissue. The sizes vary from 1.3 to 30 centimeters. Black Knot is not found in Europe, but it is still common in parts of North America, particularly Northwest parts (Wek and Draper 2006).

Black knot is caused by the fungus “Apiosporina morbosa”. From the start of a wood infection, it usually takes two years to fully develop. The infected branch will most likely be killed, while a knot on the main stem most likely will not kill a tree (Wek and Draper 2006).


Fig 9,10.Typical thick black swellings resulted from black knot Pictures taken from:

Becky Wek and Martin Draper. 2006. Black Knot of Stone fruits. South Dakota State University, South Dakota counties, and U.S. Department of Agriculture cooperating.

You can visit my web page here

and see some “manually” modeled trees here

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

4.4.2 Hole Determination Based Upon Overall Tree Structure

4.4.2 Hole Determination Based Upon Overall Tree Structure

In this method a more advanced hole generator approach is used whereby holes are created at the intersection of big branches. The first potential place is the trunk and first branch intersection. The further the branching is from the trunk the less reason for a highly detailed model, therefore there should be a limit, and intersections between small branches should not generate holes and cracks. Another good position for possible holes could be the beginning of the roots whereby a hole is determined in an area where most of the vertices angles are low also in places where the roots meet the trunk’s surface.

Now that I have described the tools and two possible methods for hole detection I will provide the necessary steps for this process. The proposed process of hole generation is based on 3d studio max 9 work flow and tools, but could be easily implemented in any other 3d modeling application or created as a stand alone solution. For the sake of simplicity random vertices on a polygonal plane will be used, instead of vertices with low angular levels in tree trunk model.

The first step in hole generation is to select a candidate vertices group, which should form a hole. After the selection is done a chamfer tool is applied. The value which describes the distances where new vertices are created, could be half of an average edge length of selected vertices’. The next step would be to connect newly created vertices via the chamfer tool. The connection tool creates new edges between newly created vertices. Edge selection is converted to a polygon selection. See figure 33 where it describes the fourth step.

max hole

Fig 33. Proposals visualization.

Fig 33.first four steps in hole creation. The red dots represent selected vertices, red lines selected edges, and red shaded area represent selected polygons.

As Figure 33 shows the resulting polygon selection is not accurate. This is due to the fact that the edge selection conversion to a polygonal selection includes all neighboring

polygons. Polygonal selection should be shrunken to get the desired result.

max hole

Fig 34. Proposals visualization.

This is shown in Figure 34. The next step is to erase all selected polygons, and select the remaining edge outline and conduct an edge extrusion. The last step shown in Figure 34 represents a subdivision algorithm applied on a mesh.

The subdivision algorithm not only generates more detailed mesh structure, but also softens the edges of it. The steps I have described are rather easy to perform due to the ability of 3d studio max to remember the last used selection and convert vertices selections to edge or polygon selections. This process should be possible in any 3d modeling software, but it might include a different order of steps, or additional steps required to achieve the same result.

Figures 33 and 34 show steps which are very easily preformed manually. But the steps are also simple enough so that the actions could be automated. To manually create a hole as shown in Figures 33 and 34 it took around 5 minutes. But if a real trunk model was used with high mesh density and many holes to generate, this process could be very long.

My recommendations if implemented would decrease the amount of time involved in current tree generation.


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 :(

4.3 Hole Generation

4.3 Hole Generation

Overview: The Origin of “Holes” in Trees

It is rare to find a perfect tree in real life usually the older the tree the more defects it will have. Holes are a common attribute of trees found in the wild as well as trees planted by humans. Usually the holes are not that big and sometimes trees have much bigger empty parts inside the trunk or in big branches. The water collects there and makes a perfect situation for rotting. Also fungus or other animals make use of such holes, usually making them become bigger and bigger. Holes can appear as a result of humidity and dead leaves, which remain in same place for a long period of time. Holes are usually noticeable in tree “forks” this means where the trunk separates and two or more steams grow. This is evident in the connections of big branches, cracks and other complicated shapes of trunks. Usually the tree does not die just from rotting, but the rotting could destroy water circulation and that could lead to the long death of a tree which could take many years. If the wind tears a branch off or if other animals or insects injure the outer layers of tree, the fungus and other kind of bacteria start to live in these places, and that makes the tree rotten (Tree Holes).

Regarding the 3d generation of a hole it should begin by determining where are possible locations for a hole in a tree stem. Detection of possible locations could be done by determining where the trunk surface is not planar. The reason, is that holes in a trunk appear in positions where a tree is injured, or where the tree’s architecture is week. There are many biological reasons for a hole’s appearance, therefore there could be many solutions. So far I have described what a hole in a tree trunk is and I have also gone into details regarding how a hole appearance can be a result of a very old tree trunk injury. In the next section I present tools used as well as two proposals for an automatic hole generation tool which detects the best position of a hole utilizing two possible methods. The first method detects a possible hole’s position based upon a trees surface and where conditions are suitable for rotting to occur. The second method has more to do with the overall structure of a tree.


some pictures from tiergarten in berlin:

tree holes

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