Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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, –  zdd Aug 27 '12 at 1:42
    
@zdd That's why I suggested there might be two computers running. –  Nathan Reed Aug 27 '12 at 1:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.