Jump to content

Recoloring stock parts


Recommended Posts

So, I am using TAC Life Support, but all of it's choices for tanks seem terrible to me.

On its thread, a user posted his own tanks, which are basically recolors and rescales of the ClairaLyrae's KSPX 2m half tank.

He also used the stock SAS units and recolored them for the purpose of CO2 scrubbers and Water purifiers.

I liked his idea, since it fits so well with stock. Unfortunately the user does not seem to be active and does not respond to my private messages and also has no other contact details.

I decided to try and recreate his effort from scratch.

However my skills with Blender are limited, and specifically when it comes to texturing they are basically zero.

For reference, here we have the stock tanks the stock tanks(KSPX version used for TAC LS by the user Solestis is the top one):

UkFOoba.png

This is the desired effect - what Solestis did:

LifeSupportRetextured.png

Now, I found out an addon for Blender, which imports and exports mu files to and from Blender.

I found the texture, however after looking at tutorials for 2-3 hours I still can't figure out how to recolor them in Blender.

Exporting them as image would require knowledge in Photoshop for recoloring - since the yellow part itself is a texture that's wrapped around the cylinders on the model, and has some color that's gradually getting darker to the sides.

This is beyond my capabilities so I decided to ask for either one of the following things:

a) Could someone explain step-by-step how to repaint the texture by retaining the original gradient color, map it back just like it is in stock, link it to the model and pack it back in a .mu file.

Or rather, since this is probably asking too much and I am going to get so many answers of "Check these 1236 tutorials":

B) Since for me it seems like an immense amount of effort, but someone skilled in modelling could probably achieve the desired effects for less than an hour, I am willing to offer a case of beer or the national drink Rakia to anyone who could make it.

As far as licensing goes, I know it's permitted to reverse engineer(as in unpack Squad's models) and create something for personal use out of them.

Thanks for your time.

Link to comment
Share on other sites

1. Open your image in GIMP or PS

2. Create new empty layer on top. Make it active.

3. Draw a selection around the coloured part you wish to change.

4. Drag the colour to the new selection / Bucket fill inside the selection.

5. Change the layer mode to "Hue". This will only change the hue though, and that yellow is pastel, so if you use red you'll get pink.

6. To change the darkness, duplicate the top layer.

7. Change the top layer mode to "Darken only".

8. Change the opacity to suit your needs. That will change how dark the colour is.

To use it you'll need to create your mod folder, save your texture there, create a new part config, refer to the model in the squad folder, and refer to the local texture you just created.

MODEL Nodes

In the old system, models were loaded directly from a part config's directory. This is still the case however can be overridden using MODEL config nodes.

MODEL nodes can be used to compile parts containing scaled, translated or rotated models. You can define multiple MODEL nodes to compile multiple models into one part. It also allows you to overload textures on the model.

Parts, Props and InternalSpaces can all use MODEL nodes instead of the traditional same-driectory loading system.

Here is a sample MODEL node showing all valid values


MODEL
{
model = Squad/Parts/Command/cupola/model
position = 0.25, 0.5, 1.0
scale = 2.0, 2.0, 4.0
rotation = 0, 90, 0
parent = anotherModelTransform
texture = model000 , Squad/Parts/Command/landerCabinSmall/model000
texture = oldTextureName , newTextureURL
}

Edited by Cpt. Kipard
Link to comment
Share on other sites

Thank you for the directions.

I managed to export the Advanced SAS texture and I will look into recoloring it later.

However the RCS tank seems to be giving me trouble. Namely - I can't export it's whole texture as an image. There is just no way to do it.

When I view the texture file in Blender it shows the whole texture: https://www.dropbox.com/s/f8g72kuy1vv4r6b/Screenshot%202014-05-04%2020.25.37.png

It also shows something else when I switch the options at the bottom: https://www.dropbox.com/s/cr29036nwd7432u/Screenshot%202014-05-04%2020.25.29.png

And when I export it, this is what I get: https://www.dropbox.com/s/al4jfdgydsjfa8s/Screenshot%202014-05-04%2020.26.27.png

It is as if the texture contains 2 layers, but I don't know how to make Blender export it with those 2 layers, instead of just exporting one.

Otherwise, using your guidance I managed to achieve some reasonable greenish color, by just applying Hue on a new layer in GIMP and then merging it with the old layer(I have no idea why, just think less layers = smaller texture size).

https://www.dropbox.com/s/skikq187mun4zzl/Screenshot%202014-05-04%2020.03.08.png

Link to comment
Share on other sites

You don't need (or use!) Blender to retexture things. You need an image editor, not a modeling program.

Use mbm2png (from spaceport http://kerbalspaceprogram.com/mbm-to-png-file-converter/ ) to convert the mbm to png. Rename it something new. Using the above instructions, make a part that references the old model but points to the new texture. Then edit the new texture in an image editor (GIMP and Paint.Net are both good free tools).

Link to comment
Share on other sites

File size is largely determined by texture complexity and compression; it has nothing to do with layers. When a file with layers is saved as png the layers are merged.

What tank texture is that. I can't find it so I can't experiment.

Link to comment
Share on other sites

Yeah. I managed to export it properly from Blender by disabling something related to Alpha in the export.

Nathan - thank you for this, should make things easier.

However when I export the model000.mbm from this specific part it still gives me only the yellow tube section of the texture.

Edited by smunisto
Link to comment
Share on other sites

Oops, I am falling asleep. Apologies.

Um, I mean that I solved my problems regarding the texture export. It has an alpha layer(channel?) which consists only of the yellow part of the texture, as seen here.

I fixed by disabling "Use Alpha" when exporting it.

I will now just use the exported texture and try my skills in painting to create tank colors and I will create new parts referencing to the old models and new png textures.

Link to comment
Share on other sites

The transparent parts are probably there to make those parts matte with the specular shader. I suspect that if you remove the alpha channel your part will shine a lot more. If I were you I'd create an alpha mask using the original image and reapply it after you've changed the colours.

Link to comment
Share on other sites

  • 2 weeks later...

Also, if you want to save space without making a bajillion new textures for just a color, try this:

1 - Open the texture, also create a blank new texture next to it with whatever software (even ms paint will work, doesn't matter).

2 - Cut from the original texture just a small piece of the color you want to change. Paste it into the new texture and blow it up to full size so it covers the board. Try not to disproportion it, if there's some blank sides, that's fine but try to cover the whole board.

3 - Shrink the new texture down to 64x64 or less. If its just a simple color with no shading, shrink it down to 4x4 and save it.

Now open your Blender (or other mesh editor).

1 - Import the .mu and use the original texture on it so it looks nice and normal.

2 - Edit it and select the faces you want to change the color. It should correspond to what you ripped out of the texture when you did the previous step.

3 - Separate just these faces into their own mesh ("p" in Blender editing mode), but don't move it.

4 - Back in object mode, parent it to the original mesh and give it a simple name, no "_" or "."

5 - Throw the simple color texture onto it (it won't change - yet).

6 - Go back into editing mode and change the UV to target the new texture, it should show up on the list. Scale the UV map accordingly.

7 - Save it.

Now into Unity

1 - Nothing special here, just make sure your meshes are still together (will be if you didn't move it). Make sure each points to the right texture.

2 - Export!

Now into the .cfg

1 - Now make as many copies of the tiny texture file you want. In each, change their colors to what you want and give each one a unique name, like modelBlue, modelPurple.

2 - Use the FStextureSwitch MODULE in your .cfg and set it to switch between the colors of just the separated mesh.

Now you can switch between colors for about 1kb per color (and keep a single catalog object) instead of a whole new 1MB+ texture OR a 1MB+ texture AND a bloaty catalog object.

There's an even less bloatier way to change it using the FSmeshSwitch MODULE, but its slightly more complicated to set up and requires a little unused space on the original texture.

Edited by PolecatEZ
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...