Jump to content

Mod Request: Paint Your Crafts


Espresso

Recommended Posts

Hi all, I know I've tried to get this going before, but it's been a while since anyone's even prettymuch heard of KerbPaint. For those that don't know, KerbPaint was a mod made by Texel, that would let you paint each part of your craft. I say was, however, as Texel has long since vanished and the mod doesn't work anymore. I was wondering if someone could make a new one from scratch, since Texel is uncontactable. I would request, however, that instead of creating a mask for each part, instead, the mod detects what parts of parts are white, and applies a mask to them, what parts are black, etc. (windows, etc.) but instead of detecting 'just white', detecting which colour is most prevalent, which is second most, and which is third most. This would (hopefully) allow a uniform colour through the whole craft. Maybe apply a white mask to each area first to ensure this? I'm no programmer, so I have no clue how to do this, but it'd be pretty great, as I and many others miss it greatly...

Cheers, Espresso

Edited by Espresso
Forgot to Proofread
Link to comment
Share on other sites

1 minute ago, Galileo said:

I don't think you looked very hard.  I Googled kerbpaint and found this immediately. 

https://github.com/linuxgurugamer/kerbpaint/releases/tag/1.1.3

 

 

@linuxgurugamer I did forget to mention that, I have seen this, but it's only an updated dll, and has caused some confusion for some. It would be good to have a new mod also, as this dll does not fix many of the bugs that were present, and there are many parts without masks, due to the revamps done by SQUAD... My point is, it's half a fix to half a problem. It works to a point, but not too well, on account of issues with the mod, not the updater.

Link to comment
Share on other sites

Just now, linuxgurugamer said:

No, sorry.  I compiled it as a courtesy, but the mod in total cannot be continued because of the license in the original.

 

@linuxgurugamer Actually, it should be me who apologises, as I actually meant to tag Galileo but saw your name in the link and typed it in accidentally. I know you've done all you can, and I thank you, because we'd be worse off without your recompile, I just think someone needs to start from scratch with a new mod and name, to avoid license breaches...

Link to comment
Share on other sites

24 minutes ago, linuxgurugamer said:

the mod in total cannot be continued because of the license in the original.

Not really accurate; the license in the source is pretty clear that derivative works are fine as long as it's clear that it's a derivative and the original work is acknowledged.

Link to comment
Share on other sites

2 minutes ago, Van Disaster said:

I've been working on a replacement for a while as part of a slightly larger project, it'll be a while longer too. Meanwhile Kerbpaint still works, I think?

@Van Disaster Ooh, that sounds good. Do you have a link to a dev thread where we can check it out? I'm interested to see what else you're cooking up. Side note, I do know that these things don't happen overnight, take all the time you need :) Cheers :)

Link to comment
Share on other sites

6 hours ago, stibbons said:

Not really accurate; the license in the source is pretty clear that derivative works are fine as long as it's clear that it's a derivative and the original work is acknowledged.

Yes, but the following makes it not worth it:

Quote

Paint masks for default parts have limited distribution terms as they are derived from stock parts, though I welcome distribution of additional cfgs and masks, just not these.

This means: do not distribute the provided paint masks outside of this forum, if modifying the masks provide clear origin.

Paint masks for mods use textures derived from other mods and are thus subject to additional terms.

 

Link to comment
Share on other sites

11 hours ago, Espresso said:

@Van Disaster Ooh, that sounds good. Do you have a link to a dev thread where we can check it out? I'm interested to see what else you're cooking up. Side note, I do know that these things don't happen overnight, take all the time you need :) Cheers :)

No thread yet - originally it was a mod to let you tint *any* part with a single colour, and then I added optional masks because blending isn't accurate enough so that's some of kerbpaint's territory covered - aside from a decent UI, which I don't know how to do yet :P that's all prototyped & sort-of usable. At that point though adding other things I wanted to do was a bit of a nightmare given what I had was an unplanned proof of concept, so I started over.  Also changing KSP versions...

Vid of original flaky proof of concept:

Spoiler

 

A paintable shader demo which can handle a vast number of separate colour areas ( only 4 in this because I had to use the unity inspector, technical max would be 255 but usably considerably less ) and seperately switchable AO and paint layers.

Spoiler

28354531720_db18330af9_b.jpg

so I have to find the time between more important things to put it all together now, all the hard stuff is proven. The other thing I am trying is inserting a decal - so you wouldn't add a new part, you'd just load an image up & shuffle it around the existing part surface ( note PART surface, not entire craft! ). I've not got the logistic support to test that properly yet, but in theory it's simple, just some basic maths in the shader.

Besides which, kerbpaint still works, so I'm more interested in having support for custom shaders for my own models at the moment. All it would take to add loading support in stock is a couple of lines, but those couple of lines are not there... but of course that wouldn't help control the shader in-game.

OP: I should point out that your idea of detecting *all* colours would be a major pain and either unusably fiddly or not very accurate, so you're probably going to end up with some sort of mask for multiple colours.

Edited by Van Disaster
Link to comment
Share on other sites

6 hours ago, Van Disaster said:

~snip~

@Van Disaster That both sounds and looks awesome, love the POC. Take all the tim you need, but remember to let us know when it's out :wink: Also, I kinda figured the color detection thing would be a pain, but I don't code, so I'll leave that at that, because I have no idea what I'm talking about. Cheers mate

Link to comment
Share on other sites

Colour detection is easier done offline out of the original texture given all you're doing is making a mask anyway & there's no reason to do that in the shader every frame of the game - I guess a mod could autogenerate masks for things it doesn't know about, but all you're doing then is duplicating what a paint package would probably do better & practically all parts stock or modded are either single colour or the areas you're interested in are single colour. My idea was to use stock textures as AO layers given they're practically all grey/black & just ignore any areas with any amount of saturation, given they're likely to be labels or window glass or something - you can see that working in the vid. That's ok to do in the shader because it's really cheap & the alternative is creating a new texture for every part on your craft, and I'm sure people actually like having spare RAM...

Reloading textures at random moments in time involves managing your own assets rather than relying on the game to do it, but that's not really a big deal. That sort of thing goes a long way to making working out-of-game tolerable.

Link to comment
Share on other sites

4 minutes ago, Van Disaster said:

Colour detection is easier done offline out of the original texture given all you're doing is making a mask anyway & there's no reason to do that in the shader every frame of the game - I guess a mod could autogenerate masks for things it doesn't know about, but all you're doing then is duplicating what a paint package would probably do better & practically all parts stock or modded are either single colour or the areas you're interested in are single colour. My idea was to use stock textures as AO layers given they're practically all grey/black & just ignore any areas with any amount of saturation, given they're likely to be labels or window glass or something - you can see that working in the vid. That's ok to do in the shader because it's really cheap & the alternative is creating a new texture for every part on your craft, and I'm sure people actually like having spare RAM...

Reloading textures at random moments in time involves managing your own assets rather than relying on the game to do it, but that's not really a big deal. That sort of thing goes a long way to making working out-of-game tolerable.

Aah, okay, that makes sense. I think your idea probably works better :) 

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