2D Custom Filter : TV Noise

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Tamaya
Posts: 0
Joined: Sat Nov 22, 2008 3:38 pm
Location: Toulouse !

2D Custom Filter : TV Noise

Post by Tamaya »

Hi everybody !

I'm new on Blender, but i work hard to complete my work :wink:
I'm trying to make a 2D noise filter like an old TV, (precisely a filter that show a receiving electronic jamming).

The problem i encounter is that i don't found any piece of code to show me what king of function i must use...

Someone can help me?

Thanks a lot, and sorry for my twisted english :?
Tamaya

Tamaya
Posts: 0
Joined: Sat Nov 22, 2008 3:38 pm
Location: Toulouse !

Post by Tamaya »

I have somes news...

Now i know that 2D Custom Filters are using the GLSL. I found the red bok, learning the GL Shader Language: but he is over 900 pages, so just for making a little filter... i will not learn all the language :?

I've found on the 3d graphic engine Ogre3D a script in GLSL named OldTV (just that i want :D ) but i don't understand anything on it... There is the filter, if someone can help me to understand ot, and to recode it as i want:

Code: Select all

fragment_program Ogre/Compositor/OldTV_FP cg
{
	source OldTV.cg
	entry_point OldTV_ps
	profiles ps_2_0 arbfp1
}

material Ogre/Compositor/OldTV
{
	technique
	{

		pass
		{
			depth_check off

			vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp
			{
			}

			fragment_program_ref Ogre/Compositor/OldTV_FP
			{
                param_named_auto time_0_X time_0_x 120
                param_named_auto sin_time_0_X sintime_0_x 120

                param_named distortionFreq float 2.7
                param_named distortionScale float 2.5
                param_named distortionRoll float 0.93
                param_named interference float 0.5
                param_named frameLimit float 0.40
                param_named frameShape float 0.26
                param_named frameSharpness float 6.0
			}

			texture_unit 0
			{
                tex_coord_set 0
				tex_address_mode clamp
				filtering linear linear linear
			}

			texture_unit 1
			{
				texture Random3D.dds 3d
                tex_coord_set 1
				tex_address_mode wrap
				filtering linear linear linear
			}

			texture_unit 2
			{
				texture NoiseVolume.dds 3d
                tex_coord_set 2
				tex_address_mode wrap
				filtering linear linear linear
			}
		}
	}
}
Tamaya

Post Reply