A procedural texture based in the Perlin Noise function.
type : Integer. The type of the noise. size : Float. The size of the noise. phase : Float. The phase. levels : Float. The levels. low_threshold : Float. The low threshold. high_threshold : Float. The high threshold. color_1 : Color. The first color of the texture. color_2 : Color. The second color of the texture. map1_on : Bool. If True, uses the color_1_tex. map2_on : Bool. If True, uses the color_2_tex.
-- Open SceneEngine libraries
require("gmt_lua")
require("sceng_lua")
-- Create the Bitmap Texture
noise_texture = sceng.NoiseTexture( { size = 2.0, color_1=gmt.Color(1,0,0), color_2=gmt.Color(0,0,1) } )
-- Create the ShaderMaterial
noise_material = sceng.ShaderMaterial( { diffuse_color=gmt.Color(1,1,0), diffuse_texture=noise_texture } )
-- Create the BoxObject
box_object = sceng.SphereObject( { subdivs_axis=32, subdivs_height=32, radius=20.0, material=noise_material } )
rp = sceng.RenderParameters()
rp.output_file = "image.tga"
rp.width = 512
rp.height = 512
rp.samples = 2
-- Render the scene
sceng.Render( rp )