Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

The Shipyard at the End of the Ooniverse. Modeller's bit.

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

chomann wrote:
this is my first ship build, and im having problems with the external views, meaning when I hit "v" the views do not cycle. The ship shows up fine in the shipyard, and on the loading screen but i can't get a single external view of it while in game. Is there some "golden Rule" for setting the views or a certain range that I need to stay with in for the views to work. If i use custom views and set my own do the coordinates go in x,y,z order and are they in meters just like wings3d? Thanks
Excuse me if the question seems dumb, but have you defined external views in shipdata.plist? They can only be displayed if they are defined here with the custom_views-key, followed by an array that contains the different view positions one after the other in the order they are cycled through. The syntax is (example from the built-in Cobra III):

Code: Select all

		<key>custom_views</key>
		<array>
			<dict>
				<key>view_description</key>
				<string>Rear View</string>
				<key>view_orientation</key>
				<string>1.0 0.0 0.0 0.0</string>
				<key>view_position</key>
				<string>0.0 30.0 -200.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Rear Right View</string>
				<key>view_orientation</key>
				<string>0.9239 0.0 0.3827 0.0</string>
				<key>view_position</key>
				<string>141.42 30.0 -141.42</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Right View</string>
				<key>view_orientation</key>
				<string>0.7071 0.0 0.7071 0.0</string>
				<key>view_position</key>
				<string>200.0 30.0 0.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Front Right View</string>
				<key>view_orientation</key>
				<string>0.3827 0.0 0.9239 0.0</string>
				<key>view_position</key>
				<string>141.42 30.0 141.42</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Front View</string>
				<key>view_orientation</key>
				<string>0.0 0.0 1.0 0.0</string>
				<key>view_position</key>
				<string>0.0 30.0 200.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Front Left View</string>
				<key>view_orientation</key>
				<string>0.3827 0.0 -0.9239 0.0</string>
				<key>view_position</key>
				<string>-141.42 30.0 141.42</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Left View</string>
				<key>view_orientation</key>
				<string>0.7071 0.0 -0.7071 0.0</string>
				<key>view_position</key>
				<string>-200.0 30.0 0.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Rear Left View</string>
				<key>view_orientation</key>
				<string>0.9239 0.0 -0.3827 0.0</string>
				<key>view_position</key>
				<string>-141.42 30.0 -141.42</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Top View</string>
				<key>view_orientation</key>
				<string>-0.7071 0.7071 0.0 0.0</string>
				<key>view_position</key>
				<string>0.0 200.0 -15.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
			<dict>
				<key>view_description</key>
				<string>Bottom View</string>
				<key>view_orientation</key>
				<string>0.0 0.0 0.7071 0.7071</string>
				<key>view_position</key>
				<string>0.0 -200.0 -15.0</string>
				<key>weapon_facing</key>
				<string>FORWARD</string>
			</dict>
		</array>
which would be in XML. In ASCII the same thing looks like this:

Code: Select all

        "custom_views" = (
            {
                "view_description" = "Rear View"; 
                "view_orientation" = "1.0 0.0 0.0 0.0"; 
                "view_position" = "0.0 30.0 -200.0"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Rear Right View"; 
                "view_orientation" = "0.9239 0.0 0.3827 0.0"; 
                "view_position" = "141.42 30.0 -141.42"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Right View"; 
                "view_orientation" = "0.7071 0.0 0.7071 0.0"; 
                "view_position" = "200.0 30.0 0.0"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Front Right View"; 
                "view_orientation" = "0.3827 0.0 0.9239 0.0"; 
                "view_position" = "141.42 30.0 141.42"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Front View"; 
                "view_orientation" = "0.0 0.0 1.0 0.0"; 
                "view_position" = "0.0 30.0 200.0"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Front Left View"; 
                "view_orientation" = "0.3827 0.0 -0.9239 0.0"; 
                "view_position" = "-141.42 30.0 141.42"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Left View"; 
                "view_orientation" = "0.7071 0.0 -0.7071 0.0"; 
                "view_position" = "-200.0 30.0 0.0"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Rear Left View"; 
                "view_orientation" = "0.9239 0.0 -0.3827 0.0"; 
                "view_position" = "-141.42 30.0 -141.42"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Top View"; 
                "view_orientation" = "-0.7071 0.7071 0.0 0.0"; 
                "view_position" = "0.0 200.0 -15.0"; 
                "weapon_facing" = FORWARD; 
            }, 
            {
                "view_description" = "Bottom View"; 
                "view_orientation" = "0.0 0.0 0.7071 0.7071"; 
                "view_position" = "0.0 -200.0 -15.0"; 
                "weapon_facing" = FORWARD; 
            }
        );
I would suggest you simply c&p this into your ship's shipdata. If your ship is smaller than a Cobra III and needs camera positions closer to its body, try c&p'ing the array from the Cobra 1, Asp or Adder. One of them ship give a convincing impression.
User avatar
chomann
Above Average
Above Average
Posts: 29
Joined: Mon Oct 27, 2008 6:21 pm

thanks

Post by chomann »

thank you so much hopefully i can bring some great ships to Oolite and the wiki, my main objective is balance. To simply change and not create is the essence of cheating.

ps. does anybody else want a Firefly ship that actually resembles the show?
"To boldly go where no man has gone before, and drop off my Trumbles." ~ Ashby
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

My very own Serenity? Oh yes please!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
chomann
Above Average
Above Average
Posts: 29
Joined: Mon Oct 27, 2008 6:21 pm

Post by chomann »

DaddyHoggy wrote:
My very own Serenity? Oh yes please!
well it my take some time, but thats because it MUST be perfect!!!
"To boldly go where no man has gone before, and drop off my Trumbles." ~ Ashby
User avatar
chomann
Above Average
Above Average
Posts: 29
Joined: Mon Oct 27, 2008 6:21 pm

trying to leave

Post by chomann »

so im modelling some ships and when i try to leave the station i re dock immediatly why is this is my ship too large too small or are my thrusters pointing me in the wrong direction? thanks
"To boldly go where no man has gone before, and drop off my Trumbles." ~ Ashby
User avatar
Commander McLane
---- E L I T E ----
---- 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: trying to leave

Post by Commander McLane »

chomann wrote:
so im modelling some ships and when i try to leave the station i re dock immediatly why is this is my ship too large too small or are my thrusters pointing me in the wrong direction? thanks
Very strange. You are not by any chance hitting SHIFT-D immediately after F1?!? (No, I don't actually mean that seriously.) :roll:

Thrusters pointing in the wrong direction? Could be. How is your ship orientated in Wings3D (or whatever your modeling software is)? The nose is supposed to be on the positive side of the z-axis. That's how Oolite models work generally (x-axis being right-left (Oolite switches this, though!) and y-axis down-up).
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Just a thought. Have you set a value for

Code: Select all

<key>max_flight_speed</key>
in shipdata. If this is undefined then maybe its at zero. In which case your ship has a top speed of zero. So although its launched, it doesn't leave the launch tunnel. Oolite reads your ship as in the docking port and so redocks you.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

LittleBear wrote:
Just a thought. Have you set a value for

Code: Select all

<key>max_flight_speed</key>
in shipdata. If this is undefined then maybe its at zero. In which case your ship has a top speed of zero. So although its launched, it doesn't leave the launch tunnel. Oolite reads your ship as in the docking port and so redocks you.
Hmmm, I think Oolite doesn't place launching ships inside the docking bay, but rather a little in front of it (and I think setting the distance from the bay is what docking_radius was at least once intended for, although it never seemed to actually do anything).
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I need a quick reminder. I recall in the past reading a tutorial on how to create dockable ships (at least getting the docking bay etc in place and working). Not sure if it was here or the wiki, but I've had a hunt and can't find it.

Anyone know offhand where it is? Just revisiting Aquatics to add a big ship or two (including the much-discussed large hauler, the Conger's big brother, Orca class, and it's support ships).
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Commander McLane wrote:
(and I think setting the distance from the bay is what docking_radius was at least once intended for, although it never seemed to actually do anything)
No. It does it's job very well. Remove the port_radius from the GRS station and you will crash :-)
Thargoid wrote:
I need a quick reminder. I recall in the past reading a tutorial on how to create dockable ships (at least getting the docking bay etc in place and working). Not sure if it was here or the wiki, but I've had a hunt and can't find it.
If I remember right Oolite reckognizes the docking slit in subents
a. by role (docking-slit) and if not found
b. by name, so if 'dock' is used in the entityname it will be handled as docking-slit (griif_spacebar_dockingsection is not the docking-slit but uses the 'dock' in the name)
c. if nothing is found and class = station Oolite will use a standard slit.
The slit itself has to be placed on the z-axis (x and y = 0) and the port_radius is just the depth of the slit.
User avatar
chomann
Above Average
Above Average
Posts: 29
Joined: Mon Oct 27, 2008 6:21 pm

ok

Post by chomann »

ill have to try those things when i get home from work.... :roll:

i do have the custom views set up but im not sure about the values or anything im basically modifying one from a ship that does work.

on a side note when i launch there seems to be a red "wave" that washes over the screen within the docking tunnel...then back to the dock..

also in wings 3d when i measure a length and it says 50.0 that means 50.0 meters right? and Oolite is set in meters right? (ie... docking bay is 64 meters tall)

as for my orientation within wings... I built my ship with tip of nose at 0,0,0. And just as in the brick tutorial i have AIMED my flight path towards the positive Z-axis, with the left pointing towards the positive X-axis and the right side pointed towards the negative X-axis...i also have used wings 3d locations for the thrusters... so if the center of my engine is at (x,y,z,) 10,11,12...then i set my shipdata plist for engine at 10,11,12, and 2.75 2.75 2.75 9the last three being the size of the exhaust right...?

sorry about all the questions...



thanks all...
Last edited by chomann on Fri Oct 31, 2008 2:29 pm, edited 1 time in total.
"To boldly go where no man has gone before, and drop off my Trumbles." ~ Ashby
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: ok

Post by Svengali »

chomann wrote:
as for my orientation within wings... I built my ship with tip of nose at 0,0,0.
No, the middle-point of your ship should be (0,0,0), because it looks a little bit strange if a ship rotates around it's nose and this is probably your docking problem too. If the ship is too long it hangs in the docking-slit - with the result of re-docking :-)
User avatar
chomann
Above Average
Above Average
Posts: 29
Joined: Mon Oct 27, 2008 6:21 pm

Re: ok

Post by chomann »

Svengali wrote:
chomann wrote:
as for my orientation within wings... I built my ship with tip of nose at 0,0,0.
No, the middle-point of your ship should be (0,0,0), because it looks a little bit strange if a ship rotates around it's nose and this is probably your docking problem too. If the ship is too long it hangs in the docking-slit - with the result of re-docking :-)

AHA!!!!!!!!! my ship is 131 meters LONG...thank you so much (no doubt still half way in the station ...lol)

now i may get this thing finished...(serenity ship!)...also i know that my 1.72 can support the higher resolution textures...but i can only export 512x512 from wings3d how do i get the higher resolution option...?

thanks Svengali
"To boldly go where no man has gone before, and drop off my Trumbles." ~ Ashby
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

A few months ago Commander McLane decided to take up a modelling career (we can only hope he shaved his legs first) and started a thread about it, it's full of cool tips about using wings 3d to make ships for oolite, it's sunk a few pages down the forum now though so it may be worth posting the link to it here again
https://bb.oolite.space/viewtopic.php?t=4718

using co-oords in wings to place model subentities:
You can use Wings to get the positions for exhausts, flashers etc by looking up vertex co-ordinates, make sure you 'flip' the X co-ordinate value (the first of the 3 co-ordinate numbers), ie make it a negative value if it's originally a positive value, or make it a positive value if it's originally a negative value
Image
in the pic above, if i wanted a exhaust plume to originate at the highlighted vertex's position in oolite, the co-ordinates in the shipdata.plist would be 1.0 1.0 1.0 and not -1.0 1.0 1.0

exporting a texture template from Wings3d into GIMP (or any other paint program)
1. When you've got your UV's laid out as you wish, right click in the AutoUV: window and select Create Texture.

2. In the Draw options box that appears, set the resolution to something suitable eg 512x512, in the render options, make sure 0: is 'Background' and 1: is 'Draw Edges', 2&3 should both be set to 'None'.

3. Click the Options box for the Background layer, select 'Color' and then click the Color Swatch so we can specify a new background color - leave the RGB and HSV sliders as they are but make sure to slide the the A (alpha) slider all the way down to 0.0 - this will make the background colour transparent. Click OK, then Click OK on the 'Background' box, then finally click OK on the 'Draw Options' box.

4. In the Outliner window there should be a new image at the bottom of the list with a filename probably ending in _auv, click to select then right click on it's name and choose 'Export...' save out the image as a .png

5. Open GIMP and load up your saved image. Open the Layer palette - there should be only 1 layer present called Background. Rename this layer to Template then click the Lock option to stop you being able to paint in this layer.

6. Create a new layer and in the layer palette drag the new layer BELOW the Template Layer (always keep the template layer at the top of the stack, this way you will never obscure the UV outlines so you can see exactly where you need to paint).

7. Select your new layer and begin painting! Once you're ready to save out your final image map, click the Eye icon beside the Template layer to switch off it's visibility so that it doesn't appear in your final texture, then save out your image.

@ Thargoid
I think i've got the tutorial you mean saved on my pc's hard disk. It was in a thread on these boards called "Rotation's Logic" started by Draco_Caeles, but i think it got so old it got automatically deleted.
I've pasted the tutorial (by Aegidian) below

Quick and easy instructions for wings3D.

1. Make a panel on your main model where the dock entrance will be. A rectangle 192x64 is ideal, but you can go bigger - and use different shapes.

2. Assign the special material '_hole_' to the rectangle.

3. While you have it selected make a note of the coordinates of the centre of the rectangle.

4. As a separate model, make a cube then scale it to the dimensions of your rectangle and a depth of 250. So a cube scaled to 192 x 64 x 250.

5. Select the face of the cube facing the same way as your dock entrance in (1.) and assign it the '_hole_' material.

6. While it's selected choose Tools - Center - All from the menu to move that face to the origin.

7. Select the object, and from the right-click menu choose Invert to turn the cube 'inside out'. It should look something like this:
Image

8. Texture your new dock. And convert it to an Oolite .dat model file.

9. Position the new dock as a subentity of the station, at the coordinates you noted down in (3.)

10. You should now be done. You can vary the shape of the dock entrance in stage 1. If you copy and paste the panel into a new model you can even use it to extrude the dock shape.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Griff - Thanks, that's the one I was thinking of. Might be a candidate to put on the wiki maybe?
Post Reply