-1
\$\begingroup\$

http://my.tv.sohu.com/u/vw/26933139

I didn't know what the exactly name for this effect, so I just paste the link of the video here, I want to know what is the knowledge background needed if I want to create such a effect?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

The twisting/distorting effect can be done by making a triangle mesh that is initially a rectangle covering the screen, but with a fair amount of subdivision. Then you let the user alter the shape by clicking and dragging. One way to do that is by soft selection: when they click, you find all the verts within a certain distance of the pointer and compute weights that vary smoothly from 1.0 at the pointer to zero at the outside of the radius; then you adjust the positions of the points by weight * the drag vector. Another way to do it might be with a soft-body physics model, although that's a lot trickier.

You apply an image to it by simply putting a texture on the mesh. How they get the Windows desktop to be the texture I don't know. It's pretty easy to get a static screenshot of the desktop as your program starts up, and use that as a texture, but that wouldn't let you interact with it and get an updated render. In Vista/Win7 with the DWM it might be possible to get it to let you look at the composited desktop render target. However in the video it looks like Windows XP. I suspect there might actually be two computers running, one "slave" that displays the desktop normally, and one "master" that captures the slave's video signal and uses that as a texture in the distortion program. That's just a guess, though.

\$\endgroup\$
2
  • \$\begingroup\$ I agree with the idea: just get a screenshot and map it to the mesh, but there is a big problem, the mesh itself is on the desktop, so when you get a screenshot, you will capture the mesh also, and when you map the screenshot to the mesh, it's not a pure desktop texture, it's a desktop contains a mesh! so it will be a infinite embedded mesh, \$\endgroup\$
    – zdd
    Aug 27, 2012 at 1:42
  • \$\begingroup\$ @zdd That's why I suggested there might be two computers running. \$\endgroup\$ Aug 27, 2012 at 1:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .