Page 10 of 13

Re: Skinner’s Den

Posted: Mon Sep 14, 2015 11:45 pm
by Fritz
I found my stupid mistake: My shipdata.plist is in XML format, and I copied the material part of the original shipdata.plist which is in OpenStep. I don't even know why I used XML because I normally would have based my modified Python on the original shipdata.plist. And I definitely wasn't drunk because I don't drink alcohol! :lol:

I wonder which of the two formats should be used. Will one be dropped in a future version of Oolite?

Re: Skinner’s Den

Posted: Tue Sep 15, 2015 12:09 am
by Diziet Sma
XML is deprecated, but unlikely to be dropped.. too many older OXPs rely on it.

Either should work, though.. so I'm inclined to think that the problem is more that Oolite was using its old cache. (To speed up startup times Oolite builds a data cache when first run,which it rebuilds when it detects that OXPs have been added or removed. It does not detect when an existing OXP file has been edited, though. After editing an existing file, you need to force rebuilding of the cache, either by holding down the shift key until you see the spinning Cobra when starting, or by setting/adding always-flush-cache = YES in .GNUstepDefaults.

Edit: sorry.. on first reading I missed the fact that you'd mixed both together in the same file.. yes, that would definitely confuse Oolite!

Re: Skinner’s Den

Posted: Tue Sep 15, 2015 12:22 am
by Fritz
Ok, then I'll convert the file to OpenStep.

And yes, I mixed it in one file and even in one ship entry!

Re: Skinner’s Den

Posted: Tue Sep 15, 2015 12:47 am
by Fritz
And now everything works, including my modified texture. :) Thank you for helping!

Re: Skinner’s Den

Posted: Thu Oct 01, 2015 12:54 am
by Fritz
As a software developer I'm used to keep things as short as possible. So I'm wondering if it is possible to have two or more randomly assigned colour schemes (= textures) for one ship type, i.e. one entry in shipdata.plist? I assume that assigning a texture during object creation (spawning) is too late.

A related question is if there is some way to give a ship an individual name, number, and/or logo "painted" on the hull without having to create a completely new texture.

Re: Skinner’s Den

Posted: Thu Oct 01, 2015 10:15 am
by another_commander
Fritz wrote:
As a software developer I'm used to keep things as short as possible. So I'm wondering if it is possible to have two or more randomly assigned colour schemes (= textures) for one ship type, i.e. one entry in shipdata.plist? I assume that assigning a texture during object creation (spawning) is too late.

A related question is if there is some way to give a ship an individual name, number, and/or logo "painted" on the hull without having to create a completely new texture.
Check out the Materials section in the wiki, the materials used in the core shipdata.plist and Griff's normal-mapped ships. I believe all that you will need can be found in there, but for the full described set you will have to employ shaders. Sorry for not being more specific, I am writing this from an i-cafe and can't dig for information as I'd like to.

Edit: Frame had also made a Ship Registration ID OXP using shaders a long time ago. Check this:
https://bb.oolite.space/viewtopic.php?t=7579

Re: Skinner’s Den

Posted: Thu Oct 01, 2015 11:14 am
by Norby
Fritz wrote:
it is possible to have two or more randomly assigned colour schemes (= textures) for one ship type, i.e. one entry in shipdata.plist?
There is a way without shaders: you can replace the whole content of materials field calling setMaterials() even right in the shipSpawned event handler (it is not too late). Respray for Griffs use the same function.

Re: Skinner’s Den

Posted: Thu Oct 01, 2015 11:42 am
by Smivs
You can even do this 'on the fly'. Take a look at Aliens which has two ships which change texture under certain conditions.
Also The Classic Ships has multiple variants using the same model etc with different textures, and it also uses the set_materials script method when the ships go derelict to kill the lights and engine glow, and to produce the alternating/flashing red and green colours of the Thargoid warship.

Re: Skinner’s Den

Posted: Thu Oct 01, 2015 8:44 pm
by Rorschachhamster
Norby wrote:
...setMaterials() even right in the shipSpawned event handler (it is not too late). Respray for Griffs use the same function.
:shock: This is a new function, isn't it? I really would like to have known that... :D

Re: Skinner’s Den

Posted: Thu Oct 01, 2015 11:33 pm
by Fritz
That sounds good! What I'm trying to do is to create a fleet of "company freighters", each with their distinct company livery and a distinct naming scheme (like the big container ships in the real world). So, for example, a Boa would have randomly either the standard texture or one of my company variants.

I am a little confused about the different ship sets: I'm using and modifying the "default" set that came with version 1.82, and they use shaders, don't they? There also is a "classic" ship set (more like the original Elite models), and I'm often reading of "Griff's normal-mapped ships". Griff seems to be the maker of many (or all?) of the default ships too. But he also has variants that seem to come in one or more OXPs. And then there are two different Python variants in the standard ship set... :?

Re: Skinner’s Den

Posted: Thu Oct 01, 2015 11:56 pm
by Smivs
Fritz wrote:
I am a little confused about the different ship sets: I'm using and modifying the "default" set that came with version 1.82, and they use shaders, don't they? There also is a "classic" ship set (more like the original Elite models), and I'm often reading of "Griff's normal-mapped ships". Griff seems to be the maker of many (or all?) of the default ships too. But he also has variants that seem to come in one or more OXPs. And then there are two different Python variants in the standard ship set... :?
The default set for v1.80 + are modeled by Griff with textures by Capt. Solo. These were originally made as an OXP for those wanting Griff's ships but who didn't have Shaders. So the default ships do not use Shaders. Griff's Normalmapped ships use the same models but do use shaders.
The Classic Ships use the original Oolite shipset models which are based on the original Elite ships. These original models were a bit un-inspiring so were replaced in v1.80. The Classic Ships OXP adds gun and engine sub-entities to them to improve the styling, and has fully up-to-date graphics (based on the original texture designs) which use diffuse, emission, normal and specular mapping to bring them alive. Many of these features require a shader-capable computer, but they still look pretty good on low-end machines.
The default Python has three variants, the Player/Trader, an 'alternate' (trader) and the Blackdog pirate version.
I hope this helps to clear things up.

Re: Skinner’s Den

Posted: Fri Oct 02, 2015 12:13 am
by Fritz
Smivs wrote:
I hope this helps to clear things up.
Yes, I think so. Thank you!
The default Python has three variants, the Player/Trader, an 'alternate' (trader) and the Blackdog pirate version.
There are other ships hat have different variants, but as far I've seen only the Python comes with two completely different models. So strictly speaking there are two different ship types called Python in the Ooniverse! The player/trader version - the version I'm tinkering with - looks more like the classic python than the pirate version. So for me it's the real Python, and the other one is an unlicensed rebuild to the same specifications that would never be used by reputable companies! :wink:

Re: Skinner’s Den

Posted: Fri Oct 02, 2015 12:29 am
by Smivs
Fritz wrote:
There are other ships hat have different variants, but as far I've seen only the Python comes with two completely different models.
That's news to me, but I'm not too familiar with the current default set so that could be the case. Back in the day there was just one.

Re: Skinner’s Den

Posted: Fri Oct 02, 2015 12:35 am
by Cody
Smivs wrote:
That's news to me, but I'm not too familiar with the current default set so that could be the case. Back in the day there was just one.
Only one Python model in the current core set - the Blackdog variant has a different diffuse map (I think) and two escort fighters, is all.

Re: Skinner’s Den

Posted: Fri Oct 02, 2015 12:39 am
by Fritz
pirate/blackdog:
Image
trader/player:
Image
These pictures come from the wiki. The textures in the core game are different, e.g. no stars on the trader/player version. The main technical difference is that the upper version has its two engines arranged one above the other, while the "real" Python has them next to each other.