Topics about .dat, .srf, .dnm, .ist, Blender, Gepoly, etc.
Post Reply
User avatar
Posts: 1178
Joined: Thu Feb 03, 2011 3:16 pm
Favorite Aircraft: Tornado GR4
Location: Great Britain
Has thanked: 23 times
Been thanked: 148 times


Post by vandal » Fri Aug 12, 2011 8:06 pm

Original topic by Skipper
This is a short tutorial of sorts for those who want to learn about the cockpit and camera positions. Credit goes to Jetliner since he explained to me about moving the cockpit position around before the release of the latest YSFS version. If you've already figured it all out, you don't need to read it (unless you really want to, which is fine with me Smile)

Ok, since I had nothing better to do, I decided to play around with the new camera feature that's one of the new features in the latest YSFS release. Before I go onto the EXCAMERA feature, I might as well talk about the cockpit position, otherwise you'll have no clue how to move the camera around in the first place.

This is more suited for passenger planes (since that's what I used anyway), but once you get it down, you can use this for any plane and to get any camera angle you want.

Open the .dat file of the default B777 (you'll find it in the main aircraft folder of the YSFS folder-use notepad or Wordpad). Scroll down to where it says "COCKPITP"-the cockpit position. Let's take a look at the first three numbers, or as I like to call them "slots."

So you have something like this: COCKPITP -0.5m 1.2m 23.15m

In any .dat file, the cockpit position is determined by these numbers, which are x-y-z coordinates. So if you put the x-y-z coordinate system at the center of the aircraft, the positive x-axis points out the nose, the y-axis goes out through the sides of the aircraft (left and right) and the positive z-axis points out through the top of the fuselage. So, in the example, the first slot specifies the y-axis position. Thus, negative y-values will put you on the left hand side of the aircraft, and positive ones will put you on the right hand side. Similarly, the middle slot, the z-axis value increases or decreases your vertical position. This position usually requires positive numbers only. The last slot is the x-axis, and changes your position along the length of the aircraft. Before the new release, if you wanted a wing view, you had to actually take te cockpit position and move it around, then use the view keys to look "out the window" or wherever it was you wanted to look. So I would have to change the last slot to say, -5.0m and in replay mode keep the "H" key pressed to look left and have a window view.

Thanks to Mr. Yamakawa, we now have a better way of getting the same result. It's the EXCAMERA feature. Here's an example from Welnio's ATR 72-500 .dat file:

EXCAMERA "CO-PILOT" 0.50m 1.18m 11.88m 0deg 0deg 0deg INSIDE

As you can see, the first three slots do exactly the same thing I mentioned before-they move the camera around. The next three slots are the interesting ones. They're all in degrees of a 0-360 degree circle. Two things to remember: 1. 0deg doesn't do anything, it's the default camera angle. 2. Going from 0deg to 90 deg rotates the camera left, going from 0deg to 270deg rotates the camera right and so on. But all three positions rotate the camera differently. The first slot rotates the camera left and right. So if I wanted the co-pilot camera to point at the captain's seat, I would change the first slot to 90deg. If I wanted it to point out the window, I would change it to 270deg, and if I wanted it to point directly behind, I would change it to 180deg. The second slot rotates the camera up and down. So if I wanted the camera to look up at the cockpit's ceiling, I would change the second slot to 90deg (while keeping the other slots as 0deg). To point it down, it would be 270deg and so on. The third slot rotates the camera about the y-axis. It's kind of like making the camera lie on its side. I've changed the third "deg" slot to 270deg, which rotated the camera right, and now its lying on its side, so to speak. (See the screenshots below).

Just one more thing you may have noticed the "OUTSIDE" and "INSIDE" specifiers. These are required, or your camera position won't work and will produce errors. They simply specify where exactly you want the camera-inside the plane or outside. If you want cabin views, put INSIDE after each EXCAMERA line (see below). If you want window views, put OUTSIDE after each EXCAMERA line. I've found that putting INSIDE for window views doesn't give you good, uninterrupted views of the wing or outside scenery from the cabin.

So, you can use these deg slots in combination with the horizontal and vertical position slots to assign camera views. Here's an example for Welnio's ATR 72-500 and the associated screenshots:

COCKPITP -0.50m 1.18m 11.88m #COCKPIT POSITION
EXCAMERA "CO-PILOT" 0.50m 1.18m 11.88m 0deg 0deg 0deg INSIDE
EXCAMERA "JUMPSEAT" 0.0m 1.18m 11.28m 0deg 0deg 0deg INSIDE
EXCAMERA "TAILCAM" 0.0m 4.55m -9.98m 0deg 0deg 270deg OUTSIDE
EXCAMERA "PASSENGER 1" -0.50m 0.90m 4.50m 90deg 0deg 0deg OUTSIDE
EXCAMERA "PASSENGER 2" 0.50m 0.90m -2.00m 270deg 0deg 0deg OUTSIDE
EXCAMERA "PASSENGER 3" -0.50m 0.90m -2.00m 90deg 0deg 0deg OUTSIDE

Note: you need to include the EXCAMERA designation for each line, and maybe include the cam's purpose (PASSENGER1, JUMPSEAT, etc). Also, remember that even after assigning the cameras and camera angles, you can still use the H, K, J, L and other viewing keys for any camera. And also, you can try putting numbers for all three camera angle slots to get various views. I didn't do it 'cause I'm too lazy to try it out Razz and you still get viewing functionality with the viewing keys.

Hope this helped anyone who was confused about the cameras (and hopefully I didn't confuse you even more!).[/quote]
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest