Commit 01b1861d authored by IOhannes m zmölnig's avatar IOhannes m zmölnig

dos2unix and removed trailing whitespace

parent b71aa458
Pipeline #1620 canceled with stages
GEM - Graphics Environment for Multimedia
Copyright © 1997-2000 Mark Danks
Copyright © Günter Geiger
Copyright © 2001-2019 IOhannes m zmölnig,
Copyright © 2003-2007 James Tittle II,
Copyright © 2003-2008 Chris Clepper
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
In the official GEM distribution, the GNU General Public License is
in the file GnuGPL.LICENSE
---------------------------------------------------------
ACKNOWLEDGMENTS
---------------------------------------------------------
Not all of the source code provided here has entirely been written by me.
I would like to point at the great openGL-tutorials at http://nehe.gamedev.net
Since these are tutorials, there is no copyright notice here.
Some of the pix_fx code is borrowed from effecTV by Kentarou Fukuchi et al.
at http://effectv.sourceforge.net released under the Gnu GPL, some other pix_fx
code has been ported from Pete Warden's fine collection of FreeFrame plugins at
http://petewarden.com released under the Gnu GPL.
---------------------------------------------------------
OTHER COPYRIGHT NOTICES
---------------------------------------------------------
particle:
Author: David McAllister
davemc[AT]cs.unc.edu
http://www.cs.unc.edu/~davemc/Particle/
Copyright (c) 1998 David K. McAllister
License: GNU Lesser General Public License, version 2.1 or later
GEM - Graphics Environment for Multimedia
Copyright © 1997-2000 Mark Danks
Copyright © Günter Geiger
Copyright © 2001-2019 IOhannes m zmölnig,
Copyright © 2003-2007 James Tittle II,
Copyright © 2003-2008 Chris Clepper
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
In the official GEM distribution, the GNU General Public License is
in the file GnuGPL.LICENSE
---------------------------------------------------------
ACKNOWLEDGMENTS
---------------------------------------------------------
Not all of the source code provided here has entirely been written by me.
I would like to point at the great openGL-tutorials at http://nehe.gamedev.net
Since these are tutorials, there is no copyright notice here.
Some of the pix_fx code is borrowed from effecTV by Kentarou Fukuchi et al.
at http://effectv.sourceforge.net released under the Gnu GPL, some other pix_fx
code has been ported from Pete Warden's fine collection of FreeFrame plugins at
http://petewarden.com released under the Gnu GPL.
---------------------------------------------------------
OTHER COPYRIGHT NOTICES
---------------------------------------------------------
particle:
Author: David McAllister
davemc[AT]cs.unc.edu
http://www.cs.unc.edu/~davemc/Particle/
Copyright (c) 1998 David K. McAllister
License: GNU Lesser General Public License, version 2.1 or later
This diff is collapsed.
#N canvas 172 190 600 500 10;
#X text 124 68 GEM object;
#X text 138 23 rgb2hsv;
#X text 89 388 convert between RGB colorspace and HSV colorspace;
#X text 91 412 RGB is red \, green \, blue;
#X text 91 434 HSV is hue \, saturation \, value (luminance);
#X obj 123 220 rgb2hsv;
#X msg 122 156 1 0 0;
#X msg 357 160 0 1 1;
#X obj 123 299 print hsv;
#X obj 357 303 print rgb;
#X obj 357 226 hsv2rgb;
#X msg 414 159 0.6 1 0.5;
#X msg 185 155 0 0.2 0.5;
#X text 215 21 hsv2rgb;
#X connect 5 0 8 0;
#X connect 6 0 5 0;
#X connect 7 0 10 0;
#X connect 10 0 9 0;
#X connect 11 0 10 0;
#X connect 12 0 5 0;
#N canvas 172 190 600 500 10;
#X text 124 68 GEM object;
#X text 138 23 rgb2hsv;
#X text 89 388 convert between RGB colorspace and HSV colorspace;
#X text 91 412 RGB is red \, green \, blue;
#X text 91 434 HSV is hue \, saturation \, value (luminance);
#X obj 123 220 rgb2hsv;
#X msg 122 156 1 0 0;
#X msg 357 160 0 1 1;
#X obj 123 299 print hsv;
#X obj 357 303 print rgb;
#X obj 357 226 hsv2rgb;
#X msg 414 159 0.6 1 0.5;
#X msg 185 155 0 0.2 0.5;
#X text 215 21 hsv2rgb;
#X connect 5 0 8 0;
#X connect 6 0 5 0;
#X connect 7 0 10 0;
#X connect 10 0 9 0;
#X connect 11 0 10 0;
#X connect 12 0 5 0;
This diff is collapsed.
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>Advanced</title>
</head>
<body>
<center>
<h2>
<u>Advanced objects</u></h2></center>
<p><br>Todo:
<p>more than 8 lights
<br>pix_imageInPlace
<br>accumrotate
<br>camera
<br>polygon and curve
<br>text3d
<br>pix_data
<br>linear_path
<br>spline_path
<p><a href="index.html">[return]</a>
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>Advanced</title>
</head>
<body>
<center>
<h2>
<u>Advanced objects</u></h2></center>
<p><br>Todo:
<p>more than 8 lights
<br>pix_imageInPlace
<br>accumrotate
<br>camera
<br>polygon and curve
<br>text3d
<br>pix_data
<br>linear_path
<br>spline_path
<p><a href="index.html">[return]</a>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>Glossary/Index</title>
</head>
<body>
<center>
<h2>
<u>Glossary</u></h2></center>
<a NAME="Alpha"></a>Alpha - The amount of opacity.&nbsp; An alpha equal
to 1.0 means completely opaque.&nbsp; An alpha equal to 0.0 means completely
transparent.
<p><a NAME="Controls"></a>Controls - GEM objects which access the low levels
of GEM, such as window managers.
<p><a NAME="Geos"></a>Geos - GEM objects which have a shape of some kind,
such as a cube.
<p><a NAME="Manips"></a>Manips - GEM objects which manipulate the geos.
<p><a NAME="MarkEx"></a>MarkEx - A collection of objects which help with
data manipulation, especially for usage in GEM.
<p><a NAME="Nongeos"></a>Nongeos - GEM objects which do not have an explicit
shape, yet affect the rendering in some way.
<p><a NAME="OpenGL"></a><a href="http://www.opengl.org">OpenGL</a> - A
graphics API which exists on many different platforms.<br>
Gem can <i>also</i> be used as a wrapper for openGL, allowing to program openGL without having to
compile
<p><a NAME="Particles"></a>Particles - GEM objects which involve the particle
system.
<p><a NAME="Pd"></a><a href="http://pd.iem.at">Pd</a>
- A visual programming language for audio processing.&nbsp; This is the
host application for GEM.
<p><a NAME="Pixes"></a>Pixes - Image processing objects in GEM
<p><a NAME="Texture"></a>Texture mapping - Applying an image to a geometric
object.
<p><a href="index.html">[return]</a>
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>Glossary/Index</title>
</head>
<body>
<center>
<h2>
<u>Glossary</u></h2></center>
<a NAME="Alpha"></a>Alpha - The amount of opacity.&nbsp; An alpha equal
to 1.0 means completely opaque.&nbsp; An alpha equal to 0.0 means completely
transparent.
<p><a NAME="Controls"></a>Controls - GEM objects which access the low levels
of GEM, such as window managers.
<p><a NAME="Geos"></a>Geos - GEM objects which have a shape of some kind,
such as a cube.
<p><a NAME="Manips"></a>Manips - GEM objects which manipulate the geos.
<p><a NAME="MarkEx"></a>MarkEx - A collection of objects which help with
data manipulation, especially for usage in GEM.
<p><a NAME="Nongeos"></a>Nongeos - GEM objects which do not have an explicit
shape, yet affect the rendering in some way.
<p><a NAME="OpenGL"></a><a href="http://www.opengl.org">OpenGL</a> - A
graphics API which exists on many different platforms.<br>
Gem can <i>also</i> be used as a wrapper for openGL, allowing to program openGL without having to
compile
<p><a NAME="Particles"></a>Particles - GEM objects which involve the particle
system.
<p><a NAME="Pd"></a><a href="http://pd.iem.at">Pd</a>
- A visual programming language for audio processing.&nbsp; This is the
host application for GEM.
<p><a NAME="Pixes"></a>Pixes - Image processing objects in GEM
<p><a NAME="Texture"></a>Texture mapping - Applying an image to a geometric
object.
<p><a href="index.html">[return]</a>
<br>&nbsp;
</body>
</html>
This diff is collapsed.
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>Input devices</title>
</head>
<body>
<center>
<h2>
<u>Input devices</u></h2></center>
<p><br>Nothing here yet
<p><a href="index.html">[return]</a>
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>Input devices</title>
</head>
<body>
<center>
<h2>
<u>Input devices</u></h2></center>
<p><br>Nothing here yet
<p><a href="index.html">[return]</a>
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>GEM - Introduction</title>
</head>
<body>
<center>
<h2>
<u>Introduction</u></h2></center>
GEM is the Graphics Environment for Multimedia. It was originally written by
<a href="http://www.danks.org/mark">Mark Danks</a> to generate real-time computer graphics,
especially for audio-visual compositions.
Because GEM is a visual programming environment, users do not need any experience
in traditional computer languages.
<p>GEM is a collection of externals which allow the user to create
<a href="http://www.opengl.org">OpenGL</a>
graphics within <a href="http://www.crca.ucsd.edu/~msp/software.html">Pd</a>,
a program for real-time audio processing by <a href="http://www.crca.ucsd.edu/~msp">Miller
Puckette</a> (of <a href="http://www.ircam.fr">Max</a> fame).
<p>There are many different shapes and objects, including polygonal graphics,
lighting, texture mapping, image processing, and camera motion. All of
this is possible in real-time without any previous programming experience.
Because GEM is an add-on library for <a href="http://www.crca.ucsd.edu/~msp/software.html">Pd</a>,
users can combine audio and graphics, controlling one medium from another.
<p>GEM is supported in part by a grant from the <a href="http://www.intel.com">Intel
Research Council</a> for the <a href="http://www.gvm.com">The Global Visual
Music</a> project of <a href="http://felix.usc.edu/vibeke.html">Vibeke
Sorensen</a>, <a href="http://www.crca.ucsd.edu/~msp">Miller Puckette</a>
and <a href="http://www.earunit.org/rand.htm">Rand Steiger</a>.
<p>An important thing to remember is that GEM is NOT an application.&nbsp;
It is a library that Pd loads at run-time.&nbsp; Make sure that you see
the section on <a href="GemWPd.html">using GEM with Pd</a>.&nbsp; This
manual assumes that you have Pd working correctly and can load up patches
already.&nbsp; If you do not have that working yet, look at the Pd manual
and the GEM FAQ.&nbsp; Also, it is assumed that you have a basic understanding
of how to use Pd and the idea behind the data flow model.&nbsp; In other
words, if I ask you to pass a message with 3 floats into an object, you
would know what I mean.
<p>The system requirements vary depending on your system and what you are
trying to do.&nbsp; In general, you should have the most powerful computer
available and the best graphics accelerator on the market.&nbsp; In reality,
people have been doing some amazing work with a Pentium II and an <a href="http://www.nvidia.com">nVidia
Riva TNT</a> or <a href="http://www.3dfx.com">3Dfx Voodoo2</a> card.&nbsp;
If you are on an SGI, then everything from an O2 up seems to be okay.&nbsp;
The biggest requirement is that you have some kind of OpenGL graphics accelerator.&nbsp;
This means that a Matrox Millennium II will not run very quickly.
<p>The other factor is what you are trying to do.&nbsp; Pushing real-time
video around requires a fast bus, which really only exists on SGIs.&nbsp;
Doing thousands of texture mapped polygons is great on a PC...if it is
a constant texture.&nbsp; There are many issues which mean that there is
no one answer to "Is this system good enough?".&nbsp; In general, you will
have to try and see.
<p>GEM is now maintained by <a href="http://www.iem.at/info/personal/jz.htm">IOhannes m zm&ouml;lnig</a>.
So any bug-reports and donations should go to him instead of Mark...
<p><a href="index.html">[return]</a>
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>GEM - Introduction</title>
</head>
<body>
<center>
<h2>
<u>Introduction</u></h2></center>
GEM is the Graphics Environment for Multimedia. It was originally written by
<a href="http://www.danks.org/mark">Mark Danks</a> to generate real-time computer graphics,
especially for audio-visual compositions.
Because GEM is a visual programming environment, users do not need any experience
in traditional computer languages.
<p>GEM is a collection of externals which allow the user to create
<a href="http://www.opengl.org">OpenGL</a>
graphics within <a href="http://www.crca.ucsd.edu/~msp/software.html">Pd</a>,
a program for real-time audio processing by <a href="http://www.crca.ucsd.edu/~msp">Miller
Puckette</a> (of <a href="http://www.ircam.fr">Max</a> fame).
<p>There are many different shapes and objects, including polygonal graphics,
lighting, texture mapping, image processing, and camera motion. All of
this is possible in real-time without any previous programming experience.
Because GEM is an add-on library for <a href="http://www.crca.ucsd.edu/~msp/software.html">Pd</a>,
users can combine audio and graphics, controlling one medium from another.
<p>GEM is supported in part by a grant from the <a href="http://www.intel.com">Intel
Research Council</a> for the <a href="http://www.gvm.com">The Global Visual
Music</a> project of <a href="http://felix.usc.edu/vibeke.html">Vibeke
Sorensen</a>, <a href="http://www.crca.ucsd.edu/~msp">Miller Puckette</a>
and <a href="http://www.earunit.org/rand.htm">Rand Steiger</a>.
<p>An important thing to remember is that GEM is NOT an application.&nbsp;
It is a library that Pd loads at run-time.&nbsp; Make sure that you see
the section on <a href="GemWPd.html">using GEM with Pd</a>.&nbsp; This
manual assumes that you have Pd working correctly and can load up patches
already.&nbsp; If you do not have that working yet, look at the Pd manual
and the GEM FAQ.&nbsp; Also, it is assumed that you have a basic understanding
of how to use Pd and the idea behind the data flow model.&nbsp; In other
words, if I ask you to pass a message with 3 floats into an object, you
would know what I mean.
<p>The system requirements vary depending on your system and what you are
trying to do.&nbsp; In general, you should have the most powerful computer
available and the best graphics accelerator on the market.&nbsp; In reality,
people have been doing some amazing work with a Pentium II and an <a href="http://www.nvidia.com">nVidia
Riva TNT</a> or <a href="http://www.3dfx.com">3Dfx Voodoo2</a> card.&nbsp;
If you are on an SGI, then everything from an O2 up seems to be okay.&nbsp;
The biggest requirement is that you have some kind of OpenGL graphics accelerator.&nbsp;
This means that a Matrox Millennium II will not run very quickly.
<p>The other factor is what you are trying to do.&nbsp; Pushing real-time
video around requires a fast bus, which really only exists on SGIs.&nbsp;
Doing thousands of texture mapped polygons is great on a PC...if it is
a constant texture.&nbsp; There are many issues which mean that there is
no one answer to "Is this system good enough?".&nbsp; In general, you will
have to try and see.
<p>GEM is now maintained by <a href="http://www.iem.at/info/personal/jz.htm">IOhannes m zm&ouml;lnig</a>.
So any bug-reports and donations should go to him instead of Mark...
<p><a href="index.html">[return]</a>
<br>&nbsp;
</body>
</html>
This diff is collapsed.
This diff is collapsed.
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>Particles</title>
</head>
<body>
<center>
<h2>
<u>Particles</u></h2></center>
<p><br>Nothing here yet
<p><a href="index.html">[return]</a>
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
<title>Particles</title>
</head>
<body>
<center>
<h2>
<u>Particles</u></h2></center>
<p><br>Nothing here yet
<p><a href="index.html">[return]</a>
<br>&nbsp;
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="Author" content="IOhannes m zmölnig">
<title>Pixes (image processing)</title>
</head>
<body>
<center>
<h2>
<u>Image processing</u></h2></center>
The pix objects are used to do image processing to pixel data. If
you load in an image with <i>[pix_image]</i>, then you can change what the
image looks like before rendering it out
<p>In general, processing images is <i>extremely</i> expensive, so you
probably cannot have that many active pix objects. GEM only reprocesses
images when the source image changes or one of the parameters for a pix
object changes. This means that GEM will only process an image when
something is different, instead of every frame. If you want to do
a lot of processing at start up, but then not change anything once the
patch is running, GEM will only do the computation once.<br>
Modern CPUs use SIMD (Single Instruction - Multiple Data) (like MMX, SSE2, altivec)
to make pixel-processing more effective (by processing data parallely).
Until now, only the macOS version of Gem has support for SIMD for some pix-objects.
MMX/SSE2 boosts will hopefully come in future Gem-releases.
<p>The pix objects are divided into two general groups, those which take
one input, and those which require two input images. For example,
<i>[pix_invert]</i>
will "invert" all of the pixels (if a pixel is white, it will change to
black), while <i>[pix_add]</i> will add two images together.
<p>Only some of the pix objects are described here. Look in the reference
patches for explanations for the other pix objects.
<p><a href="#invert">[pix_invert]</a> - invert the pixel data
<br><a href="#add">[pix_add]</a> - add two pixes together
<br><a href="#mask">[pix_mask]</a> - create an alpha mask
<br><a href="#convolve">[pix_convolve]</a> - convolve a pix with a kernel
<p><img SRC="tribar.gif" height=13 width=561>
<h3>
<a NAME="invert"></a>[pix_invert]</h3>
<i>[pix_invert]</i> inverts the pixels in an image. To use <i>[pix_invert]</i>,
simply make sure that you have already loaded an image into the chain.
In the following patch, the fractal image will be inverted.
<center>
<p><img SRC="invert.jpg" BORDER=1 height=120 width=179></center>
<p>Here is the difference between the fractal image and the inverted version.
<center>
<p><img SRC="normalFrac.jpg" height=256 width=256><img SRC="invertFrac.jpg" height=256 width=256></center>
<p><img SRC="tribar.gif" height=13 width=561>
<h3>
<a NAME="add"></a>pix_add</h3>
<i>[pix_add]</i> does what you would expect. It adds two images together.
<center>
<p><img SRC="add.jpg" BORDER=1 height=152 width=305></center>
<p>This patch adds the fractal image with a car image. The processed
image will often contain a lot of white pixels, because the data is just
added together. This occurs in the resulting image, shown below.
<center>
<p><img SRC="addResult.jpg" height=257 width=255></center>
<p><br>
<p><img SRC="tribar.gif" height=13 width=561>
<h3>
<a NAME="mask"></a>pix_mask</h3>
<i>[pix_mask]</i> is used to create an alpha mask from another image.
In the following example (gem_pix/gemMaskDancer.pd), the fractal image's
alpha channel is replaced by the dancer image. If the <i>[alpha]</i>
object was removed, then you would just see the solid fractal image (because
the alpha channel wouldn't be used).
<p>In other words, images are composed of a red, a green, a blue, and an
alpha channel. The alpha channel is the transparency of the pixel.
<i>[pix_mask]</i> only modifies the alpha channel and does not touch the
red, green, or blue data.
<center>
<p><img SRC="mask.jpg" BORDER=1 height=262 width=191></center>
<p>The result is this image.
<center>
<p><img SRC="maskResult.jpg" height=218 width=187></center>
<p><img SRC="tribar.gif" height=13 width=561>
<h3>
<a NAME="convolve"></a>pix_convolve</h3>
<i>[pix_convolve]</i> convolves pix data with a convolution kernel.
Basically, you can get really nice effects if you choose the correct kernel...and
garbage if you choose the wrong one.
<p>Edge detection is done with a convolution kernel, as is smoothing.
The biggest problem is that convolving an image is about the most expensive
operation that you can do in GEM.
<p>Look at gem_pix/gemPixConvolve.pd to get an idea of some of the kernels
that you can send to <i>[pix_convolve]</i> and the effects that you can get.
<p>If you want to learn the math behind convolution, then find any standard
image processing (or audio processing book, this is just 2D convolution).
<br>
<p><img SRC="tribar.gif" height=13 width=561>
<p><a href="index.html">[return]</a>
<br>
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mark Danks">
<meta name="Author" content="IOhannes m zmölnig">
<title>Pixes (image processing)</title>
</head>
<body>
<center>
<h2>
<u>Image processing</u></h2></center>
The pix objects are used to do image processing to pixel data. If
you load in an image with <i>[pix_image]</i>, then you can change what the
image looks like before rendering it out
<p>In general, processing images is <i>extremely</i> expensive, so you
probably cannot have that many active pix objects. GEM only reprocesses
images when the source image changes or one of the parameters for a pix
object changes. This means that GEM will only process an image when
something is different, instead of every frame. If you want to do
a lot of processing at start up, but then not change anything once the
patch is running, GEM will only do the computation once.<br>
Modern CPUs use SIMD (Single Instruction - Multiple Data) (like MMX, SSE2, altivec)
to make pixel-processing more effective (by processing data parallely).
Until now, only the macOS version of Gem has support for SIMD for some pix-objects.
MMX/SSE2 boosts will hopefully come in future Gem-releases.
<p>The pix objects are divided into two general groups, those which take
one input, and those which require two input images. For example,
<i>[pix_invert]</i>
will "invert" all of the pixels (if a pixel is white, it will change to
black), while <i>[pix_add]</i> will add two images together.
<p>Only some of the pix objects are described here. Look in the reference
patches for explanations for the other pix objects.
<p><a href="#invert">[pix_invert]</a> - invert the pixel data
<br><a href="#add">[pix_add]</a> - add two pixes together
<br><a href="#mask">[pix_mask]</a> - create an alpha mask
<br><a href="#convolve">[pix_convolve]</a> - convolve a pix with a kernel
<p><img SRC="tribar.gif" height=13 width=561>
<h3>
<a NAME="invert"></a>[pix_invert]</h3>
<i>[pix_invert]</i> inverts the pixels in an image. To use <i>[pix_invert]</i>,
simply make sure that you have already loaded an image into the chain.