Sign in to follow this  
DarthTyren

Placing Static Cameras for a Dialog Scene

Recommended Posts

Static Cameras

 

This tutorial isn’t as “follow-along” as others. You will need to have an understanding of editing GIT and DLG files, as well as navigating around your 3D scene. I will, however, go into theory behind cameras and the way they work in 3D, as that’s essentially what this tutorial is about. Also, no promises to those who use gmax rather than 3ds, although there shouldn’t be any issues.

 

Tools Needed:

KotOR Tool by Fred Tetra

3ds Max/gmax with NWmax plugin

K-GFF by tk102

DLGEditor by tk102

Scientific Calculator

 

I. Importing the Appropriate Area Model

 

Let’s say you want to do a scene on the bridge of Goto’s Yacht (in a new module that utilizes the area models from Goto’s Yacht). I’ll go ahead and tell you the appropriate model is 351NARr.mdl.

 

Open up KotOR Tool and go to BIFs --> models.bif --> Aurora Model --> 351narr.mdl. Double-click it and set a directory to export the ASCII MDL file to, then hit ‘OK’.

 

Condense the BIFs directory and go to RIMs --> Modules --> 351NAR.rim. Select that and hit the ‘Extract for Module Editing’ button. A ‘Map Support’ alert will pop up, just say ‘Yes’. The next popup will be dependent on how much of the original Module you want to keep, but you must absolutely keep all four options on the left checked. Hit ‘Next>>’ and choose where you want to extract the files. To be safe, don’t remove the entries in the GIT file, this will make it easier to edit entries or add more.

 

One last thing. Go back to your BIFs then go to layouts.bif --> Layouts --> 351nar.lyt. Open it. Leave it opened.

 

Now open up 3ds Max (or gmax via the NWMax shortcut) and in your NWMax panel, go to General Utils and hit that ‘Set Environ’ button. This is just an assurance I use so that everything I import is scaled appropriately.

 

Do you still remember where you saved your ASCII MDL file? Time to actually import it. In the NWMax panel, go to ‘MDL Loading’ and browse for the model you exported (351narr.mdl). Once you have that, hit the ‘Import’ Button. Wait a few seconds.

 

Once it finishes, click in the viewport and hit the ‘H’ key on your keyboard. Select the AuroraBase (351NARr), then select the move tool. This is where the Layout file comes in. Inside the Layout file, you’re looking for the following line: “351NARr 3.61329 113.921 0.0”

 

Our Unit Scale is set to centimeters, so we need to multiply these values by 100 (or just move the decimal 2 spaces to the right). Now we take those values and move the AuroraBase to those coordinates.

 

After that, I recommend taking a break from the tutorial and setting up your scene without the cameras, using either simple geometry or other models as stand-ins for creatures or other objects. You can also close out of KotOR Tool.

 

II. Setting Up the Viewport

 

Now that you have your scene set up, it’s time to add cameras, right? Well, not quite. Unless you want your shot to be quite different in game from how it is in your scene. Speaking of, you should save your scene file.

 

But then how do we set it up so that what you see is what you get? Fear not, for I have a solution. First, open up your ‘Render Setup’ menu. In 3ds, this is accessed by pushing the ‘F10’ button on your keyboard. Once it’s opened, select ‘Custom’ in the drop-down under Output Size, then select the ‘800x600’ option. Why? Because there are still players out there who play on an SD 4:3 setting rather than an HD 16:9 setting. Also, it will help with consistency in framing shots as the FOV field that you have for each camera in the GIT file is usually set to just one value (I believe the game usually defaults to 55). That field corresponds to the Vertical FOV, but Global FOV settings in Max default FOV to horizontal. This way, if you wanted to change the FOV of a camera, you must use the Vertical FOV setting for each camera in Max, then once you have the shot, you can copy/paste that into the appropriate field in the GIT file. Wow, that’s a lot of info.

 

Close the Render Setup window, then click the + that appears in the top left corner of the Perspective viewport. Select ‘Configure Viewports…’, and you see probably an even more intimidating window than the last one. Don’t be too freaked out. All we need in the default opened tap is the Perspective User View. Let’s go ahead and set the Field of View to 69.528. In a 4:3 setting, that is the horizontal FOV compared to a perfect 55 degree vertical FOV. Your perspective camera should now be set up to default to the appropriate FOV for the cameras you place.

 

Finally, go to the Safe Frames tab. This is where we set up the last bit of stuff to help us frame the shot. First, check all the boxes on the left. Then, unlock the reductions for Title Safe. Set the Horizontal reduction to 0, and the vertical reduction to 43.3. Next to 12-Field Grid, select ‘4 x 3’. Finally, hit ‘Apply’ then ‘OK’.

 

Alright, now the viewport is set up. I’ll get to why each thing that we just did matters in the next section.

 

III. Framing the Shot

 

This is where we go into global camera rules and theory. There are essentially four things we set up in the previous section. Each one has a tip for framing the shot to go along with it. I’ll explain what those are after I give this warning: I will not be teaching you how to navigate the 3d scene. All I will say is do it in Perspective View.

 

First tip: The innermost rectangle (magenta in 3ds) is known as the User Safe area. The subject (the speaker) should be inside this area of the frame.

 

Second tip: The other condensed rectangle (cyan in 3ds) is known as the Action Safe area. If there is a definitive action or effect, it would be wise to place it inside this area of the frame.

 

Third tip: The Rectangle that reaches from one end of the camera to the other (gold in 3ds) was known as Title Safe, but now it represents the shot frame. This will really help with head room. Essentially, you want, if possible, for especially all of the subject’s (speaker’s) head to be in frame, but you want their eyes to be in the top half of it. You also don’t want a large amount of space between the top of the frame and the top of your subject’s head.

 

Fourth tip: The 4 x 3 grid (light pink in 3ds) that we activated will help mostly with lead room. What this means is the amount of room between the subject (speaker) and the horizontal ends of the frame. If the subject is in the third column and facing the right end of the frame, you have too little lead room. If the subject is in the fourth column and facing the left end of the frame, then they have too much lead room.

 

It’s best to usually stick with these tips. However, videography is an art, which means sometimes the rules are allowed to be broken.

 

At long last, once you have the shot framed just as you want it, make sure the view port is active and press ‘Ctrl+C’. You have just created a camera. Go to the modify tab and tell it to check the vertical FOV value. Then, at the Type drop-down menu, set it to Free Camera.

 

Congratulations, you have finally created the camera. Now, we move on to putting it ingame.

 

IV. Editing the GIT File

 

Here’s where 3D camera theory will come into play, but not quite there yet. Open up your extracted 351nar.git file in K-GFF and focus on the CameraList. There are seven fields per camera, six of which are important, and five of which are important now. The other one, CameraID, should speak for itself, and will come into play during the final section of the tutorial.

 

FieldOfView: This is the vertical field of view in degrees of the camera. The game usually defaults this value to 55, but if you have a different value in your camera FOV in the 3D scene, you can use that value instead.

 

Height: Just go ahead and set this field to 0. That way, the height of your camera isn’t offset.

 

Position: In your 3D scene, select the move tool. This will show the coordinates of the selected camera at the bottom of your screen. Since we’re in centimeters, we must convert to meters, so divide each value by 100 (or just move the decimal to the left two places), and place the final values in this field in the GIT file.

 

Pitch: In your 3D scene, select the rotate tool. Either the x or the y value at the bottom of the screen will have a value other than 0. Usually, it’ll be the x value. Whatever that other value is, copy and paste it into this field in the GIT file.

 

Orientation: You ready for an overload of information? Here we go. First, this isn’t like orientation we use to place Creatures. For cameras, the game uses Quaternion Orientation, or 4-point orientation. This is calculated differently. In the 2D world, 0 degrees is due east. In Quaternions, 0 degrees is due north. The good news is that your 3D program already knows this and sets a 0 degree rotation of your camera due north. Which means, there are only two things you have to do, and you use the z value of the rotate tool to determine this. First, if the z value is positive, let it be ‘x’ in the equations below. If the z value is negative, add 360 to it. The answer is ‘x’ in the equations below. Pull out your calculator.

 

cos(x/2) --> the answer will go into the first value field inside the ‘Orientation’ field in the GIT file

sin(x/2) --> the answer will go into the last value field inside the ‘Orientation’ field in the GIT file

 

Finally, just make note of the value in the CameraID field, then save and close the GIT file. You are almost done!

 

V. Editing the DLG File

 

Wouldn’t you know it, this is actually the easiest step in the whole tutorial. Open up you Dialog file (if you don’t have one, you weren’t ready for this tutorial anyway).

 

Go to the entry where you want to use this particular camera. Set the CameraID to the value you made note of from the GIT file, and the CameraAngle to 6. Save and exit.

 

Now you compile the module with the scripts that I know are there (they better be) and all the GFF files. Get ingame and watch your dialog scene. Didn’t end up liking the camera angle? It’s alright, go back and change it, follow the tutorial again if need be.

 

Hope this helps, and no one dies from information overload.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this