Jump to content

Part of edited textures sometimes render in-game as black


Recommended Posts

Kind of a long story. I wrote a converter to read mbm files and write them as PNGs. I can open and edit these in Paint.net. For instance the stock 2.5 "32" fuel tank. I was wanting to re-skin this for an "empty fuel tank" part.

Now... as long as I only edit within the png file's existing layer, it works fine. But if I add any layers and merge them down and save, when I open the part in the VAB, the body of the tank is black. The ends are still correct, and the rivets and rings, but the body is black.

I'm guessing Paint.net is doing something to the PNG format when it merges layers.

Any ideas?

If it will help I will try to get screenshots.

Link to comment
Share on other sites

I've fooled around with this some more. I'm not sure what I did to get it to work making edits in Paint.net, but I can no longer get it to work at all. Any edit causes some of the part to be rendered as black. With some experimentation (replacing the transparent section of the part with a solid color) I can change what color is rendered.

I decided to try another editor (GIMP). I am now experiencing the same behavior as before. Any edit that involves making use of layers causes the body of the part to rendered as black.

Reading some more around here, I've discovered that KSP will only use a bit value for transparent (e.g. it's either transparent or not, regardless of what is in the alpha channel). So now my theory is that somehow, whatever value is encoded in the alpha channel is being somehow altered by the export from GIMP and now KSP doesn't know what to do with that and punts and uses black.

SO... how do you guys edit your textures?

Link to comment
Share on other sites

You might try Graphic Converter, but its been a while since I've used it. It may open MBMs and as the name implies, may convert it properly to your format of choice.

As to editing textures (and by that I mean texture creation as well as further editing) I use Gimp. Others here will doubtless have their favorite apps. As to how I edit them? I've not encountered your situation before. I'm sure someone else may have something to say on that point.

Link to comment
Share on other sites

It's weird. As long as I don't add any new layers (annoying but workable), it seems to accept my changes with no issues. As soon as I add a new layer, even if I merge it down, the texture somehow changes at a fundamental level so that it displays improperly in KSP.

Link to comment
Share on other sites

I'm not sure what you're telling me to look for, exactly. The alpha channel is rendered in the checkerboard pattern, but also appears to have a mask (in black) on the areas where there are visible texture. It looks like this in either case (new layers added or not).

Or are you asking me to look at some property of the alpha channel itself?

Link to comment
Share on other sites

Part of it is transparent (checkerboard). But part of it is black. The black part appears to be a mask for the visible areas of the texture. But this is true for parts that render correctly as well as those that do not.

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