Oolite Bulletins

For information and discussion about Oolite.
It is currently Sun Aug 19, 2018 9:10 pm

All times are UTC




Post new topic  Reply to topic  [ 67 posts ]  Go to page Previous 1 2 3 4 5 Next
Author Message
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 5:31 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5206
Many moons ago, Frame did a Ship Registration ID OXP, which was using shaders for applying decal IDs on ships. It's still here: http://www.aegidian.org/bb/viewtopic.php?t=7579 and here: http://wiki.alioth.net/index.php/RegistrationID

However, this was done using the pre-1.80 ship set, so it probably won't work with the newer versions. It could still give an idea of how something like custom decals could be done, though.


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 5:51 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2528
Location: Finland
Well. It is possible to change Griff's decals on the fly via script... 8)

Image

Could not get the spinning ship in the station interface to change decal though. It's probably handled some how differently.


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 5:54 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2528
Location: Finland
And if some one is interested in exploring this further, this is the script I used:
Code:
this._changeDecal = function() {
  var shader = player.ship.getShaders();
  shader.Hull.textures[3] = "spara_decal.png";
  player.ship.setShaders(shader);
}


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 5:57 pm 
Offline
Deadly
Deadly
User avatar

Joined: Thu Feb 15, 2018 9:30 am
Posts: 211
Location: Texas
So jealous of all you script writers and coders. lol
All I can contribute is art.

_________________
Creativity is a gift, use it well.


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 6:08 pm 
Offline
Dangerous
Dangerous
User avatar

Joined: Sun Feb 18, 2018 12:21 pm
Posts: 73
Location: Niagara, Canada
Quote:
And if some one is interested in exploring this further, this is the script I used:
Code:
this._changeDecal = function() {
  var shader = player.ship.getShaders();
  shader.Hull.textures[3] = "spara_decal.png";
  player.ship.setShaders(shader);
}
I'm just starting to experiment with Griff's models (my memory is that my laptop can't handle them, but I've got Griff's Cobra3 installed, and the spinning startup model seems to be working); but I'm getting them through the Expansions Manager, which installs them into the software directory, which I need to start fiddling with root access to modify.

How much more than this script would be required to make a quickie OXP, in the ~/.Oolite/Addons directory, where I can toss my preferred image into?

_________________
Thank you for your time,
--
DataPacRat
"Does aₘᵢₙ=2c²/Θ ? I don't know, but wouldn't it be fascinating if it were?"


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 6:19 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2528
Location: Finland
Quote:
Quote:
And if some one is interested in exploring this further, this is the script I used:
Code:
this._changeDecal = function() {
  var shader = player.ship.getShaders();
  shader.Hull.textures[3] = "spara_decal.png";
  player.ship.setShaders(shader);
}
I'm just starting to experiment with Griff's models (my memory is that my laptop can't handle them, but I've got Griff's Cobra3 installed, and the spinning startup model seems to be working); but I'm getting them through the Expansions Manager, which installs them into the software directory, which I need to start fiddling with root access to modify.

How much more than this script would be required to make a quickie OXP, in the ~/.Oolite/Addons directory, where I can toss my preferred image into?
Here's my quick test-oxp. Uncompress to AddOns, start the Debug console and Oolite, start a game with Griff's normal mapped Cobra, launch and execute worldScripts["change_decal"]._changeDecal(); in the console.

https://app.box.com/s/rmhvgrsvdvarh6snupitda5eer6utdva


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 6:30 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 210
Quote:
How much more than this script would be required to make a quickie OXP, in the ~/.Oolite/Addons directory, where I can toss my preferred image into?
You can always make an OXP out of an OXZ by:
1. move the OXZ away from the ManagedAddOns folder
2. Expand (extract, unzip) the OXZ in an corresponding named folder with the extension oxp under ~/.Oolite/AddOns (e.g. MyMod.oxz will be dumped in ~/.Oolite/AddOns/MyMod.oxp)
3. Tweak the content under the oxp folder
These steps must be taken without having Oolite started.
Various tweaks at 3. might require you to restart Oolite with Shift key pressed, to regenerate the cache file, and enjoy (YMMV ;) ) the changes.


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 6:36 pm 
Offline
Dangerous
Dangerous
User avatar

Joined: Sun Feb 18, 2018 12:21 pm
Posts: 73
Location: Niagara, Canada
Quote:
Quote:
Quote:
And if some one is interested in exploring this further, this is the script I used:
Code:
this._changeDecal = function() {
  var shader = player.ship.getShaders();
  shader.Hull.textures[3] = "spara_decal.png";
  player.ship.setShaders(shader);
}
I'm just starting to experiment with Griff's models (my memory is that my laptop can't handle them, but I've got Griff's Cobra3 installed, and the spinning startup model seems to be working); but I'm getting them through the Expansions Manager, which installs them into the software directory, which I need to start fiddling with root access to modify.

How much more than this script would be required to make a quickie OXP, in the ~/.Oolite/Addons directory, where I can toss my preferred image into?
Here's my quick test-oxp. Uncompress to AddOns, start the Debug console and Oolite, start a game with Griff's normal mapped Cobra, launch and execute worldScripts["change_decal"]._changeDecal(); in the console.

https://app.box.com/s/rmhvgrsvdvarh6snupitda5eer6utdva
Welp, looks like I've got more fiddling to do to get it to work:
Code:
Exception: TypeError: shader.Hull is undefined
    Active script: oolite-debug-console 1.86
    script.js, line 6:
      log("test", shader.Hull.textures);
(For the moment, I think I'll just spend some time downloading all the rest of the Griff retextures while reading some fiction.)

_________________
Thank you for your time,
--
DataPacRat
"Does aₘᵢₙ=2c²/Θ ? I don't know, but wouldn't it be fascinating if it were?"


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 6:55 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2528
Location: Finland
Yep, Griff's normalmapped ships are required. At least Cobra III, I suppose.


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 7:39 pm 
Offline
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 13317
Location: Corke's Drift
No decals on Griff's Moray though - that has amazing squid-like hull effects instead. Get up-close to one and annoy it.

_________________
We pray for one last landing
On the globe that gave us birth
Let us rest our eyes on the fleecy skies
And the cool, green hills of Earth


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 7:51 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2528
Location: Finland
The thing that does not work with this method, are mission screens that show player ship as well as the spinning ship on status screen. In theory by jumping tricky hoops, one might be able to catch mission screens that show player ship and manipulate that, but I have no idea how to script the spinning ship on status screen.

In short, this method would need some core changes to catch those manifestations of the player ship.

As far as I can seen, the only all around solution currently would be defining as many different player ships as there are decals and instead of changing the decal, one changes the ship. That would be overkill for such a small feature though.

If only there was a way to access some missionvariable or worldscript from a shader...


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 7:57 pm 
Offline
Dangerous
Dangerous
User avatar

Joined: Sun Feb 18, 2018 12:21 pm
Posts: 73
Location: Niagara, Canada
Quote:
Quote:
Quote:


I'm just starting to experiment with Griff's models (my memory is that my laptop can't handle them, but I've got Griff's Cobra3 installed, and the spinning startup model seems to be working); but I'm getting them through the Expansions Manager, which installs them into the software directory, which I need to start fiddling with root access to modify.

How much more than this script would be required to make a quickie OXP, in the ~/.Oolite/Addons directory, where I can toss my preferred image into?
Here's my quick test-oxp. Uncompress to AddOns, start the Debug console and Oolite, start a game with Griff's normal mapped Cobra, launch and execute worldScripts["change_decal"]._changeDecal(); in the console.

https://app.box.com/s/rmhvgrsvdvarh6snupitda5eer6utdva
Welp, looks like I've got more fiddling to do to get it to work:
Code:
Exception: TypeError: shader.Hull is undefined
    Active script: oolite-debug-console 1.86
    script.js, line 6:
      log("test", shader.Hull.textures);
(For the moment, I think I'll just spend some time downloading all the rest of the Griff retextures while reading some fiction.)
And I've now got the full set of Griff's textures, have gotten a Cobra 3 with one of the gs resprays, launched, ran worldScripts["change_decal"]._changeDecal(); in the debug console... and got the exact same error message in the debug console.

For all I know, it might be a video-hardware thing; I'm running on a Thinkpad T410 with a NVIDIA Quadro NVS 3100M, if that means anything to anyone here.

_________________
Thank you for your time,
--
DataPacRat
"Does aₘᵢₙ=2c²/Θ ? I don't know, but wouldn't it be fascinating if it were?"


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 8:16 pm 
Offline
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 13317
Location: Corke's Drift
There's a line in the Latest.log that'll tell you whether shaders are supported.

_________________
We pray for one last landing
On the globe that gave us birth
Let us rest our eyes on the fleecy skies
And the cool, green hills of Earth


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 8:37 pm 
Offline
Dangerous
Dangerous
User avatar

Joined: Sun Feb 18, 2018 12:21 pm
Posts: 73
Location: Niagara, Canada
Quote:
There's a line in the Latest.log that'll tell you whether shaders are supported.
Do you mean 02:07:27.329 [rendering.opengl.shader.support]: Shaders are supported.? (Via.)

_________________
Thank you for your time,
--
DataPacRat
"Does aₘᵢₙ=2c²/Θ ? I don't know, but wouldn't it be fascinating if it were?"


Top
   
 Post subject: Re: Decals and Nose art.
PostPosted: Mon Feb 26, 2018 8:52 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2528
Location: Finland
After installing Griff's normalmapped ships, does the spinning Cobra at the welcome screen have a decal? The one with the comic style skull.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 67 posts ]  Go to page Previous 1 2 3 4 5 Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited