SyntaxHighlighter

Thursday 4 July 2013

Day 19: Render Targets, the 123D Demo

Gallery of Heads

GLC was originally to be used to display a live-updated gallery of heads from 123D Catch models, with said models produced from 30 or so pictures someone takes of a kid's head as they sit stationary in a chair surrounded by spotlights.

But GLC wasn't playing nice with the 123D Catch models, so we sacked it.

Idea 2 by Toby: load the 123D Catch models into XNA, write an XNA program to take the models, and render a snapshot of them to an off-screen buffer which is then dumped to a file. Then rotate the model 10 degrees about the Y axis, take another picture, dump, and repeat 36 times.

Combine the 36 images into a gif, and stick the gif in a folder which is checked at intervals, new gifs grabbed and displayed on a simple web page wherever we like.

Perfect!

Currently I've written an XNA program that can take a model, and dump one snapshot of it to a file. From here it should be easy enough to implement the ten degree rotations, and repeatedly output to a new file on each rotation.

Toby has sorted the webpage side of things, and has a folder set up waiting to receive gifs of people's heads! Testing shall commence tomorrow all being well.

I had to learn how to program raw XNA and get it to display models in order to write to the off-screen buffer. I hadn't experienced this before, because the AR Demo is actually written in Goblin XNA, a wrapper that takes vanilla XNA and does all the model drawing automatically allowing the user to concentrate on the Augmented Reality bit of the programming. That means it does all the drawing bit hidden from the users eyes, so there is no way to tell it to draw to a buffer or to anything else for that matter - the closest a Goblin XNA programmer gets to actually rendering models is calling scene.draw()!

Computers

Replaced Walter's mobo CPU and ram with the new parts, and installed an SSD. Reinstalled windows, everything is lightning fast and snappy due to the SSD and the 8GB RAM and the 4.2GHz quad core processor - if you haven't experienced an SSD in a system fast enough to handle it can I just say there has never been a bigger jump of speed from the time Pentium III was announced (if Pentium III was even good... can't quite remember)

Installed an SSD into Donald, and made it the system drive - moved the windows installation and the entire C: drive to the SSD. Donald and Walter are both blistering fast now, should last for a very long time indeed.

In other news managed to sprain my foot playing football. Feels pretty bad but hopefully it'll improve after a nights rest. Listen out for tap-tap-tap sounds tomorrow, that'll be me hopping about the Kilburn building!

No comments:

Post a Comment

Note: only a member of this blog may post a comment.