This tutorial will present you how I setup a 3D Texture with Blender 2.5 Beta. I'm going to texture the base cube of Blender with stones.
I'm using this pay-texture above from my web site as an example. It contains 5 textures images. You can also download any of my free texture for this. Or even create your own with my 30 day trial of my software Photosculpt Textures.
First launch Blender or do CTRL + N for a new session. It creates a base cube with a base gray material.
Before I start with the texture note that for convenience I first switch on the glsl shading (key [N] to open properties in 3D view, submenu Display, Shading switch from Multitexture to GLSL, key [N] to close properties, Viewport Shading Textures)
You'll also want to create a UV map to the cube before applying texture (I propose the following: key [TAB] to open edit mode, key U for UV unwrap, select cube projections, key [TAB] to go back to object mode). Note: You can also create seams and unfold your cube (as I did here) for better results but it's outer scope of this tutorial.
Let's start now with the 3D material setup. Here is the material panel setings I used.
You'll see I haven't made any changes to the Blender default. In some cases you'll want to change the diffuse and specular intensity. The most important changes I made are in the texture panel that follow.
I'm now going to load a texture for 5 channel (diffuse, normal, displacement, ao and specular)
Each time I do the following
- click on an empty chanel slot and rename it
- change type to "Image or movie"
- set maping coordinates to "UV"
- "Open" the image
- Apply the tweaks below
Here are the settings for the Diffuse chanel and the Ambient Occlusion chanel
Here are the settings I used for the normal chanel and the specular chanel
The displacement chanel can be done simply but I do mine in a bit more sophisticated fashion. I'm missing settings with the material displace chanel of blender and the results are sometimes unpredictable at the corners of objects. Furthermore I want to set each object displacement individually not globally as a material. So I switch the displacement texture off entirely in the texture pannel and recreate the displacement effect with a modifier on the object itself. Here is how:
Here is the setting I used onto my base cube.
- I subdivided it seven times in total in simple mode. That's of course a lot of polys at the end and it's a bit overkill but I wanted a high polygon object.
- Then I applied a displace modifier onto the cube (not on the material) with the following settings.
Let's go over the detail of the displace modifier:
- You need to set the displacement map in the "texture" field. Choose normal and UV so it's aligned on the diffuse texture.
- Set the "strength" parameter you need for the depth of the displacement effect
- Set the "midlevel" parameter in order to have either a nice crisp cube corner (high value) or a round corner (low value). That's important as depending on your preference you can choose crisp for photoreal, round for cartoon-like texture.
Using this method I can adapt the displacement to every object of the scene. Objects that are further away don't need much subdividing and displacement can be set accordingly.
Additional trick: I sometimes add a slight ray mirror onto my texture so it can reverb a bit of the color of surrounding objects. I also use the specularity map as a mirror mask for perfect rendering.
Don't hesitate to comment or improve this tutorial.
(Please consider purchasing the 1024x1024 3D stone texture if you want to use it for your projects. Value Eur5.99)