Streamlining Frame Creation With Maya

This forum is meant for people to share their knowledge by writing their own tutorials for Adventure Maker.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Streamlining Frame Creation With Maya

Postby Koetsu » Sun Apr 12, 2009 4:54 am

Alternate Title: Good Lord, Does This Guy Ever Shut Up?

EDIT: Completely forgot to mention that this is for Maya 2009. The steps for older versions (or even other programs, possibly) might be a bit different, but similar.

Originally this was going to be a tutorial on making panoramas, but since I don't have Photoshop on my workstation (yet...), and I haven't worked out the camera settings, that'll have to wait.

In the meantime, this method allows you to make easily-replicated, invisible, simple camera "pods" that you can use to make a multidirectional point of reference for a set of frames. The overall effect is similar to Myst or Riven's gameplay - the player stands in one spot, and can turn in any direction you've made a camera for. Once you've set up your first node (that's what I'm calling these now, to avoid future confusion), you can just select it and press ctrl+D, and move the duplicate anywhere else you'd like a node. It's not the most complex of tasks, but it might be useful to someone just starting out.

Anyway, enough talk(typing?), here goes:

First off, let's get a scene that needs nodes. Something off our junk pile... Here we go:

Image

Not spectacular, but it'll do.

One thing, before we begin. If, at any point, you need to select a camera, You can click this button to bring up a list of objects in your scene:

Image

This way, you can select anything(including cameras, lights, and even shaders) without having to find and click on it.

Now, we place a camera in the room. You can go to the Create menu, select Cameras, and press Camera, or you can go to your Rendering tab and click the picture of a camera.

Image

First, we need to change this camera's settings. You can change the settings for each node to suit your needs, use different settings for each scene, or use the same node for an entire game, whatever flips your switches. However, the default settings will look like crap. So! Go to your Panels menu(it's under the strip of icons), Click Perspective, and select your new camera(most likely Camera1). (TIP: When you have a large number of cameras, it can be faster to select your camera, go to this same menu, and click "Look Through Selected." This way, you don't have to look through a giant list of cameras to find Camera78.)

Image

Now, let's see what our camera is going to render.

Image

Looks like crap, doesn't it? This is why you don't want the default settings. Let's tweak them a bit.

First, now that you're looking through your camera, let's get a film gate so you know what your image will look like(unless you like gratuitous rendering...). Head for your Render Settings box. This button is on the top row of tools, and in your toolbox under the Rendering tab. Click it (looks like a clapper board with a pair of radio buttons), and go to the Common tab (TIP: Make sure you're rendering in Maya Software - Hardware looks awful!).

Image

Under "Image Size," pick something that matches the aspect ratio of your game. If you're going to be using 640*480, pick something with the same ratio; otherwise, you will have to crop EVERY. SINGLE. FRAME. I will be using 1024*1024, but this tutorial can be applied to most reasonable sizes. Hit the close button.

Next, click the Resolution Gate button.

Image

Now, you have a box over your screen that will show exactly where the borders of your final render will be. This helps greatly in positioning your cameras. (TIP: You don't have to return to the normal camera to reposition the one you're looking through. Hold alt+Middle click, and move the mouse to pan. This is much faster for smaller adjustments. Don't use alt+Left click though, since this camera is the base for your others! You can adjust angles when your node is complete.)

Image

These are the settings for my camera. In this case, I selected Overscan.

Code: Select all
FILL: This takes your film gate, and picks the largest area out of it that renders in your aspect ratio. If your resolution gate is square, but the camera is rectangular, this will cut off the sides. If your resolution gate is wider than the camera, this cuts off the top and bottom.

OVERSCAN: This takes your resolution's aspect ratio, and expands it until the entire film gate fits in it.

Use either as you like, but don't switch between them unless you're switching nodes as well; it greatly affects the visible area in your final render.


Code: Select all
ANGLE OF VIEW: Simply put, this changes the area visible through your camera. The default setting is about 54, which is okay for most shots, but since we're taking a close-up, it's going to need to be bigger.
 
FOCAL LENGTH: This changes the "depth" of your camera's picture. Lower values will increase the area viewed, but will give you a sort of tunnel vision. Higher values will zoom in, but make your renders look flat. Experiment with this setting, but use it wisely.

CAMERA SCALE: This one's simple. It makes your field of vision wider. Higher values make the camera "bigger." This increases the area you can see without flattening the image, but too much and this room would look like it's inhabited by leprechauns. Lower values decrease the area visible, but unless [i]you're[/i] a leprechaun, don't go too far down either.


Change these settings until you have an agreeable shot. I raised Angle of View to 90, since I'm making four cameras, and want a full 360-degree visible area over four frames. Use higher or lower values to taste. (TIP: Angle of View and Focal Length are inversely proportional; increase one, the other lowers to fit.)

After all of this work, you've made one camera, which will become one frame. But don't worry - now that you've set things up, the rest of them will be much, much easier.

==========================================================================

Return to your normal camera (persp). If you've forgotten already, refer to the fourth picture to find the menu. Find your camera, click it, and press Shift-D. It doesn't look like anything's happened, but your camera has duplicated itself.

Image

Rotate the duplicated camera (it selects itself automatically) 90 degrees. Press Shift-D again, rotate 90 more degrees, and repeat once more. You'll have four cameras, pointing in four directions, all with your original camera's settings!

What you can do now:

-Instead of using four nodes, make more or less. Some nodes may require only two directions to look, some could require ten. If you want them evenly spaced, divide 360 by the number of cameras, and increase each rotation by that number when duplicating them. Four cameras is 90 degrees with each new camera, eight cameras is 45, and so on.

-Change or add individual cameras. If you want one frame pointed upwards a bit, rotate that frame's camera. If you don't want your cameras' directions separated evenly, rotate them towards or away from each other. However, unless you know what you're doing, DO NOT use any tools other than Rotate on a single camera.

-Select all four cameras and reposition them. If your shots are a bit high, select the node and lower it. If they're too far in one direction, move them over.

-Rotate all four cameras. This will (obviously) change the direction of all of your frames, but it can be useful in some cases (upside-down, standing on a hill, laying on your side, etc).

-Rename cameras. This one's a bit difficult (you have to rename the camera, not just the camera object), so I wont be covering it here (It's not really necessary early on, anyway). However, if you rename a camera before duplicating it, you can make nodes with unique names. It's much easier to find and render LivingRoom1 through LivingRoom4 than it is to render Camera20 through Camera24.

=========================================================================

Now that you're thoroughly bored, let's get some results. Since you've set up your node(s) already, all we have to do now is render. I'll assume you know how to set up raytracing, change quality, and all of that fun stuff. Here's how to render through multiple cameras fairly quickly. There are other ways, naturally, but this is the simplest I know of.

Image

First, open your Render View window (top left). It should either be blank, or show the last render you did. Next, go to Render, click Render(again), and you should see a list of cameras. Click that bar at the top. This turns the menu into a window (top right), so you don't have to click Render for each new camera. Persp is your regular camera. It renders whatever you're looking at. The others (camera1 through camera4 in this case) are the ones you've just set up. Current is whatever you're looking through now. Remember! Clicking one of these starts rendering it immediately. If you've got high settings (raytracing, high resolution, and antialiasing are big ones), you're stuck waiting for the render to finish, or waiting for the computer to register your frantic ESC-button presses.

These are the steps to create your frames:

1) Click camera1 (substitute camera1 for whatever's first in your node. I'm going with the example).
2) Go to File, and click Save. Save as a BMP file. You don't want to lose quality at this stage, and Maya sucks at JPG files. You can always convert later. Remember to save with a name you'll remember(if you didn't rename your cameras earlier, don't worry! You can rename your renders now.)
3) Repeat this process with camera2.

After you've rendered all of your frames, you can photoshop them, crop them, filter them, or just dump them in Adventuremaker. Here's what my results looked like(resized for bandwidth, of course):

Image Image
Image Image

=======================================================================

While a bit involved to start with, this should allow you to make as many cameras as you need with constant settings (apart from scene-specific tweaks). You can also Ctrl-C and Ctrl-V between scenes, so you don't have to make a new camera when switching files.

Hopefully, that wasn't too hard to follow. Since I'm sure I've forgotten to explain something, questions are welcome. If this helped you at all, please tell me! I have low self-esteem :(

(Note: If this turns out to be too large, I can always replace those in-line pictures with links.)
User avatar
Koetsu
Member
 
Posts: 19
Joined: Mon Apr 06, 2009 1:46 am

Postby Mystery » Tue Apr 14, 2009 2:47 pm

Thanks for providing this tutorial Koetsu :D
Although I'm not using Maya, I'm sure that Maya users will find it helpful :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby marxdarx » Tue Oct 20, 2009 3:59 pm

Indeed it does help. Thank you! I use Maya a lot and was just thinking of how to use it in AM when I came across this post...sweet!


So your efforts were not in vain :-)
"There is no limit to what a person can do if they just DO IT" - marxdarx
marxdarx
New Member
 
Posts: 4
Joined: Tue Oct 20, 2009 2:55 pm


Return to Post Your Own Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests

cron