Page 1 of 2

Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 4:04 pm
by crypto
Greetings fellow Commanders,

I started playing oolite back in 2006 and loved it ever since. I always tweaked some OXP's to my liking, but I never actually build one myself. I wanted to try something simple: Building a new ship.

Some time ago I was watching Battlestar Galactica and my senses went "that's wrong! Where are their shields? Why can they use inertial navigation and flip their ships? No beam/military lasers!?". So I wanted to set things right ^^ Don't get me wrong: I loved the series, but I figured that would be a nice starting point.

I wanted to start with something small - so I build the ship I liked most: A cylon raider. I used wings3d and gimp; I ended up with something acceptable (though I'm not really pleased with it yet). I still have to create the effect maps, but thanks to the really outstanding tutorial Simon B, that should not be a problem. Here are some preliminary screenshots:

Image
Image
Image
Image

However after modelling I was confronted with a new problem: getting that bird into oolite. So far, that did not really work out too well - so I would like to ask for some help.

What I did was the following: I created a CylonRaider.oxp folder in my AddOns directory and created Models, Textures and Config subfolder. I placed the .dat model in the Models folder and the png Texture (external texture) in the Textures subfolder. I then copied the "adder" and "adder-player" entries from the standard shipdata.plist into a shipdata.plist file in the Config folder and replaced all "adder" entries with "cylonraider" ("adder-player" with "cylonraider-player" accordingly). I then grabbed my Commander Jamesons savegame from waaaaaay back and replaced the ship's description with "cylonraider-player".

When I run oolite (1.75.6; amd64) and select the savegame, I get a rotating questionmark (which looks nothing like the raider) and an "OXP not found" entry in the savegames description.

So apparently, simply grabbing a shipdata.plist didn't do it... is there a minimal config around for this sort of testing?

On another point, I am a little uncertain about my models properties. It has roughly 1200 Polygons and uses a 1024x1024 texture. I read somewhere that oolite itself does not impose limits to models, but can I go to this high detail without causing some sort of problem?

Thanks for your help,

crypto

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 4:11 pm
by maik
Hi crypto,

I can't help you with the technical bits, but your ship looks formidable! Oh, and welcome to the friendliest board this side of Riedquat! But you knew this already I guess ;-)

Cheers,
-Maik

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 4:16 pm
by Ironfist
crypto,

It may be a simple as holding the shift key down whilst the program loads, this reloads the cache from the addons folder. If you have already done that then you will need to look at the log and see whether there are any clues as to why this ship is not loading - the question mark indicates that.

Ironfist

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 4:28 pm
by crypto
You guys are fast - immensly-super-witchfuel-injecting-fast... thanks.

maik, thanks for the welcoming. I like this side of Riedquat :)

Ironfist: I already tried reloading the OXPs with no avail. But: In a moment of intellectual omniintelluctality (they come and go, usually not when I need them...) I removed the texture declarations... voila. Of course I have to fix the model a little bit; there's only half of the raider on account that I used a virtual mirror...

In the preview I don't see any smoothed edges... is that normal? I was really trying to go for the organic shapes in the model and the automatic soft edges from wings3d really did a great job. Does the .dat model support that?

Thanks,

crypto

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 5:00 pm
by Ironfist
cryto,

Under Wings3D the option 'freeze' under the 'virtual mirror' menu will result in a complete version of the model, obviously the complete model needs exporting and a new .dat file generated.

Ironfist

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 5:33 pm
by Davidtq
crypto wrote:
You guys are fast - immensly-super-witchfuel-injecting-fast... thanks.

maik, thanks for the welcoming. I like this side of Riedquat :)

Ironfist: I already tried reloading the OXPs with no avail. But: In a moment of intellectual omniintelluctality (they come and go, usually not when I need them...) I removed the texture declarations... voila. Of course I have to fix the model a little bit; there's only half of the raider on account that I used a virtual mirror...

In the preview I don't see any smoothed edges... is that normal? I was really trying to go for the organic shapes in the model and the automatic soft edges from wings3d really did a great job. Does the .dat model support that?

Thanks,

crypto
The only way I know to get smoothing into oolite is to turn off the auto smoothing view in wings3d and select the whole model right click go to the more menu and choose smooth, that will obviously significantly up your poly count, but as far as I can tell the auto smooth thing in wings is just visual and doesnt add anything to the model that oolite can make use of. When I last made ships there were some pretty stringent limits on vertices and faces, but I think Im correct in saying those have been lifted now. It may be worth having both a smoothed and non smoothed version to work for older and newer computers?

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 5:38 pm
by Smivs
Hmmm, looking nice :)
Just a thought, but what size is it...you might be aware the Oolite ships are frickin' ginormous and 'sensible' sized ships are usually too small to see in game. :wink:

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 5:53 pm
by crypto
About size/strength:

I have sized it up to a length of about 18x12x2. That is about twice it's "real" size, as the actual raider has a length of about 8 meters. I am well aware of the fact that even scaled up to this dimension the ship is rather "tiny" for oolite, given that a thargon drone has a length of 7 meter... and we all know how annoying those are to get into the crosshairs.

As soon as I get this working i'll tell you how easy this thing is to shoot ^^ I will probably give this ship rather weak specs to match how easy they break up under fire in the series - if a beast like this gets military shielding or dual front military lasers, it would unbalance the game; at least imho.

On the point of getting it to work:

I have the model in oolite now. As it seems I had a shader definition in the Config file from some previous experimentations. Removing that part made oolite load the model. Now that it's in, I am having problems with the textures. The Obj2DatTex.py script refuses to map the textures into the .dat file. It fails around here (with both errors being shown):

Code: Select all

 if (len(textureForFace) != len(face)):
                okayToWriteTexture = 0
                print "Cannot write textures [len(textureforFace) != len(face)]" /*own debug code*/
        if (len(uvsForFace) != len(face)):
                okayToWriteTexture = 0
                print "Cannot write textures [len(uvsForFace) != len(face)]" /*own debug code*/
If I comment these lines out, oolite only shows textures on isolated faces. I have cleaned my model up and verified that all faces have a texture. There's no revision on the Obj2DatTex.py script, but I'll search for a newer one :)

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 6:05 pm
by Svengali
Davidtq wrote:
crypto wrote:
In the preview I don't see any smoothed edges... is that normal? I was really trying to go for the organic shapes in the model and the automatic soft edges from wings3d really did a great job. Does the .dat model support that?
The only way I know to get smoothing into oolite is to turn off the auto smoothing view in wings3d and select the whole model right click go to the more menu and choose smooth, that will obviously significantly up your poly count, but as far as I can tell the auto smooth thing in wings is just visual and doesnt add anything to the model that oolite can make use of.
No need to use more polys by smoothing the model - use soft edges and convert your models with Obj2DatTexNorm.py. Or use smoothing groups, convert it via Obj2DatTex.py and set smooth = true; in shipdata.plist. Take a look at the [EliteWiki] Remorse of Conscience with its v8 / f12.

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 6:39 pm
by Davidtq
Svengali wrote:
Davidtq wrote:
crypto wrote:
In the preview I don't see any smoothed edges... is that normal? I was really trying to go for the organic shapes in the model and the automatic soft edges from wings3d really did a great job. Does the .dat model support that?
The only way I know to get smoothing into oolite is to turn off the auto smoothing view in wings3d and select the whole model right click go to the more menu and choose smooth, that will obviously significantly up your poly count, but as far as I can tell the auto smooth thing in wings is just visual and doesnt add anything to the model that oolite can make use of.
No need to use more polys by smoothing the model - use soft edges and convert your models with Obj2DatTexNorm.py. Or use smoothing groups, convert it via Obj2DatTex.py and set smooth = true; in shipdata.plist. Take a look at the [EliteWiki] Remorse of Conscience with its v8 / f12.
Sounds interesting, Im not sure smooth was a shipdata option when I last looked at building ships a few years back :D will have to look up how to use that. This is of course what happens when you take a couple of years away from a game thats under constant development...

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 6:42 pm
by Commander McLane
Davidtq wrote:
Sounds interesting, Im not sure smooth was a shipdata option when I last looked at building ships a few years back :D will have to look up how to use that. This is of course what happens when you take a couple of years away from a game thats under constant development...
Smooth is an option since at least Oolite 1.65. However, it didn't always work well. For a long time it made the textures dark as a side effect.

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 7:14 pm
by Davidtq
Commander McLane wrote:
Davidtq wrote:
Sounds interesting, Im not sure smooth was a shipdata option when I last looked at building ships a few years back :D will have to look up how to use that. This is of course what happens when you take a couple of years away from a game thats under constant development...
Smooth is an option since at least Oolite 1.65. However, it didn't always work well. For a long time it made the textures dark as a side effect.
I think the last OXP ships I worked on were dated 2008. at the time no one suggested the smoothing, glad its been brought up here and will now know for if it comes up in the future...

Just tried it on my current project makes a massive difference far closer to the look I envisaged for the ship...

before:-

Image

This is what I added to the shipdata to get it working
<key>smooth</key>
<string>yes</string>
(Im using a different type of plist to whats mentioned on the wiki - I think that form is also outdated but if the OP is modifying other peoples configs he might have the old style plist files so it might be usefull information.

after :-

Image

note:- the extra black lines Ive added between times to give the ship a "used" look to match the fiction that goes with it.

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 7:26 pm
by crypto
First off: both smooth=true and Obj2DatTexNorm.py worked great - I am under the impression that the later did even respect my hard edges. The smooth option is documented in the wiki.

The model is in oolite, texture included. By mirroring the model wings3d messed up some faces which had no material assigned. Unfortunately that only showed up after restarting wings3d... but after fixing those faces the conversion to dat works just peachie :)

I am currently still tweaking the engine plumes and searching for an example for dual front mounted guns... other than that it appears to work fine ^^

I'll continue working on this for the next couple of weeks whenever some spare time happens to materialize itself. Next points on the agenda are:
  • Texturing the weapons.
    Creating Turrets for NPC's (so they can fire 2 front lasers).
    Fine-Tuning the exhaust/weapon positions, views, etc.
    Balancing the specs.
Maybe, if there is to much spare time, just if, maybe, I might continue with a viper/raptor/heavy fighter... I sure would enjoy the view of a basestar and the galactica taking on each other on the edges of some random systems...

Here's a couple of screenshots of what the raider looks ingame at the moment. Suggestions are always welcome.

Image
Image
Image
Image

Thank you all for your wuick and great help ^^

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 7:36 pm
by Davidtq
crypto wrote:

Here's a couple of screenshots of what the raider looks ingame at the moment. Suggestions are always welcome.
A "Scar" variant? :lol:

Very nice ship by the way.

Re: Newcomer needs help with ship design

Posted: Fri Feb 10, 2012 7:49 pm
by Commander McLane
crypto wrote:
Here's a couple of screenshots of what the raider looks ingame at the moment.
Looking good. :D

From the Wings3D captures I'd say that you probably should look into centering your model (if you haven't in the meantime). A non-centered model may look odd when pitching and rolling in-game.