2007-01-26

StereoMix Audio Input For Dell Laptops

Finally there is a solution for my Dell Inspiron 9400 to get a "Stereo Mix" audio input channel to route the sound output from one application to another. This might work with other laptops, which have a Sigmatel 92XX C-Major chip:

  • Follow this link: http://us.lgservice.com
  • Go to: Device Driver
  • In product, select: “Notebook”
  • OS: "WindowsXP"
  • Search subject: “Sigmatel”
  • The download the result: "[Sound/2000/XP] SigmaTel Sound Driver Ver 5.10.0.4866 XNOTE(LE50)" or similar
  • After Download, install the driver and reboot
  • Turn up the volume of the Stereo Mix input in the windows mixer...

2007-01-23

Calculate Normals In Shader

The common method to calculate vertex normals for a mesh is to use the neighbour vertices to determine the orientation of the surface with subtraction of the positions and the cross product to get the normal vector.
Calculating the vertex normals for a mesh in a shader is usually impossible, because there is no access to the neighbours. So, if you have a mesh with no normals you have to calculate the normals on the CPU side.
But all this changes to a quite easy task, if you are working with dynamic meshes and you have a formula to describe the mesh in the following form: f(u, v) = (x, y, z). With that formula you are able to reach every point on the mesh surface, hence its easy to do all in the shader. Assuming the input mesh is a grid in the xy-plane, we first scale and offset the grid to get the input space we want, then we calculate the new position of the vertex by using the x and y coordinates of the current vertex as u and v in the formula. After that we get two neighbours by calculating two other positions with a small offset in u and v direction. A pseudo vertex shader code could look like this:

u = pos.x * scale + offset ;
v = pos.y * scale + offset ;

pos = f(u, v);

neighbour1 = f(u+smallvalue, v);
neighbour2 = f(u, v+smallvalue);

tangent = neighbour1 - pos;
bitangent = neighbour2 - pos;

normal = cross(tanget, bitanget);

nice, eh? now go looking for some mesh functions ;)

If you haven't enough yet, you can improve the shading smoothnes by calculating the neighbours and normals in the pixel shader. Thats especially good, if the resolution of the input grid is not so high. For that, after calculating the position, pass the u and v values to the pixel shader and do all remainding stuff there. Read the forums discussion from where the idea is and the download here.
Finally a picture of the supersmooth pixel shader implementation:


2007-01-14

Open Visuals Update

As we got a new date at March 17th at the Kunstmuseum Stuttgart, my friend Johannes Guerreiro and I have updated the site of our interactive project Open Visuals. We also registered the domain www.openvisuals.de. The concept of this installation is to give the visitors the feeling of being a VJ. For that we coded a 3D-Engine with vvvv and an interface for the Behringer BCR2000 midi controller. With it, the visitor can control several parameters of music reactive motion graphics which are fully generated in realtime.

Here is a picture of the impressive building of the Kunstmuseum in the heart of Stuttgart:

2007-01-13

D Programming Language 1.0 released

The first official version of the D progamming language is released. It seems to be a good alternative to the meanwhile 20 years old C++. I'v coded some lines with it and loved it. The language is easy to write with a clean syntax, has great features and performance.

As IDE I recommend Code::Blocks, but there are others, follow the links from the D site.