Showing posts with label labyrinth. Show all posts
Showing posts with label labyrinth. Show all posts

Sunday, August 22, 2010

Infinite Pipes

English    Spanish

Today I'm going to show a set of renders that extends the model of infinite labyrinths.

To represent them it has been slightly modified the algorithm that represents the type of shape that a ray will encounter in a space region.



The operation of this algoritm is very similar to the previously described to generate infinite labyrinths. It's presented now: We began with an object composed of two infinite planes separated by a arbitrary distance, let it be, for example a unit length. When a ray which its origin is outside the space contained between the two planes intersects with any of these two planes, an intersection position is computed. This position is a real vector. It's possible to take the X and Y coordinates (assuming that both planes cover a constant Z value) and covert it into integer coordinates (from now, j and i respectively). If the sum of this integer numbers is an even value one algorithm will be applied, if it's an odd value another algorithm will be applied. This is made in order to avoid adyacent regions share the same algorithm.
The algorithm of the even regions is simple, a LCG type random number generator will use the j and i values in order to generate a boolean value. This boolean value will determinate if a straigt tube is place along X or Y direction. So if we randomly fill even regions with straight tubes that moves along random directions X or Y we got a constraint in order to choose a shape to fill the odd regions. So if the adjacent regions (sharing an edge) of an odd region got straight tubes in the Y direction, the shape of that odd region will be a Y direction tube. If the up and down region got a Y direction tube, and the left got another Y direction and the right a X direction tube, the shape will be a T.

In order to achieve the effect of rusty it has been used a Perlin noise as a mask and then another configuration of Perlin noise for bumpmapping and color. To get the effect of water/ice it have been used a cellular fractal noise generator.

Here we can see the same image without bumpmapping and color:



Another view using a cylindrical camera:



The same with texture and bumpmapping:



Finaly here, we can see another view from a high Z value. The shape reminds quite well a maze:





Monday, September 14, 2009

Spatial Labyrinths

English    Spanish

Today I'm going to show a set of renders that I did some time ago. The general idea is to make a spatial maze.

That is, one that allows movements upwards and downwards as well as forward, backward, right and left. The movements that a player can do are in any spatial axis. In this case, Theseus has to know how to climb well.

One simple is this one:



In this one we see a tridimensional labyrinth bounded by the surface of a cube.

The procedure to accomplish this renders is not complex.
  • We start from a tridimensional shape. Then it's discretized in voxels marking as active the ones that are partially or totally included in the volume defined by the surface of the figure.
  • Now we are going to discard the non active voxels and we work with the ones that intersect or are included inside the volume.
  • We start from a random voxel and we move in a random direction, marking as visited the currant voxel.
  • As we move through the voxels we can find a visited voxel in the chosen direction. In this case we chose another direction.
  • In the case that there are not any available directions we move backwards and we chose another direction.
  • The algorithm ends when all the nodes (voxels) have been visited.
This algorithm allows a unique path from one point of the labyrinth to another. Obviously if we set two poins, one as starting and another one as ending, there will be a unique path between both, and then any other bifurcation that moves away from the path will bring us to a dead end.

Other views of the cube:











It's possible to use other figures as a "mould" of the labyrinth.

Here we can see a sphere:





And with a spherical camera:





The Utah teapot:



and a some renderings of a lying woman: