View Full Version : camera mapping in maya
steveblake 08-10-2002, 02:45 PM I'm attempting to convert a digital background into a 2½D model.
When I use the camera option for laying out my UV's in Planar mapping, I only seem to get the perspective view. Has anyone had success doing similar?
I worked on a feature film a year or so ago, doing Layout / Previs. We were using Max at the time, to convert storyboards into rough 3d designs for the draughtsmen to use as guides when designing their sets.
I would place a image behind the camera and build ontop, then push and pull the individual UVs to kinda match. That way I got a nice blend between the painted image and the 3D model.
A nice thing we often did was place an object pivot point at the camera and then 'Scale to Camera' - cheating the scale of nearby objects. Easily getting away with a very small forground props etc.
I'm now setting up a scene in Maya for use as a set and wanted to apply similar techniques, but I'm a bit baffled....
Anyone? Thanks.
(here's a clue as to what I'm on about)
|
|
NickolasYounker
08-11-2002, 02:01 AM
Yeah...good topic,, I was wondering about this also.. I seem to remember something about changing the focal length of the camera rather than scale the objects....eehh so if anyone has more info or exact detail...please let us know?
pinion3d
05-03-2003, 09:31 PM
this is an old thread, but I'm going to try to bump it to maybe get some answers about this, or any other way's of doing it. This months fx challenge is real cool, and I'd like to know how to get these results...
thanks
steveblake
07-01-2003, 10:59 AM
Ya, this is very old..
However I recently found this tutorial (http://www.a3d.pwp.blueyonder.co.uk/maya/camera_projection.html) which seems just the ticket!
oh and here's some notes: :)
Some fake Camera Projection tricks
Method 1 : no highlights, but cool for some effects...
First render your scene, but use a perfect white Color on all your Shaders (leave bump, transparecy, specular,... as they are).
Make a new scene (same resolution), make a plane and position/scale it so that it fills the Resolution Gate (View -> Camera Settings -> Resolution Gate) of the camera.
On that plane, map the texture/image that you would have used for camera projection.
In that texture/image, in the Color Balance tab, map your White-Rendering of 1. as a normal UV file on the Color Gain.
Method 2 : even better...
Map the texture/image that you would have used for camera projection on an image plane of the camera you're going to use.
Create a Use Background shader (no shading group needed)
Connect the Out Color of the Use Background to the Color of the shaders which need a camera projection.
This will allow highlights, reflection, shading, transparency...
Method 3 : the techie way...
Create a Sampler Info and a Set Range utility.
Create your 2D texture with 'Normal' setting (not projection or stencil) with new texture placement OFF, and connect it to the wanted Map in your shader (color, transparency,...).
Connect the Pixel Center X/Y of the Sampler Info to the Value X/Y of the Set Range. The Pixel Center is the pixel position in your image (in a 320x240 image the middle pixel would be 160,120 for example).
The Set Range is used to remap your resolution (1 -> 320, 1 -> 240 for example) to normalized values (0 -> 1, 0 -> 1). In the Attribute Editor for the Set Range, set (for this example) the Old Min/Max X and Y to 1/320 and 1/240, and the Min/Max X and Y to 0/1 and 0/1.
Connect the Out Value X/Y of the Set Range to the U/V Coord of your 2D texture.
You have now mapped your 2D texture to the whole image. Apply the shader to the wanted objects. Render. Adapt the ranges to taste in the Set Range attributes.
If you're using an Image File as a texture, set the filter type to 'None', or you'll get blur artifacts in some cases.
Camera projection is a Maya 1.5 built-in feature.
Mail me <mailto:tkluyskens@aw.sgi.com> if you have problems.
CGTalk Moderation
01-13-2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.