The player decal shouldn't be too hard to set, but it does vary depending on if you play with the all-in-1 shipset or you if you use a selection of individual ship oxps
all-in-1 shipset:Look inside the Texture folder of the griff_shipset_all_in_1.oxp, there's a png file in there called "griff_player_decal.png", just overwrite this file with a png of own decal, make sure you don't change the filename as the player ships in the oxp will only look for a graphic with this filename
Individual ship downloads:
If you're playing oolite with individual oxp version of these ships, you also need to download and add to oolite the "griff_normalmapped_ship_decals.oxp", it's on page 2 of the list of oxps at my box.net site (link in the first post of this thread).
Once you've installed this oxp, look inside it's textures folder and replace the "griff_player_decal.png" with your own decal artwork (keep the same filename).
Decals need to be at a "power of 2" size, so something like 256x256 or 512x512 pixels work best, there's a post somewhere i made where i explain how to use gimp to cut the decal out from the background using an alpha channel, i'll dig it up and post the link here when i find it, i think it's probably earlier on in this thread.
edit: oh, my megalomania knows no bounds, it's got a thread of it's own!
https://bb.oolite.space/viewtopic.php?t= ... multidecal the decal alpha channel guide is on page 2
If all of the above doesn't apply to your problem and you're asking instead how to size and position a decal on a ship, then it does get a bit more complex - decal positioning and scaling is handled in the shipdata.plist of the ship you're interested in, eg here's the relevant lines from the "griff_normalmapped_adder_player" ship
Code: Select all
Decal1_Scale_and_Position = { type = vector; value = "0.39 0.39 8.5"; };
Decal1_Rotation = { type = "float"; value = 0.0; };
in the Decal1_Scale_and_Position line, the first 2 numbers are the U (horizontal) and V (vertical) positions on the UV map for the center point of the decal, you'll need to convert the ships .dat file back to an obj, then load this into wings and switch to the UV map view in order to see the layout of the UV map, this'll give you an idea of where to position the decal, here's an image of the adder UV map overlaid on top of it's texture - i've drawn a red X at roughly 0.39 0.39 on the map where the decal gets placed (I think the UV 0,0 point is the top left corner of the map)
the 3rd number on this line (in this case 8.5) is the scale of the decal, making this number smaller actually makes the decal bigger when drawn onto the ship!
The Decal1_Rotation = { type = "float"; value = 0.0; }; is simpler to understand, it's just the amount of rotation to apply to the decal, the number is in Radians and can be +ve or -ve
All the shaders in the use code from Ahruman's example shaders, here's the post (and another one a bit further down the page) explaining it's workings
https://bb.oolite.space/viewtopic.php?t= ... c&start=62 if you want to get into the brain melting technical stuff