Here’s the accompanying video for SIGGRAPH 2015 paper “Linear Subspace Design for Real-Time Shape Deformation”.
Posts Tagged ‘animation’
My colleagues, Daniele Panozzo, Oliver Glauser, Cedric Pradalier, Otmar Hilliges, Olga Sorkine-Hornung and I have just submitted the camera ready version of paper “Tangible and Modular Input Device for Character Articulation” to be presented at ACM SIGGRAPH 2014. I’ve put up a Tangible and Modular Input Device for Character Articulation page where you can find the preprint version of the article, videos and an OpenHardware description so you can build your own device!
Articulation of 3D characters requires control over many degrees of freedom: a difficult task with standard 2D interfaces. We present a tangible input device composed of interchangeable, hot-pluggable parts. Embedded sensors measure the device’s pose at rates suitable for real-time editing and animation. Splitter parts allow branching to accommodate any skeletal tree. During assembly, the device recognizes topological changes as individual parts or pre-assembled subtrees are plugged and unplugged. A novel semi-automatic registration approach helps the user quickly map the device’s degrees of freedom to a virtual skeleton inside the character. User studies report favorable comparisons to mouse and keyboard interfaces. Our device provides input for character rigging and automatic weight computation, direct skeletal deformation, interaction with physical simulations, and handle-based variational geometric modeling.
Writing GIFs in matlab is a bit of a pain. Assuming you have a sequence of RGB images stored in a Height-by-Width-by-3-NumberOfFrames matrix
S, then you can write this as an animation with no delay to a .gif file using:
filename = 'foobar.gif'; for f = 1:size(S,4) [SIf,cm] = rgb2ind(S(:,:,:,f),256); if f == 1 imwrite(SIf,cm,filename,'Loop',Inf,'Delay',0); else imwrite(SIf,cm, filename,'WriteMode','append','Delay',0); end end
Update: Often instead of
S(:,:,:,f) I’ll have my frames coming from a figure window:
frame = getframe(gcf); [SIf,cm] = rgb2ind(frame.cdata,256);
Suppose you have a mesh (V,F) and a vector field (or matrix of scalar field values) W. You can create a looping animated gif in matlab of a visualization of those values using:
t = trisurf(F,V(:,1),V(:,2),0*V(:,1),'EdgeColor','none','FaceColor','interp','FaceLighting','phong'); hold on; % for me each coordinate corresponds to a point in C scatter(C(:,1),C(:,2),'ok','MarkerFaceColor','y','LineWidth',3,'SizeData',100); hold off; axis equal; view(2); title('Vector Field ','FontSize',20); for w = 1:size(W,2) set(t,'CData',W(:,w)); drawnow; im = myaa('raw'); [imind,cm] = rgb2ind(im,256); filename = 'vector-field.gif'; if w == 1; imwrite(imind,cm,filename,'gif', 'Loopcount',inf); else imwrite(imind,cm,filename,'gif','WriteMode','append'); end end
This produces something like:
Here’s our 40 second Fast Forward we just showed at SIGGRAPH 2012 for our paper “Fast Automatic Skinning Transformations”
When I overlay animations on background images there’s often a a thin outline of white or near white coming from the texture mapping + anti-aliasing in my application.
I came up with two easy ways to get around this in photoshop. First just add a black stroke to every frame. This works well for cartoons:
The other option is very similar. Add a stroke to each layer but instead of “adding” the stroke color, subtract it from the image. Select the blending options in the stroke layer style to look like this:
which produces something like:
Here’s a sneak peek at some new results.
I presented the above at SIGGRAPH ASIA in Hong Kong last week during the Technical Papers Fast Forward. Each paper gets 40 seconds to present or at least tease their work. Here’s our 40 sec video for our paper “Stretchable and Twistable Bones for Skeletal Shape Deformation” by me and my advisor Olga Sorkine.
You can do this directly with ffmpeg, but I had trouble with it and seem to remember the quality not being so good. Instead I convert my .mp4 video into an animated gif by first grabbing 10 frames every second and saving them to files using the following:
ffmpeg -i input.mp4 -r 10 output%05d.png
Then using imagemagick’s convert tool insert each frame into an animated gif:
convert output*.png output.gif
This makes a rather large .gif file for even modest videos so probably you’ll want to post process it (e.g. with Photoshop) to reduce the file size by compressing the .gif file or reducing the dimensions.
Clean up the png files using: