Home arrow Tutorials arrow Materials arrow Displacement Maps – 3D Objects based on 2D maps
Forum Latest Posts
Modelagem e Simulação. O que usar?
Borda 06-09-08 22:24
Trabalho Finalizado - Marcelo Landim (m...
mlandim 06-09-08 04:37
Re:WIP - MOMO (www.yofrankie.org) - por...
Reinicke 05-09-08 18:01
Blender Pro'2008 - Chamada para Trabalhos
ganon 05-09-08 00:51
Re:Prorrogação Contest
gentiL 04-09-08 15:19
Plugins Blender - Second Life
Piu 04-09-08 09:08
Trabalho Finalizado - Momo - mangojambo
mangojambo 01-09-08 01:00
Trabalho Finalizado - Gentil de Abreu Neto
gentiL 31-08-08 13:20

More...
Displacement Maps – 3D Objects based on 2D maps Print E-mail
Written by Madison Paz   
Monday, 31 December 2007
thumb_disp_mapTo use displacement maps is a known technique in computer graphics to modify a 3D grid using a bitmap image.
Discover more about this effect and how is possible do this in Blender.

Introduction

Displacement mapping is an alternative computer graphic technique that contrasts with bumb mapping, normal mapping and parallax mapping.

It´s used a procedural texture or a bitmap to obtain a displacement effect over the object vertices, whose will have its vertices displaced following the image colors.

The vertices will be displaced along the object normals following the map colors. Each vertice has its position modified by the image, being possible a high level of detailment, limited only by grid resolution.

 

Displacement map: wikipedia
 

Blender has this resource, and it can be used in several ways. In a general view, you can do this in 3 steps:

1) Create a 3D object. The result depends on grid resolution;
 
Displacement map grid

2) Put a texture on the object; 
Displacement map image

3) Set the texture influence over the object.
 
Displacement map sample finished
As you could view, the black piece of the image are the valleys, and the white piece of the image are the tops. This means that: darker = lower and lighter = higher. 

There are several uses of this resource, as create metal cuts, show landscapes, footprints, and more. You can download a picture from the net, convert it to gray scale and use it.

The three steps

Create a 3D object

A little time ago, displacement maps were used only in planes. It was easier to see the effect.

Nowadays, you can use displacement maps in any 3d object.

A common example is a fake animal or human skin using procedural textures.

In our example, we will use a grid.

The final result is proportional to the vertices number. 

Start Blender, press X and ENTER to erase default cube.

Press SPACE and choose Add > Mesh > Grid:

disp_map_5
 
Set grid sizes to 32 x 32 and click OK.
It´s important to say that if you don´t have a powerful machine, choose a lower resolution, like 16x16:
disp_map_6

 

Press TAB to choose Object Mode, press S and move the mouse until the grid gets a size to fit camera´s view:

 

Displacement Map 3d model

 

 

Now we are ready to set the texture (the displacement map).

Put the texture on the object

There are several ways to do this.

I show here how to do this using UV mapping, because it´s easier to set texture position.

Any other technique would be used here, UV mapping is used here because it is faster.

We need a texture before use it. You can use GIMP or another application to create an image. Do something like this:

Displacement map bitmap model

 

I used the GIMP´s Gaussian Blur effect.

Return to Blender and choose UV Face Select mode, so we can add the texture.

 

UV Face Select picture

 

Press A once or twice until the faces get purple.

 

Blender grid displacement map selected 

 

Change the window type to UV/Image editor, we will use this screen to load the image:

 

UV / Image editor blender menu item
 

 

Press E, and ENTER to organize correctly the vertices (Unwrap). Choose Image > Open and locate your image. The result is this:

 

Displacement map blender grid

 

ON the materials menu, click Add New, and after click on textures menu , Add New and choose the loaded image you chosen in Image Editor.

 

Adding a texture to the displacement map grid

 

Set the image influence

Blender has a modifier called Displacement, to set the displacement map influence.

First add a displacement modifier and set the texture name and the configuration as bellow. See that tha texture name is the same on two menus:
New displacement map texture

 

Add also a  subsurf modifier and set to Level 3:

 

Blender subsurf modifier

 

After all this work, you can see the final effect. To get a better result, increase the number in  Render Levels or subdivide the grid.

It´s also possible change the  strength value in Displacement modifier

Blender displacement modifier

 

To subdivide the Grid, press TAB and choose Edit Mode.

Press W and choose Subdivide, press ENTER.

 Now, rotate the object to get a good view from camera. The final result is this:

Displacement final image 

If you don´t use the gauss effect, you get a better resolution:

 

Final fisplacement map sample 

 

References

 

[1] http://www.procedural.com.br/forum/index.php?topic=9.msg13

[2] http://blenderartists.org/forum/archive/index.php/t-98551.html

[3] http://blenderartists.org/forum/showthread.php?t=18965 

[4] http://www.zbrushcentral.com/zbc/printthread.php?t=14438 

[5] http://www.blender.com.br/index.php?option=com_fireboard&Itemid=10&func=view&id=2662&catid=2 

[6] http://blenderartists.org/forum/showthread.php?t=97994 

[7] http://feeblemind.tuxfamily.org/dotclear/index.php/2007/09/10/96-normal-maps-for-blender 

[8] http://www.blendernation.com/2006/05/16/displacement-painting-script/ 

[9] http://bentha.net/sculpted-tuto/Blender-export-template-tut.html 

[10] http://members.fortunecity.de/pytablet/ 

[11] http://www.telusplanet.net/public/kugyelka/blender/tutorials/texmesh/texmesh.htm

[12] http://www.photoshopsupport.com/elements/tutorials/displace-filter/displacement-map.html 

[13] http://www.linhadecodigo.com.br/Artigo.aspx?id=1259&pag=2 

[14] http://imasters.uol.com.br/artigo/3008/photoshop/aco_escovado_com_displacement_map/ 

[15] http://www.outside-hollywood.com/2006/01/displacement-maps-in-3d-animation/ 

[16] http://forum.daz3d.com/viewtopic.php?t=69308 

[17] http://www.weim-art.com/Tut/TextureTut2.htm 

[18] http://www.weim-art.com/Tut/TextureTut.htm

 

Comments
Add NewSearchRSS
Only registered users can write comments!
 
Next >
Login





Lost Password?
No account yet? Register