Jump to content

Part Painting Option, Need Help


Espresso

Recommended Posts

Hi all,

I would just like to request a mod to allow me to paint my parts. I know kerbpaint does exactly what I want, but, frankly, it's old and outdated, with no-one updating the actual plugin. It is also now incredible buggy. I'm thinking chances are the next release will break it. To all Kerbpaint fans, of whom I once was, I also speak for you. The mod Is too old to work reliably. Below I have some points of what I would like in the new Kerbpaint (Or whatever we call it):

-Ability to create a preset, to quickly apply colours to parts and a custom colour bar.

-A button (Or shortcut) to paint all parts, and a reset all button.

-Not the ability to paint in flight (Unless with a part? Makes it more realistic)

-The ability to automatically make mod parts paintable, but only if it's possible.

-Make sure all parts painted the same colour are painted the same colour. (Possibly wipe the texture where paint is to be applied before it is painted, but if unpainted, restore it)

-Look in the original Kerbpaint thread for inspiration if need be. You can find it here:http://forum.kerbalspaceprogram.com/threads/50008-0-23-KerbPaint-Paint-layering-for-parts-%28September-23rd%29-%28Same-Old-Still-Works%21%29 I'll post a link back to this thread there as well.

Please let me know if any of these requests are unreasonable, I have no programming experience, and don't know the difficulty of something like this, however, I know many people will be appreciative of any effort made. It might be easier to have many people working on this, or bring it to the attention of SQUAD, so maybe they'll add the feature to the stock game. Then, there wouldn't be a need to make mods auto compatible, they'd be paintable too! Again, thanks on behalf of all Kerbpaint fans, and myself for any effort made to fulfil this request, wanted by many. Also, I know you've always wanted your lander to be painted bright pink, just for laughs. Or was that just me... Maybe another fluro colour? No?

Link to comment
Share on other sites

Shocked to see there is still interest in this, but to spell out some of the issues with the mod and address Espresso's issues:

First off, Kerbpaint worked by trying to find the associated renderers for a part, which atleast given the time of it's writing, wasn't particularly trivial. Internally, Kerbal Space Program didn't seem to be tracking what renderer objects were associated to certain parts, which is reflected in the highlighting behaviour- when a part was highlit by KSP, the game either lights only the direct renderer on the part object (for small parts, fuel storage, etc, this is fine) but doesn't properly highlight more complex, multiple renderer parts such as cargo bays and landing gears. For occasions when it does highlight them, it highlights everything hierarchically below the part in question, such as for selecting and dragging whole groups of parts.

The short of this was, ultimately, I couldn't isolate on a per-part basis what was actually being colored. This lead to a number of issues, most noticably paint being inconsistent based on load order, landing gears or other non-colorable parts being colorable if child to a recursively colorable part, and a generally unpleasant experience with cruxes of unavoidable issues (Like particle effects having shaders swapped conditionally, symmetry breaks on docked ships, etc). Until that is resolved I'm probably not going to be updating Kerbpaint, as it wouldn't be possible to resolve it in a featurecomplete way.

That said, addressing Espresso's points:

-Ability to create a preset, to quickly apply colours to parts and a custom colour bar.

Doable, but presets were rather dodgy as a whole. Quality recoloring is actually a Set Hue, Multiply Value, Shift Saturation, so the reference colors provided in presets were entirely irrespective of what they would actually do (Hence why, for instance, orange fueltanks recolour in dodgy ways, that still look good, but obviously not the implied result)

-A button (Or shortcut) to paint all parts, and a reset all button.

Presumably fairly easy. Under the hood, it's just module manager adding a component to parts that KerbPaint then looks for. Only difficulty I can think of is making sure that you only grab parts from a given vessel.

-Not the ability to paint in flight (Unless with a part? Makes it more realistic)

Again, what dictates the paint is strictly the component on the part, it's been a while since I've looked but that should be fairly straightfoward.

-The ability to automatically make mod parts paintable, but only if it's possible.

I'm not sure how to do this one. Kerbpaint is a component on a part, as such, you'd need some way of adding it to all parts, which may have unintended effects. Additionally without paint masks, the recoloring wouldn't be particularly meaningful, at that point your almost better off just multiplying the color on an object, which can be done much more easily (I think material.color works with KSP's default shaders, for example)

-Make sure all parts painted the same colour are painted the same colour. (Possibly wipe the texture where paint is to be applied before it is painted, but if unpainted, restore it)

The recoloring method is one I developed with my professional work, based on Setting Hue, Multiplying Value, and Shifting Saturation. It's main advantage is, it always looks pretty good and provides quality recoloring without banding or artefacting, or the typical darkening of multiplicative methods (It's close to how the color blend in photoshop works) - The caveat to this, is you can't set the color of a thing (Would end up with just a big, flat colored texture then), and there ultimately is not a good way around this. Ideally, if a feature like Kerbpaint were integrated into the base game, it would do all major coloring and base textures would be authored accordingly.

If anyone is seriously interested in continuing the project, the shader sources were not included in KerbPaint, and while I'm doubtful as to how much the community would understand them, I'll happily provide the old sources and answer questions to my implementation on request.

Link to comment
Share on other sites

Hi guys.

Posting here because I'm also interested in this mod, even if I did remove it because of its bugs (I posted on the official thread some times ago).

The ability to paint parts -I think- would now be extremely apreciated in the community, given the mod is not too buggy.

Also because I just had an approximate idea on how you could automatically make mod parts paintable (I'm no coder, but I know some basics) :

I think for that you'd have to make an external .dll that:

- analyzes the color ranges on a part's texture,

- replaces the 3 major color ranges (I'd say white, black and red-orange-yellow ?), leaving the rest transparent.

- generates a color map based on these.

Also, on the same -or another- .dll (my knowledge would stop here :P):

- roughly analyzing the unity model,

- defining which setting to apply to each one,

- generate the text to add to .cfg

Wouldn't that be possible ?

Edited by Klakh
Link to comment
Share on other sites

  • 1 month later...
Texel was going to update it, but I don't know where that went...

My understanding from his last post above is that he would be willing to give over all the source files for someone to take over the mod, not that he would continue it on his own. Anyways, I hope we see something soon, as a new player I was totally awed by some of the ships pictured in the KerbPaint mod post.

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...