Jump to content

[1.0] KerbPaint - Paint layering for parts (March 30th, 2016) Community Update


Texel

Recommended Posts

Can someone explain how to change the mask a part uses? I made a mask for the standard stock inline mk1 cockpit that should not paint the cockpit glass, but in game the part continues to use baseall_paint.

I can't work out where this comes from. I have looked through all cfgs in the Kerbpaint folder, none mention the part(mk1InlineCockpit), a few mention baseall_paint but all for different parts.

I made my own cfg and put this in it:


@PART[mk1InlineCockpit]
{
MODULE
{
name = ModulePaintable
Texture = mk1InlineCockpit_paint
Shader = BumpSpec
DeepReplace = true
}
}

No dice :(

Additionally, what colors to put into the masks for primary, secondary and tertiary? Is it Red, Green and Blue?

I tried to Google this but I keep ending up on the op of this thread :P

Cheers.

Link to comment
Share on other sites

What I always did was this: take the original texture and extract the regions I want colored into new layers. I then filled the background with black and removed the original layer that I extracted everything out of. I then filled the regions of the other layers that were to be paintable with Red, Green, or Blue for the primary, secondary, and tertiary colors, respectively. I then set the layer modes to "additive" and merged them all on top of each other, and then merged the result onto the black. This created an image that had the three colors, plus the additive colors for overlapping areas of the original texture. For example, a region of the image which would take a value from all three color layers would appear white in the final image. In the end, save as a PNG in the folder where the rest of the masks are kept, rename it to remove the file extension so KSP doesn't load it up itself (KerbPaint does this itself) and then enter it into the config like you've already done. If this is done properly then, in theory, it should work fine.

One thing to look for, however, is that KerbPaint might already have an MM patch that is putting a mask on the part. You may need to seek that out and either replace the mask it references with your own and scrap your own patch, or comment the KerbPaint patch for that part out so it only uses your patch. A third option is to format your patch as follows:

@PART[mk1InlineCockpit]:AFTER[KerbPaint]
{
%MODULE[ModulePaintable]
{
%name = ModulePaintable
%Texture = mk1InlineCockpit_paint
%Shader = BumpSpec
%DeepReplace = true
}
}

This tells the MM patch to replace the module of that name, and all the parameters as well. If any parameters are not found, they will be added. Likewise if the module by that name is not found, it will be added. Finally, the tag at the end of the top line ":AFTER[KerbPaint]" ensures that it runs after any KerbPaint patches have run.

Hopefully, that covers it.

Edited by Gaalidas
Link to comment
Share on other sites

Hey, thanks man!

I managed to get it working! The problem was that mk1InlineCockpit is still named Mark2Cockpit in its config file. Thus MM patches that are aimed at the new name will not be applied to it. I managed to work that out by going through the KSP.log

Your explanation how the mask works is most helpful as well. I assumed this is how it would work but it is nice to have some confirmation.

Additionally, it seems that the masks have to be upside down, not sure why, maybe my dds importer flips the original textures?

Is not a problem though, easy enough to fix.

Thanks again!

Link to comment
Share on other sites

  • 3 weeks later...

For the post that says this doesn't need reviving, that's completely nuts. The mod may well work, but it could certainly use a bit of love on the code side. There are so many ways this could be improved if someone would take the time to take it apart, rebuild it, and give it a fresh new set of features to match the modern KSP modding standards. I'd do it myself, but I could never successfully recompile the source as it is now.

Link to comment
Share on other sites

Does anyone know how to open the GUI? I can't get it to open by pressing P.

You hold P, hover your mouse over the part you want to paint (don't click) and release P. A menu should pop up. Parts that can be painted should be highlighted with a blue texture. Watch out when clicking in the menu, however, if the menu is in front of a part when you click on the menu the part will move.

Link to comment
Share on other sites

You hold P, hover your mouse over the part you want to paint (don't click) and release P. A menu should pop up. Parts that can be painted should be highlighted with a blue texture. Watch out when clicking in the menu, however, if the menu is in front of a part when you click on the menu the part will move.
Ah, okay. :) Thanks!
Link to comment
Share on other sites

windows_x_seven, could you please refrain from packaging MM inside the KerbPaint folder? That's generally considered bad form. Thanks.

If anyone's wondering why the MM thingy under the loading bar looks retarded, that's why. Find the older MM and delete it.

Also, protip: Do your painting in Offset or Rotate mode. That way you don't break things accidentally.

Edited by 0111narwhalz
Link to comment
Share on other sites

  • 2 weeks later...
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...