28 November 2013

Projecting video footage on to 3D objects

Having modeled a basic character based on my designs in a previous post I have been experimenting with having the live-action footage from our experiments as textures on objects within Maya.

In this example I have created extracted the 'lens' in the characters faced and duplicated this. To create the look of glass I have enlarged the duplicate and added several extrudes to create a raised surface. I have also added a spot light as the main illumination in the scene, I have set the light decay to Quadratic, this creates a more natural look as the fall off of the light is closer to that of light in reality. This means that the further away the light is from the object the less like there will be, with a setting of no decay the value of the light will not change no matter how far away the light is from the object. I also added a point light behind the character to highlight some of the rear details and have added two planes with surface shaders applied to them to create reflections.

I first tested a still image as the texture on the lens to see what it would look like. Clearly in this image the lighting is too dark so I also needed to adjust this. I also used an image of a camera lens underneath the frame from the video here, adjusting the coloration of the video footage is something we will address at a later date.




In order to project the video onto the lens I first created a simple UV layout for the lens, I then created a UV snapshot of this and opened the file in After Effects, this allowed me to maintain the dimensions of the UVs and import the video footage over the top. I then create a spherical mask to mask out the area of the video that was outside the lens. 




Using a mask to create an image sequence
Doing this in After Effects then allowed me to export the footage as single frames (an image sequence), I was then able to set this image sequence as a texture for the lens object in Maya. It took me a while to achieve this correctly, the main problem being the naming of the files, it seems Maya is rather particular about the naming of the files in an image sequence. I eventually found that naming the images image.00, image.01 etc was the correct naming system in order for the image sequence to work. I then exported a few frames in order to ensure that the image sequence was working. As I am working with the Mental Ray shader mia_material_x I was unable to test the image sequence in the scene as the shader just appears as black.

I also created a transparent, reflective material for the outer lens, although I am not quite happy with the results, this purely functions as a test scene.



Image sequence as texture on lens, outer lens with bevel to create reflection 

Having achieved this task we are now aware of the workflow for applying image sequences to objects in Maya and the way After Effects can be utilised to create image sequences from video footage. Below is the test of the image sequence.




No comments:

Post a Comment