Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
Moderators: winston, another_commander
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Commander McLane & Charlie
Thanks for the info about quaternions!
I've been trying to write out a simple spreadsheet that would combine any two quaternions from that table that you linked to charlie using the formulas from Commander McLane's post and display the result, it seems to be working with the 180degree stuff but i'm not sure what values i should be typing in for the 90degree stuff, the table just puts "sqrt(0.5)", should i type in 0.5 or the squareroot of 0.5 or what?
here's a screenshot of the spreadsheet
you just work out which two quaternions you need from the table, type them into the two red rows in the spreadsheet and you get the required quaternion in the yellow box - well, at least that's the plan.
Edit D'oh should have checked the wiki, i found a page that gave the formulas on how to generate quaternions around a single axis for any angle, i've added that into the spreadsheet so it should now be possible to generate single axis quaternions for any angle and axis and combine them in the multiplier.
I've uploaded it here:-
http://www.box.net/shared/l31tyj4i39 14Kb
It's been put together in Excel in Microsoft Office2003, but hopefully openoffice should be able to open it too, i've saved out an excel95 and an excel 97 version too.
Thanks for the info about quaternions!
I've been trying to write out a simple spreadsheet that would combine any two quaternions from that table that you linked to charlie using the formulas from Commander McLane's post and display the result, it seems to be working with the 180degree stuff but i'm not sure what values i should be typing in for the 90degree stuff, the table just puts "sqrt(0.5)", should i type in 0.5 or the squareroot of 0.5 or what?
here's a screenshot of the spreadsheet
you just work out which two quaternions you need from the table, type them into the two red rows in the spreadsheet and you get the required quaternion in the yellow box - well, at least that's the plan.
Edit D'oh should have checked the wiki, i found a page that gave the formulas on how to generate quaternions around a single axis for any angle, i've added that into the spreadsheet so it should now be possible to generate single axis quaternions for any angle and axis and combine them in the multiplier.
I've uploaded it here:-
http://www.box.net/shared/l31tyj4i39 14Kb
It's been put together in Excel in Microsoft Office2003, but hopefully openoffice should be able to open it too, i've saved out an excel95 and an excel 97 version too.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Docks
Right, just to clarify what i've learned from building my Nuit station...
if you wanna do a new fancy-looking dock :-
- i used dock-flat.dat as a template for sizes : use your modeller to create a box of the same size/shape, and then delete the front face, ie the entrance. Then turn the goddamn thing inside out, or you won't be able to see it.
this box has to be modelled at the origin, (0,0,0). This is the important bit that was doing my head in. for some reason Oolite seems not to recognise a displaced dock model - you have to create it where it expects it to be, and then tell it in the OXP that it has been moved :-/
- do the usual stuff, skinning, DAT converting etc. your ship/station model should obviously have a gap in its wall/hull the same size as the dock entrance.
- in your OXP shipdata plist, the dock will be included as a subentity of the ship/station. give it a name that includes the word "dock", and use the positioning variables to shift the model from the origin to its correct place; this may take a bit of trial and error.
eg:
" subentities = (
"dock-nuit -11.5 3004 421 1 0 0 0","
- the dict definition itself is straightforward. i gave mine the word "dock" in its role too.
and that's basically it.
EDIT - Not sure if this is new during my absence or i just previously avoided it by chance, but on testing a new game asset it turns out that the main game item needs "station" in its "roles" attribute ~ i spent a while wondering why my asset wouldn't rotate and the dock wouldn't work, until i added that alongside my custom role.
if you wanna do a new fancy-looking dock :-
- i used dock-flat.dat as a template for sizes : use your modeller to create a box of the same size/shape, and then delete the front face, ie the entrance. Then turn the goddamn thing inside out, or you won't be able to see it.
this box has to be modelled at the origin, (0,0,0). This is the important bit that was doing my head in. for some reason Oolite seems not to recognise a displaced dock model - you have to create it where it expects it to be, and then tell it in the OXP that it has been moved :-/
- do the usual stuff, skinning, DAT converting etc. your ship/station model should obviously have a gap in its wall/hull the same size as the dock entrance.
- in your OXP shipdata plist, the dock will be included as a subentity of the ship/station. give it a name that includes the word "dock", and use the positioning variables to shift the model from the origin to its correct place; this may take a bit of trial and error.
eg:
" subentities = (
"dock-nuit -11.5 3004 421 1 0 0 0","
- the dict definition itself is straightforward. i gave mine the word "dock" in its role too.
and that's basically it.
EDIT - Not sure if this is new during my absence or i just previously avoided it by chance, but on testing a new game asset it turns out that the main game item needs "station" in its "roles" attribute ~ i spent a while wondering why my asset wouldn't rotate and the dock wouldn't work, until i added that alongside my custom role.
Last edited by Killer Wolf on Wed Aug 23, 2023 1:13 pm, edited 3 times in total.
preferred properties of mission screen background images?
Hello everybody,
This might not be the best place to put this question, but I didn't find any better one. So here it comes:
What are the preferred properties for mission screen background images?
More precise, I'd like to know:
Should I use .jpg and/or lower resolutions instead?
Thanks in advance for all your answers!
EDIT: corrected typo
This might not be the best place to put this question, but I didn't find any better one. So here it comes:
What are the preferred properties for mission screen background images?
More precise, I'd like to know:
- what formats are supported (.png, .jpg, ...) and which is the preferred one?
- is there an optimal resolution? (from an error message I learned that length and height should be dividable, e.g. 1024*512)
- any other things to keep in mind?
Should I use .jpg and/or lower resolutions instead?
Thanks in advance for all your answers!
EDIT: corrected typo
忍 knowing that enough is enough, you'll always have enough.
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: preferred properties of mission screen background images
PNG only.GGShinobi wrote:
- what formats are supported (.png, .jpg, ...) and which is the preferred one?
As you already found out, all dimensions must be powers of two. So, for a rectangular picture, you could also use 512*256 or 256*128. For a square picture, you should be fine with 512*512 or 256*256.
- is there an optimal resolution? (from an error message I learned that length and height should be dividable, e.g. 1024*512)
At least as far as texture PNGs are concerned, they must not be saved in interlaced mode. I don't know whether this is as strict a requirement for background images, but it certainly doesn't hurt to save them non-interlaced.
- any other things to keep in mind?
Re: preferred properties of mission screen background images
McLane, thank you very much for your answers! They helped me alot!
This will help me to considerably reduce the size of my oxps!
Didn't know that! I misinterpreted it that the numbers must simple be dividable (so I thought it would have been possible to do a 1000x500 pic or so)! Thanks alot!Commander McLane wrote:As you already found out, all dimensions must be powers of two. So, for a rectangular picture, you could also use 512*256 or 256*128. For a square picture, you should be fine with 512*512 or 256*256.GGShinobi wrote:
- is there an optimal resolution? (from an error message I learned that length and height should be dividable, e.g. 1024*512)
This will help me to considerably reduce the size of my oxps!
忍 knowing that enough is enough, you'll always have enough.
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
If there's one thing I'm absolutely useless at it's wrapping my head around axes (ie. which of the three values represents forward, which aft, which up, which down, etc.)
I mention this shortcoming because I'm currently needing to adjust slightly the forward and aft views of (normally) unflyable ships like the Gecko, Krait and Mamba. Oh, they fly just fine, but there are glitches in the forward and aft views - remnants of the 3D model, I think. And since these ships were never designed to be played, no one thought of including sensible view_position values.
Also, I'm still not quite sure which properties I'm supposed to edit to get a decent forward/aft view. There's this part:
and this one:
If anyone could enlighten me, my developing migraine would be eased
I mention this shortcoming because I'm currently needing to adjust slightly the forward and aft views of (normally) unflyable ships like the Gecko, Krait and Mamba. Oh, they fly just fine, but there are glitches in the forward and aft views - remnants of the 3D model, I think. And since these ships were never designed to be played, no one thought of including sensible view_position values.
Also, I'm still not quite sure which properties I'm supposed to edit to get a decent forward/aft view. There's this part:
Code: Select all
custom_views =
(
{
view_description = "Rear View";
view_orientation = "1.0 0.0 0.0 0.0";
view_position = "0.0 15.0 -100";
weapon_facing = "FORWARD";
},
{
view_description = "Rear Right View";
view_orientation = "0.9239 0.0 0.3827 0.0";
view_position = "70.71 15.0 -70.71";
weapon_facing = "FORWARD";
},
{
view_description = "Right View";
view_orientation = "0.7071 0.0 0.7071 0.0";
view_position = "100.0 15.0 0.0";
weapon_facing = "FORWARD";
},
{
view_description = "Front Right View";
view_orientation = "0.3827 0.0 0.9239 0.0";
view_position = "70.71 15.0 70.71";
weapon_facing = "FORWARD";
},
{
view_description = "Front View";
view_orientation = "0.0 0.0 1.0 0.0";
view_position = "0.0 15.0 100.0";
weapon_facing = "FORWARD";
},
{
view_description = "Front Left View";
view_orientation = "0.3827 0.0 -0.9239 0.0";
view_position = "-70.71 15.0 70.71";
weapon_facing = "FORWARD";
},
{
view_description = "Left View";
view_orientation = "0.7071 0.0 -0.7071 0.0";
view_position = "-100.0 15.0 0.0";
weapon_facing = "FORWARD";
},
{
view_description = "Rear Left View";
view_orientation = "0.9239 0.0 -0.3827 0.0";
view_position = "-70.71 15.0 -70.71";
weapon_facing = "FORWARD";
},
{
view_description = "Top View";
view_orientation = "-0.7071 0.7071 0.0 0.0";
view_position = "0.0 100.0 -10.0";
weapon_facing = "FORWARD";
},
{
view_description = "Bottom View";
view_orientation = "0.0 0.0 0.7071 0.7071";
view_position = "0.0 -100.0 -10.0";
weapon_facing = "FORWARD";
}
);
Code: Select all
view_position_aft = "0.0 5.0 -22.5";
view_position_forward = "0.0 3.5 17.4";
view_position_port = "-12.0 1.5 -1.0";
view_position_starboard = "12.0 1.5 -1.0";
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
I'd guess a quick answer would be that if you change the last set of them (view_position_[aft|forward|port|starboard]), you'd change the camera position for the views you get when hitting 1/2/3/4 or F1/F2/F3/F4 keys (that is the cameras along the weapon positions). The first set would change the camera position you get when switching to the "outside" cameras (that looks _at_ the ship) when consecutively hitting the "v" key.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
Ah right. Many thanks. I'll start with the basic 1,2,3,4 views and maybe later move on to the external views. But could you tell me which of the three values I should adjust for Fore and Aft? and should I decrease or increase them to get rid of the 3D artifacts?
I'm looking to get sensible views out of the portlights of the Gecko, Krait, Mamba, Sidewinder, and Viper.
I'm looking to get sensible views out of the portlights of the Gecko, Krait, Mamba, Sidewinder, and Viper.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
I'm no expert, but from the looks of them, I'd say that considering each coord set a position of values "x y z" relative to the ship's center/origin (hint: 0 on the first position for aft and forward implies centered on the x -- that is left/right -- axis), what you'd need would be to increase the z value for the forward position and to decrease the z value for aft, thus your original:
would become:
This would be an example on how I'd expect the cameras to be "pushed" to the exterior of the model, thus avoiding the artifacts. You'd need to experiment with the values, I have no clue if the values I've used here bring any visible enhancement.
Code: Select all
view_position_aft = "0.0 5.0 -22.5";
view_position_forward = "0.0 3.5 17.4";
Code: Select all
view_position_aft = "0.0 5.0 -23.0";
view_position_forward = "0.0 3.5 18.0";
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
So grateful to you for that life-saving pointer, commander!
Actually, the properties I posted as examples were from the Adder, since my new flyable ships do not yet have entries.
So I'll tinker, and thanks again
Actually, the properties I posted as examples were from the Adder, since my new flyable ships do not yet have entries.
So I'll tinker, and thanks again
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- GearsNSuch
- Dangerous
- Posts: 76
- Joined: Wed Jul 03, 2019 10:27 am
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
Something I’ve found helpful is to import the model in to a program such as Blender, position the cameras in there, and copy the coordinates. It gives a somewhat accurate preview without the hassle of reloading. Do be warned that Blender swaps the Y and Z axes, and they may be inverted.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
Thanks you! (but Blender is just the kind of program that has me breaking out in hives - maybe I'll give it a go, though; conquer my terror )
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
I've provisionally tied the new ships' views to the weapons positions (with minor adjustment to Aft view in the case of the Gecko and Viper). But there's an oddity now: Although I can see laser hits on targets (bits of wreckage flying off etc) I do not see the actual beams of the weapon.
It appears I'm blocking the fire somehow by being plunked down on the gun-barrels. I'm guessing I should apply an offset for the view, but how much and in what direction?
It appears I'm blocking the fire somehow by being plunked down on the gun-barrels. I'm guessing I should apply an offset for the view, but how much and in what direction?
Code: Select all
{
"gecko-player" =
{
like_ship = "oolite_template_gecko";
roles = "player";
view_position_forward = "0.0 -2.49055 25.6416";
view_position_aft = "0.0 5.54957 -25.1558";
view_position_port = "-13.75 -2.0625 -1.875";
view_position_starboard = "13.75 -2.0625 -1.875";
};
"krait-player" =
{
like_ship = "oolite_template_krait";
roles = "player";
view_position_aft = "0.0 0.0 -34.6";
view_position_forward = "0.0 -1.6045 41.5081";
view_position_port = "-45.0 0.0 -13.5";
view_position_starboard = "45.0 0.0 -13.5";
};
"mamba-player" =
{
like_ship = "oolite_template_mamba";
roles = "player";
view_position_aft = "0.0 1.5184 -30.3193";
view_position_forward = "0.0 0.241963 33.558";
view_position_port = "-16.5 -3.0 0.0";
view_position_starboard = "16.5 -3.0 0.0";
};
"sidewinder-player" =
{
like_ship = "oolite_template_sidewinder";
roles = "player";
view_position_aft = "0.0 -6.5 -17.5";
view_position_forward = "0.0 -2.764625 25.2155";
view_position_port = "-24.25 0.0 0.0";
view_position_starboard = "24.25 0.0 0.0";
};
"viper-player" =
{
like_ship = "oolite_template_viper";
roles = "player";
name = "Viper Mk 1 FE";
view_position_aft = "0.0 0.0 -27.5";
view_position_forward = "0.0 -0.15 35.0344";
view_position_port = "-12.5 0.0 0.0";
view_position_starboard = "12.5 0.0 0.0";
max_cargo = 25;
likely_cargo = 12;
};
"viper2-player" =
{
like_ship = "oolite_template_viper-interceptor";
roles = "player";
name = "Viper Mk 2 FE";
view_position_aft = "0.0 0.0 -32.0";
view_position_forward = "0.0 -0.15 35.034";
view_position_port = "-23.75 0.0 -1.75";
view_position_starboard = "23.75 0.0 -1.75";
max_cargo = 30;
likely_cargo = 15;
};
}
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
Re: Things I Wish I Knew BEFORE Starting this *@*#~&ing .oxp
I usually offset at the y axis (that's the second number), the smallest amount that gives you enough paralaxe to see the beam, but not enough to make you have to put the cross-hairs high on the target to hit... try 2 (depends if you are scaling the model in the shipdata), and I prefer to have my viewpoint above the gun (yours are below the centreline, there are plenty of negative numbers)