Jump to content

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


Texel

Recommended Posts

So I have the shaders compiling and made a tool that goes alongside the KSP Part tools to export up-to-date shaders whenever squad updates them. I'll need to do some work to actually get the new shader format running with the mod, but before that, has anyone figured out why the UI doesn't seem to be working with the new KSP? Did the recompiled one posted by @linuxgurugamer resolve that?

Edited by Texel
Link to comment
Share on other sites

3 hours ago, Texel said:

So, licensing wise, I actually had a folder of shader sources I'd indented to distribute with the mod, but because the Part Tools shader sources are 'presumably' property of squad I shouldn't be redistributing modified copies of, I only included the precompiled shaders in the old mod. Whelp, looking at the sources now seeing how bad it would be to update them, turns out to save space (as compiled shaders can be huge) I had "#pragma only_renderers opengl d3d9"

Whoops. 

So essentially, the precompiled shaders appear fine, they are missing some of the new stuff that had been added since (Temperature Color, and Burn Color, for the reentry emissive effects).

I'm at a weird crossroads on how to update the mod though, since I can't distribute sources of Squad's shaders to others to be maintainable and I don't want to leave the community hanging dry for years again. Spending a bit of time seeing how bad it would be to make an add-on for PartTools that patches the shaders.

Ah ... Interesting. Could I have an option to not use such shaders like temperature colour? They look extremely silly with my mod, plus they're a giveaway in future multiplayer where to concentrate fire.

This is a picture from 0.2, still using the Porkjet/Squad wings as ship hull panels. Later I created my own models/texture, switched to KerbPaint and the problem was gone.

gVgkqd2.png

 

But I want to use material based shaders in the future together with Kerbpaint ... And so I'm wondering ... is there a way?

Edited by Azimech
Link to comment
Share on other sites

3 hours ago, Texel said:

So, licensing wise, I actually had a folder of shader sources I'd indented to distribute with the mod, but because the Part Tools shader sources are 'presumably' property of squad I shouldn't be redistributing modified copies of, I only included the precompiled shaders in the old mod. Whelp, looking at the sources now seeing how bad it would be to update them, turns out to save space (as compiled shaders can be huge) I had "#pragma only_renderers opengl d3d9"

Whoops. 

So essentially, the precompiled shaders appear fine, they are missing some of the new stuff that had been added since (Temperature Color, and Burn Color, for the reentry emissive effects).

I'm at a weird crossroads on how to update the mod though, since I can't distribute sources of Squad's shaders to others to be maintainable and I don't want to leave the community hanging dry for years again. Spending a bit of time seeing how bad it would be to make an add-on for PartTools that patches the shaders.

Why not contact Squad and see if they would grant you permission?

Link to comment
Share on other sites

@Azimech

While I intend to keep the temperature colors for Kerbpaint going forward, it's not too bad to make something hide them.
The property exposed is _TemperatureColor, if you use Renderer.PropertyBlock you can override it on a per-renderer basis, as a snippet:
 

var r = GetComponent<Renderer>(); // Get the renderer
var pb = new MaterialPropertyBlock(); // Create a property block
pb.SetColor("_TemperatureColor",Color.black); // Override Temperature Color in our block
r.SetPropertyBlock(pb); // Apply the block


That'll kill the temperature colors for anything. I don't know if KSP uses PropertyBlocks internally, or if they instance materials, if it turns out they do use them internally just get the property block already in use and update it.

@linuxgurugamer

Given I've now made a tool which can update the shaders, it seems best to include a package with the source that lets people update the shaders as KSP updates. Especially since they are not using Unity5's special material setups yet, I suspect 1.1.x or 1.2 will require another shader update.

Link to comment
Share on other sites

1 hour ago, Texel said:

Given I've now made a tool which can update the shaders, it seems best to include a package with the source that lets people update the shaders as KSP updates. Especially since they are not using Unity5's special material setups yet, I suspect 1.1.x or 1.2 will require another shader update.

Ok.

But other than the recompile, I'm not doing development on this (note to other modders)

I don't know anything about shaders, etc, and would prefer to leave this to someone who does.

 

Link to comment
Share on other sites

10 hours ago, Texel said:

So I have the shaders compiling and made a tool that goes alongside the KSP Part tools to export up-to-date shaders whenever squad updates them. I'll need to do some work to actually get the new shader format running with the mod, but before that, has anyone figured out why the UI doesn't seem to be working with the new KSP? Did the recompiled one posted by @linuxgurugamer resolve that?

There is a problem with the code as it is for 1.1 which will cause it to not work.

I'm working on fixing it, will hopefully be able to upload a new DLL soon

Link to comment
Share on other sites

7 hours ago, selfish_meme said:

@Texel Also they completely redid the UI system in 1.1

@linuxgurugamer's dll makes the UI work again

Glad to hear the dll works.

It wasn't a total redo, but certain things were changed, such as the RenderingManager is non-functional and WILL cause problems if used.  That was the problem here, you can read all about the changes in this post:

 

Edited by linuxgurugamer
Link to comment
Share on other sites

I'm so glad it works!

Four small bugs to report:

  • In the editor it paints a whole branch of the tree, even parts without a mask or config entry. In the simulation it's okay.
  • While having painted a part, clicking it's parent makes the colour disappear visually. Clicking the original part again makes the colour return.
  • Landing wheel lights lose transparency in the editor.
  • The first time there was no clicking through the interface, when I got back from the simulation the old habit returned.

laEhHxf.png

8fTnCiq.png

It seems the old bug of removing a part while activated & Kerbpaint losing paint symmetry, is gone.

Edited by Azimech
Link to comment
Share on other sites

12 minutes ago, Azimech said:

I'm so glad it works!

Four small bugs to report:

  • In the editor it paints a whole branch of the tree, in the simulation it's okay.
  • While having painted a part, clicking it's parent makes the colour disappear visually. Clicking the original part again makes the colour return.
  • Landing wheel lights lose transparency in the editor.
  • The first time there was no clicking through the interface, when I got back from the simulation the old habit returned.

laEhHxf.png

8fTnCiq.png

hmmpf, I just get black parts, but it's no problem, I am finishing my 1.05 stuff and waiting for EditorExtensions to make NoOffsetLimits work before I start any building in 1.1

Link to comment
Share on other sites

33 minutes ago, selfish_meme said:

hmmpf, I just get black parts, but it's no problem, I am finishing my 1.05 stuff and waiting for EditorExtensions to make NoOffsetLimits work before I start any building in 1.1

I'd probably install Windows alongside Linux ... but I'm a freak :confused:

Link to comment
Share on other sites

On 5 April 2016 at 11:58 PM, Texel said:

So I have the shaders compiling and made a tool that goes alongside the KSP Part tools to export up-to-date shaders whenever squad updates them. I'll need to do some work to actually get the new shader format running with the mod, but before that, has anyone figured out why the UI doesn't seem to be working with the new KSP? Did the recompiled one posted by @linuxgurugamer resolve that?

Yes @linuxgurugamer's recompiled one does fix the UI issue, might be a bit late on that

Link to comment
Share on other sites

On 4/7/2016 at 6:09 AM, selfish_meme said:

hmmpf, I just get black parts, but it's no problem, I am finishing my 1.05 stuff and waiting for EditorExtensions to make NoOffsetLimits work before I start any building in 1.1

It's working:  https://www.dropbox.com/s/3gy49plks1zzcom/EditorExtensionsRedux-3.2.1.3.zip?dl=0

Untested in Linux, and probably not there based on earlier info.  But a new release came out last night, can you please check it?  I doubt it will work, I just checked the bug report and while it's been assigned, it hasn't been fixed yet

Edited by linuxgurugamer
Link to comment
Share on other sites

3 minutes ago, linuxgurugamer said:

It's working:  https://www.dropbox.com/s/3gy49plks1zzcom/EditorExtensionsRedux-3.2.1.3.zip?dl=0

Untested in Linux, and probably not there based on earlier info.  But a new release came out last night, can you please check it?  I doubt it will work, I just checked the bug report and while it's been assigned, it hasn't been fixed yet

I know I was the earlier info ;) I'll check it again, I also have a macbook I can check it on.

Link to comment
Share on other sites

I'm trying to get my mask working but obviously I'm doing something wrong.

 

Here's the texture as a test on my parts for checking orientation. I want to be able to paint the inside of the hull with a different colour than the outside. The blue strip is for the anti-fouling paint which is common on all ships. By the way, this is 1.0.5. I can't get Unity to run with PartTools in 1.1.

crrpi2r.png

 

Then I placed the mask in the right folder and changed the config file. And this is the result: all layers blend together through the original texture and the location specified is ignored. Changing DeepReplace has no effect.

UwOjE5K.png

 

This is the mask, the layers set to "additive" and vertically flipped.

MSiWdAk.png

 

So ... what am I doing wrong?

 

Edited by Azimech
Link to comment
Share on other sites

36 minutes ago, Azimech said:

I'm trying to get my mask working but obviously I'm doing something wrong.

 

Here's the texture as a test on my parts for checking orientation. I want to be able to paint the inside of the hull with a different colour than the outside. The blue strip is for the anti-fouling paint which is common on all ships. By the way, this is 1.0.5. I can't get Unity to run with PartTools in 1.1.

crrpi2r.png

 

Then I placed the mask in the right folder and changed the config file. And this is the result: all layers blend together through the original texture and the location specified is ignored. Changing DeepReplace has no effect.

UwOjE5K.png

 

This is the mask, the layers set to "additive" and vertically flipped.

MSiWdAk.png

 

So ... what am I doing wrong?

 

What shader are you using, don't use deep replace unless you need too, try different shaders in the config

Link to comment
Share on other sites

1 hour ago, sidfu said:

tried the updated dll seems to work fine. now if we could get a pack of iffernt styles to add beyond the base that wouold be good

Welcome to make your own masks, instructions back a few pages, no one has enough time to maintain too much

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