wiki:material_database

Version 33 (modified by necro, 6 years ago) (diff)

--

Material Database

Use of values

All parameters have to be in range of [0 .. 255]. Instead of using integer values one can also use the decimal representation of them. A value of 163 could also be written as 163/255 = 0.639. Care of the floating point when using decimal values. The value 1 will be detected as 1/255 = 0.0039 until the value of 1.0 will be detected as 255 / 255 = 1.0.

Reference Materials

These references were created with a simple sphere including a diffuse and normal map. This object can be downloaded on the bottom under [1]. For installing just double left click on the .otx file. Outerra will create all needed files for you.

Standard

"diffuse" : "163,163,163,255", 
"Ax" : "7", 
"Ay" : "7", 
"m" : "127", 

https://lh3.googleusercontent.com/-TX7Nx9-pzlA/Uk1oxSwe73I/AAAAAAAADFw/fxzndENglz8/s310-no/mat_std.gif

Glass

"diffuse" : "0.15,0.15,0.15,0.99", 
"Ax" : "0.108", 
"Ay" : "7", 
"m" : "0.02", 

https://lh5.googleusercontent.com/-kaKZyurI7C8/Uk1qXbnQlvI/AAAAAAAADGI/LnZq4Jd-RZw/s318-no/mat_glass.gif

Coefficients

Ax-Coefficient

The Ax coefficient influences the reflectance of the material. Small values behave like concrete materials and bigger values like metalic materials. The following examples show the effect of several Ax values. All examples were created with "diffuse" : "1.0, 1.0, 1.0, 1.0" and "m" : "127".

Ax = 0.0Ax = 0.25Ax = 0.5Ax = 0.75Ax = 1.0
https://lh4.googleusercontent.com/-TeFdZJMyhrQ/Uk2P0oTjkCI/AAAAAAAADGw/F8xb1xv4gFI/s315-no/ax00.gifhttps://lh6.googleusercontent.com/-Hy2_ndRnecY/Uk2P0srL6eI/AAAAAAAADGs/bbA8YVK4CKw/s322-no/ax025.gifhttps://lh4.googleusercontent.com/-duN9Fwq_7IQ/Uk2P0SYGU-I/AAAAAAAADG0/-CladUmmCF0/s322-no/ax05.gifhttps://lh4.googleusercontent.com/-ZEIf20n2VzI/Uk2P185H8iI/AAAAAAAADG8/PGP8cO-Xz5I/s316-no/ax075.gifhttps://lh3.googleusercontent.com/-bsMuq48qVwQ/Uk2P2nnMVHI/AAAAAAAADHE/H_8aWYX3jxo/s302-no/ax10.gif

m-Coefficient

The m coefficient influences the mirror reflectance of the material. The bigger the value, the more matte the material will be. The smaller the value, the more mirroring the material will be. The following examples show the effect of several m values. All examples were created with "diffuse" : "1.0, 1.0, 1.0, 1.0" and "Ax" : "7".

m = 0.0m = 0.01m = 0.25m = 0.5m = 0.75m = 1.0
https://lh4.googleusercontent.com/-d9imaUD02Ys/Uk2WhGCEYWI/AAAAAAAADHc/Jsftzf_oeb8/s312-no/m00.gifhttps://lh3.googleusercontent.com/-LbcVpR9x-Rg/Uk2XCfe16hI/AAAAAAAADHw/7iaI2R5DGeQ/s294-no/m001.gifhttps://lh4.googleusercontent.com/-9nO-PRGVNYU/Uk2XOPRLZhI/AAAAAAAADIE/XIWYZLDZYqE/s292-no/m025.gifhttps://lh5.googleusercontent.com/-sByQyTJkj0w/Uk2XTSOhryI/AAAAAAAADIY/gbSKOTonMFA/s287-no/m05.gifhttps://lh4.googleusercontent.com/-QgFNCTF9xb0/Uk2XYk4_dlI/AAAAAAAADIs/e6jmR4OM90M/s278-no/m075.gifhttps://lh4.googleusercontent.com/-zQDw60py0Rc/Uk2XdrUdH2I/AAAAAAAADJA/l8dHnZDVun4/s281-no/m10.gif

Texture Channels

Outerra supports several texture channels to define materials. For setting them up the used mesh needs to be UV unwrapped. This means to unproject the 3D mesh on 2D plane. This can be done automatically or manually by almost each 3D-software.

tex_diffuse

The diffuse texture contains the basic colors of a mesh. So its one of the most important textures a mesh can use. The following example shows the sample sphere rendered with a matte material ("Ax" : 0.0 and "m" = 1.0).

tex_diffuseFormatDiffuse texture disabledDiffuse texture enabled
https://lh5.googleusercontent.com/-ROtFA3OBVwM/UlFc0wKhfeI/AAAAAAAADNg/wyK9Vtc1FPY/s180-no/panel2diffweb.pngBC1/DXT1https://lh5.googleusercontent.com/-hUCORLiBwyA/UlFg21aOBuI/AAAAAAAADN8/nBIWzVyQ8WU/s257-no/tex_dif2.gifhttps://lh5.googleusercontent.com/-Jk7U3Jt_cOc/UlFg29kJc6I/AAAAAAAADOA/g5wLeFXe2cI/s236-no/tex_dif1.gif

tex_normal

The normal texture is the most important texture a mesh can contain. It is possible to create the illusion of incredible amount of details on the mesh. This texture stores information about the normals per pixel. Then the shader computes the angle between each normal and the light vector and shades the color by multiplying it with this factor. This creates the illusion of detail although the surface is actually flat. The following example shows the sample sphere rendered with a matte material ("Ax" : 0.0 and "m" = 1.0).

tex_normalFormatNormal texture disabledNormal texture enabledNormal + Diffuse texture enabled
https://lh5.googleusercontent.com/-C5gscKEDdFE/UlFk7HBwyWI/AAAAAAAADOc/GDGV1dNewMQ/s180-no/panel2nrmweb.pngBC5/ATI2https://lh5.googleusercontent.com/-hUCORLiBwyA/UlFg21aOBuI/AAAAAAAADN8/nBIWzVyQ8WU/s257-no/tex_dif2.gifhttps://lh3.googleusercontent.com/-Ed7XSAZSgmk/UlFnGgwyh3I/AAAAAAAADO0/UbZX0OM2ij0/s180-no/tex_nrm1.jpghttps://lh5.googleusercontent.com/-3kHTj7j_4Ls/UlFnLFDsSZI/AAAAAAAADO8/QYsX5OvmEhk/s236-no/tex_nrm1.gifhttps://lh3.googleusercontent.com/-Ljhku951cJ0/UlFpQDpVkbI/AAAAAAAADPY/AhOo53gdc0o/w666-h667-no/tex_nrm2.jpghttps://lh5.googleusercontent.com/-PaqzSJIlesk/UlFpNsVnS7I/AAAAAAAADPQ/tYnBZm5CSnM/s190-no/tex_nrm2.gif

tex_env

The env texture controls the reflectance. The darker the input, the more reflective the material will be. So this texture could also be called roughness-map and can be used for simulating rust on metalic surfaces. The following examples were using a diffuse channel of "diffuse" : "1.0,1.0,1.0,1.0" and "m" : 1.0. The m value multiplies the strength of the env texture.

tex_envFormatAx = 0.0Ax = 0.5Ax = 1.0
https://lh6.googleusercontent.com/-9DGrnVJhiSM/UlFVxCvTI3I/AAAAAAAADMg/cYxXyAVbwJ0/s832-no/env.pngBC4/ATI1https://lh5.googleusercontent.com/-G_Bb2vLayAo/UlFVJwjJYLI/AAAAAAAADMY/xMu-REgIipk/s331-no/env00.gifhttps://lh5.googleusercontent.com/-v6tC9Q9F3BQ/UlFVJ3UKhXI/AAAAAAAADMU/k90txDucQPE/s248-no/env05.gifhttps://lh6.googleusercontent.com/-jGPvjnunYUU/UlFYYEmi4BI/AAAAAAAADM4/wkl5W2iXTe0/s231-no/env10.gif

tex_reflectance

The reflectance texture can be used to control the reflectance of a material. But unlike the env texture brighter values make the material more reflective than darker ones. The following examples were using a diffuse channel of "diffuse" : "1.0,1.0,1.0,1.0" and "Ax" : 1.0. The m value multiplies the strength of the env texture.

tex_reflectanceFormatm = 0.01m = 0.5m = 1.0
https://lh6.googleusercontent.com/-HC6Nrrld4Fo/UlF5rE0TZrI/AAAAAAAADQM/eiXzvCS4v5I/s180-no/refweb.pngBC4/ATI1https://lh4.googleusercontent.com/-yclybq018j8/UlF5q6vCjhI/AAAAAAAADQI/4gi3wIkWcYM/s335-no/tex_ref001.gifhttps://lh3.googleusercontent.com/-q0Z73mRoXrg/UlF5qmVth_I/AAAAAAAADQE/lvZ2OvylIig/s255-no/tex_ref05.gifhttps://lh5.googleusercontent.com/-ZdW9o571qgw/UlF5qr4VhWI/AAAAAAAADP8/p6wKquK786E/s220-no/tex_ref10.gif

See material for further information

References