(Added complex brick material) Tags: Visual edit apiedit |
m (→Bricks) Tags: Visual edit apiedit |
||
Line 16: | Line 16: | ||
=== Examples for in Blender generated diffuse and normal map with this method === |
=== Examples for in Blender generated diffuse and normal map with this method === |
||
− | [[File:Urho Blender seamless procedural material.jpg|none|thumb|400x400px]]This material in Urho3D. Diffuse and normal map: |
+ | [[File:Urho Blender seamless procedural material.jpg|none|thumb|400x400px]]This material in Urho3D. Diffuse and normal map: |
+ | <gallery> |
||
Blender diff.jpg |
Blender diff.jpg |
||
Blender norm.jpg |
Blender norm.jpg |
||
Line 28: | Line 29: | ||
[[File:Urho Blender seamless procedural material bricks.jpg|none|thumb|400x400px]] |
[[File:Urho Blender seamless procedural material bricks.jpg|none|thumb|400x400px]] |
||
This material in Urho3D. Diffuse, normal and specular map: |
This material in Urho3D. Diffuse, normal and specular map: |
||
+ | |||
+ | <gallery> |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | </gallery> |
||
The Blender file can be got here: http://files.gawag.org/Seamless_Procedural_Textures_tiles3.blend |
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. |
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><br> <technique name="Techniques/DiffNormalSpec.xml"/><br> <texture name="Textures/blender_diff.jpg" unit="diffuse"/><br> <texture name="Textures/blender_norm.jpg" unit="normal"/> |
||
⚫ | |||
+ | <texture name="Textures/blender_spec.jpg" unit="specular"/><br> <parameter name="MatDiffColor" value="1.0 1.0 1.0 1"/><br> <parameter name="MatSpecColor" value="2.5 2.5 2.5 30"/><br></material> |
Revision as of 02:19, 5 July 2015
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:
- http://www.gamedev.net/blog/33/entry-2138456-seamless-noise/
- http://opengameart.org/forumtopic/seamlessly-tiled-procedural-texture-generation.
This is done with the Cycles renderer, the node editor and the Open Shading Language (OSL) feature.
You can download the Blender file here: http://files.gawag.org/Seamless_Procedural_Textures3.blend. After opening the file with Blender you should see this (it's created with Blender 1.73a):
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
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
This material in Urho3D. Diffuse, normal and specular map:
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_diff.jpg" unit="diffuse"/>
<texture name="Textures/blender_norm.jpg" unit="normal"/> <texture name="Textures/blender_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>