I'd like to work out some cinematic views, but I'm getting confused. (not difficult!!)
Would someone mind explaining the external view numbers for me?
view_description = "**** View";
view_orientation = "1.0 0.0 0.0 0.0 ";
so, 4 numbers. the 4th one is the rotation. is that in degrees? 0-360?
view_position = "0.0 14.0 -350.0";
3 numbers, so X axis, Y axis & distance?
-350 being a rear view
Where is "0"?
what's the scale in? metres?
weapon_facing = "FORWARD";
},
but all views face the ship, not forward. :/
Many thanks in advance.
External views
Moderators: winston, another_commander
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: External views
Nah, it's a "quaternion" value I believe. The view forward isYodeebe wrote:view_orientation = "1.0 0.0 0.0 0.0 ";so, 4 numbers. the 4th one is the rotation. is that in degrees? 0-360?
"1.0 0.0 0.0 0.0"
, but the view aft is "0.0 0.0 1.0 0.0"
, IIRC. Definitely not in 360 degrees.X, Y and Z - the view position can be offset to either side, above or below, or forward or behind the ship model. They are all metre offsets from the centre of the ship.Yodeebe wrote:view_position = "0.0 14.0 -350.0";3 numbers, so X axis, Y axis & distance?
Only by tradition. You can set the view position forward of the ship with a forward orientation so the ship isn't visible. (PM with example OXP coming your way) The weapon_facing key controls which of the four weapon mounts will fire if you press the fire button while in that view.Yodeebe wrote:weapon_facing = "FORWARD";
but all views face the ship, not forward. :/
Re: External views
That's where the camera points from its position. And it is a quaternion (W X Y Z), where W is some kind of coefficient(?) and X,Y & Z represent coordinate axes.Yodeebe wrote:view_orientation = "1.0 0.0 0.0 0.0 ";
IIRC if you want to rotate an object (like subentity) or (in this case) an "object" (viewing direction) around one axis, you take the amoun of rotation in degrees (a) and insert cos(a) as W and sin(a) as corresponding axis value (X, Y or Z).
Orientation 1 0 0 0 really means rotation of 0 degrees around all/no axes/axis ( cos(0) = 1, and sin(0) = 0 ).
The matter gets a bit more complicated when you need rotations around 2 axes. I've seen 2 different spreadsheets about quaternions, and one of them has the formulas for 2-axis quaternion right. Before using the spreadsheet, you have to have visualized the needed rotations correctly - I usually twist a pencil to see how the rotations work. One could of course make a cone in Wings3D and rotate it with Absolute commands for same effect.
EDIT: checked the Wiki nad it states that the WXYZ values are in fact cos(0,5*a) and sin(0,5*a). In case of 1 0 0 0 the values are normalized (between 0 & 1) (http://wiki.alioth.net/index.php/Quaternion)
In this case "0" (origo) is at the center of player ship.Yodeebe wrote:Where is "0"?
Yes, in Oometres (Oolite metres).Yodeebe wrote:what's the scale in? metres?
Last edited by Zieman on Mon Nov 21, 2011 12:48 pm, edited 1 time in total.
...and keep it under lightspeed!
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
Friendliest Meteor Police that side of Riedquat
Far Arm ships
Z-ships
Baakili Far Trader
Tin of SPAM
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: External views
When you really want to create your own quaternions for view positions, you could look here. But even these numbers must be corrected by rotating them around the view axis until it looks okay.Yodeebe wrote:I view_orientation = "1.0 0.0 0.0 0.0 ";
so, 4 numbers. the 4th one is the rotation. is that in degrees? 0-360?
Most easy will be to just re-use existing quaternions and not adding new view directions .
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: External views
Good grief!!!Zieman wrote:IIRC if you want to rotate an object (like subentity) or (in this case) an "object" (viewing direction) around one axis, you take the amoun of rotation in degrees (a) and insert cos(a) as W and sin(a) as corresponding axis value (X, Y or Z).
Orientation 1 0 0 0 really means rotation of 0 degrees around all/no axes/axis ( cos(0) = 1, and sin(0) = 0 ).
The matter gets a bit more complicated when you need rotations around 2 axes. I've seen 2 different spreadsheets about quaternions, and one of them has the formulas for 2-axis quaternion right. Before using the spreadsheet, you have to have visualized the needed rotations correctly - I usually twist a pencil to see how the rotations work. One could of course make a cone in Wings3D and rotate it with Absolute commands for same effect.
EDIT: checked the Wiki nad it states that the WXYZ values are in fact cos(0,5*a) and sin(0,5*a). In case of 1 0 0 0 the values are normalized (between 0 & 1) (http://wiki.alioth.net/index.php/Quaternion)
thanks.
Re: External views
I'm trying to amend the view positions on one ship i'm working on as the ship is quite small and I want to increase the zoom a bit. Also I'm rying to amend the exhaust positions. In short, I'm changing the numbers but nothing is happening. I'm doing the shift restart for oolite and even a computer restart, but it makes no change. Any ideas please?
On a break
- CommonSenseOTB
- ---- E L I T E ----
- Posts: 1397
- Joined: Wed May 04, 2011 10:42 am
- Location: Saskatchewan, Canada
Re: External views
Watch for duplicate files.Amaranth wrote:I'm trying to amend the view positions on one ship i'm working on as the ship is quite small and I want to increase the zoom a bit. Also I'm rying to amend the exhaust positions. In short, I'm changing the numbers but nothing is happening. I'm doing the shift restart for oolite and even a computer restart, but it makes no change. Any ideas please?
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.
CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
- JazHaz
- ---- E L I T E ----
- Posts: 2991
- Joined: Tue Sep 22, 2009 11:07 am
- Location: Enfield, Middlesex
- Contact:
Re: External views
look out for missing i's too....