Page 1 of 5

Decals and Nose art.

Posted: Mon Feb 26, 2018 3:19 am
by BlackWolf
This topic was discussed in another thread between myself and montana05 and thought I'd post it here.
Something else I could do for the game and mod makers is design decals or nose art to be added to ships.
I was also wondering if it would be possible to craft a oxz that would allow players to purchase and add said art to their ships.
Thoughts?

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 5:09 am
by DataPacRat
BlackWolf wrote: Mon Feb 26, 2018 3:19 am
This topic was discussed in another thread between myself and montana05 and thought I'd post it here.
Something else I could do for the game and mod makers is design decals or nose art to be added to ships.
I was also wondering if it would be possible to craft a oxz that would allow players to purchase and add said art to their ships.
Thoughts?
In a recent OXP-digging binge, I recall seeing one that did something involving adding visible ID numbers to ship's hulls; I'm afraid I don't remember the name, but if somebody can find it, that might be usable as the basis for other ship decorating.

Other than that - I wouldn't mind being able to spraypaint my board avatar onto my Oolite hulls. :)

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 5:14 am
by BlackWolf
There is also one that displays battle damage. So in theory, it should be possible.

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 8:35 am
by spara
Won't be easy. There's practically no way of generically adding stickers to ships. Griff's normalmapped ships use a custom shader to add and position decals. Aforementioned oxps also require specific models to work.

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 1:49 pm
by Diziet Sma
spara wrote: Mon Feb 26, 2018 8:35 am
There's practically no way of generically adding stickers to ships.

Which makes me wonder if this is something that might be able to be incorporated via the core game code? I'd imagine it would be one hell of a popular feature. I'd like to see what the devs think of this idea.

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 1:52 pm
by Cody
Diziet Sma wrote: Mon Feb 26, 2018 1:49 pm
I'd like to see what the devs think of this idea.
<watches devs run for cover>

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 3:32 pm
by spara
Diziet Sma wrote: Mon Feb 26, 2018 1:49 pm
spara wrote: Mon Feb 26, 2018 8:35 am
There's practically no way of generically adding stickers to ships.

Which makes me wonder if this is something that might be able to be incorporated via the core game code? I'd imagine it would be one hell of a popular feature. I'd like to see what the devs think of this idea.
Let's brainstorm a bit. How would it work?

There needs to be a way to define decals position and orientation per model. Probably best to do in shipdata as coordinates and rotation on the diffusion map. And these would need to be defined for all models.

The decal itself would probably need some materials entry (probably with aforementioned position and orientation and possibly alpha), but it would also need a js-function to swap it. Like changing materials, but only one element of materials.

And to actually "paint" the decal to the ship needs someone with proper shader skills to modify the default shader.

So, a core change and the default shader change are required?

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 4:02 pm
by Stormrider
spara wrote: Mon Feb 26, 2018 8:35 am
Griff's normalmapped ships use a custom shader to add and position decals. Aforementioned oxps also require specific models to work.
Seems like it might be possible to do this with ships that already have decal positions defined. Could setShaders be used to change the decal on the player's ship?
This would at least allow the player to choose a decal for a core ship, perhaps even oxp ships with decal positions defined as well.
BlackWolf wrote:
I was also wondering if it would be possible to craft a oxz that would allow players to purchase and add said art to their ships.
It would be cool if you did an NPC decal set, at least for the core ships.
Nice work by the way and thanks for sharing.
DataPacRat wrote:
Other than that - I wouldn't mind being able to spraypaint my board avatar onto my Oolite hulls.
You can do this with Griff's ships manually by replacing the griff_decals_player.png in the Oolite.oxp.Griff.Griff_shipset_decals.oxz with your own image that's the same size.

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 4:16 pm
by Commander_X
spara wrote: Mon Feb 26, 2018 3:32 pm
So, a core change and the default shader change are required?
I don't think a core change will be needed, Griff's ships standing as a proof. The changes he's done could be extended to all the core ships. Some of his functions can actually be extracted as shader libraries.
An OXZ could deal with this, but I guess the most challenging part for an OXZ would be allowing for customizing the decals. It would be great to have an "extension" for OXZs to allow for resources to be used outside the archive, and avoid messing with OXZ unzip/re-zip.
Maybe a sort of "template" OXP could help here.

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 4:22 pm
by spara
Stormrider wrote: Mon Feb 26, 2018 4:02 pm
spara wrote: Mon Feb 26, 2018 8:35 am
Griff's normalmapped ships use a custom shader to add and position decals. Aforementioned oxps also require specific models to work.
Seems like it might be possible to do this with ships that already have decal positions defined. Could setShaders be used to change the decal on the player's ship?
This would at least allow the player to choose a decal for a core ship, perhaps even oxp ships with decal positions defined as well.
e.
That would indeed work for example Griff's normalmapped player ships. The decal file is defined as part of the shader definition. To make this idea work with those ships, probably all that is needed is to write a script that sets the shader with setShaders and simply changes that one file name.

Interesting idea actually. Could it be that simple? :)

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 4:24 pm
by spara
Commander_X wrote: Mon Feb 26, 2018 4:16 pm
spara wrote: Mon Feb 26, 2018 3:32 pm
So, a core change and the default shader change are required?
I don't think a core change will be needed, Griff's ships standing as a proof. The changes he's done could be extended to all the core ships. Some of his functions can actually be extracted as shader libraries.
An OXZ could deal with this, but I guess the most challenging part for an OXZ would be allowing for customizing the decals. It would be great to have an "extension" for OXZs to allow for resources to be used outside the archive, and avoid messing with OXZ unzip/re-zip.
Maybe a sort of "template" OXP could help here.
A generic solution would probably need a core change, at least the core shader change. But with Griff's normalmapped ships, the work is halfway done.

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 4:32 pm
by Commander_X
spara wrote: Mon Feb 26, 2018 4:24 pm
A generic solution would probably need a core change, at least the core shader change. But with Griff's normalmapped ships, the work is halfway done.
True.
<notes to himself that core changes apply to Resource folder too, not only to src folder/>

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 4:37 pm
by Cody
Gotta love custom decals!

Image

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 5:04 pm
by Sailsman63
I'm almost certain that there used to be an OXP that did this, but can't find it right now.

If @Cody is referring to one, he didn't link it.

It was fairly capable, to the point that a skilled pilot could etch their initials in an NPC ship's hull with the laser...

Re: Decals and Nose art.

Posted: Mon Feb 26, 2018 5:09 pm
by Cody
No, that's Griff's Cobra. Not the ship I fly, though - Spindrifter is one of Griff's late-model Cobras with four decals.