Fandom

Urho3D Wiki

Creating Seamless Procedural Textures with Blender

69pages on
this wiki
Add New Page
Comments0 Share

This article shows how to use a 4 dimensional noise in Blender to create seamless textures. This works by simulating a Clifford_torus and is inspired by these articles:

This is done with the Cycles renderer, the node editor and the Open Shading Language (OSL) feature.

Note: OSL seems to also have a "periodic" noise function called "pnoise" which should be seamless (I guess), but it doesn't seem to be working at all in Blender. It is not seamless and the input seems to be quite ignored.

You can download the Blender file here: http://files.gawag.org/Seamless_Procedural_Textures4.blend. After opening the file with Blender you should see this (it's created with Blender 1.73a):

Blender seamless texture-0

The node editor in the lower left shows the "procedural_material" material. It uses a "seamless_noise" node group to generate a noise (this group is used twice, see the left two nodes) and then creates a normal and a diffuse map out of it. There are some node frames with short explanations to describe the different sections.

The node group consists of mainly three parts: UV to 4D special shape transformation, a 4D noise generator using OpenShadingLanguage (see text editor in the top left) and a RGB to grey converted as the noise is colored at first (which could be also useful to generate material). Node groups can be entered using tab.

There are two output nodes on the right side, the upper one is for the normal map and the lower one for the diffuse map. Currently the upper one is the active one (simply click on the one to activate) and therefore the 3D window on the right shows the diffuse map on the 4x4 field of planes. The view is automatically updated when something in the node editor is changed.

Press F12 to render the texture, it can be saved from there. There is an orthogonal camera above a single plane that is capturing the whole seamless texture.

Examples for in Blender generated diffuse and normal map with this method Edit

Urho Blender seamless procedural material
This material in Urho3D. Diffuse and normal map:

Urho material file:

<material>
<technique name="Techniques/DiffNormal.xml"/>
<texture name="Textures/blender_diff.png" unit="diffuse"/>
<texture name="Textures/blender_norm.png" unit="normal"/>
<parameter name="MatDiffColor" value="1.0 1.0 1.0 1"/>
<parameter name="MatSpecColor" value="2.5 2.5 2.5 30"/>
</material>

Bricks Edit

Urho Blender seamless procedural material bricks

This material in Urho3D. Diffuse, normal and specular map:

Blender seamless texture bricks

This material is made similar to the brick material made with NeoTextureEdit to see if Blender can be a full alternative: It's quite close, but there is no blur.

The Blender file can be got here: http://files.gawag.org/Seamless_Procedural_Textures_tiles3.blend

The noise node group has been modified to also export the colored noise which is used to distort the generated brick pattern. A brick pattern shader has been written to get a brick pattern with softer edges as Blender's own brick pattern has.

Urho material file:

<material>
<technique name="Techniques/DiffNormalSpec.xml"/>
<texture name="Textures/blender_bricks_diff.jpg" unit="diffuse"/>
<texture name="Textures/blender_bricks_norm.jpg" unit="normal"/> <texture name="Textures/blender_bricks_spec.jpg" unit="specular"/>
<parameter name="MatDiffColor" value="1.0 1.0 1.0 1"/>
<parameter name="MatSpecColor" value="2.5 2.5 2.5 30"/>
</material>

Bricks as a "Quad Texture" Edit

Urho quad texture

This Blender project is similar to the one before. But the different textures are now in one big image (this makes creating the textures in Blender much more convenient):

Blender bricks quad

Diffuse, normal, specular and height map. The height map can be used for parallax mapping or for height mapping. This quad material requires a special shader, see Quad Texture and Terrain Shader with normal, specular and height mapping.

The Blender file can be got here: http://files.gawag.org/Seamless_Procedural_Textures_tiles_quad3.blend

Note: Using such a texture may result in sampling issues resulting in black stripes like these:

Urho quad stripes

To avoid this you can use a custom shader and a texture like this:

Blender bricks quad-0

See also Quad Texture and Terrain Shader with normal, specular and height mapping for more explanations.

Here are three Blender files which create such images:

The created images are the three on the right side of this image:

Urho Terrain Quad Images

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.