Jump to content

White outline around custom character textures.


mouse

Recommended Posts

Forgive me if this has already been answered but I'm trying to make a custom character and I ran into a snag when it comes to the in game character texture. There's a weird outline around the character but only when zoomed out. When I zoom all the way in, it's like it's absorbed into the character.

Zoomed in:

post-239075-0-26485900-1397677272_thumb.

Zoomed out:

post-239075-0-68744600-1397677298_thumb.

I'm doing this all on Linux and since the DS mod tools for Linux are limited to only the mod uploader, I have to use a some what unorthodoxed method for making anything texture related. In this case, I used the anim/wilson.zip file as a template. I used a build renamer to change the build file then used Simplex's ktech tex<->png converter to convert it to png. Then used gimp to edit it and ktech to convert it back to the tex format and put it back into the zip file. I've used this method for making new items before and it's never been a problem but for some reason it's doing it with the character texture.

Can anyone help me out?

Link to comment
Share on other sites

I really don't know why that would happen.  The only thing I can suggest is that you open your atlas-0 and create a layer of dark gray beneath the textures.  This will outline if there are any white streaks in the textures.  Aside from that, I don't know.  Apologies for not being too helpful.

Link to comment
Share on other sites

I really don't know why that would happen.  The only thing I can suggest is that you open your atlas-0 and create a layer of dark gray beneath the textures.  This will outline if there are any white streaks in the textures.  Aside from that, I don't know.  Apologies for not being too helpful.

No worries. It has me stumped too.

I created a black layer beneath all others and there's no white streaks anywhere.

Link to comment
Share on other sites

Since you're on Linux, I assume you are using GIMP - it may be something to do with GIMP's PNG compression algorithms.

 

It may be that it's choking on some semi-transparent pixels.

My suggestion would be to merge layers, and duplicate the finished character art - convert this merged copy of the art to solid black. using an HSV adjust tool should make this easy - drop the saturation and value to the lowest possible. (Value is also called brightness, balance, brilliance, lightness, luminance, and probably a whole load of other things, depending on the program.)

Once you have your solid black "shadow" of the art, duplicate it a few times, then merge them all together - just to make sure none of that semi-transparency has escaped your wrath.

 

Put this "shadow" version on a layer underneath the main art, and hopefully, it will counteract the strange white outlines... though be warned, it will almost definitely make the outlines appear slightly jagged, when looking too close.

Link to comment
Share on other sites

I used a build renamer to change the build file then used Simplex's ktech tex<->png converter to convert it to png. Then used gimp to edit it and ktech to convert it back to the tex format and put it back into the zip file. I've used this method for making new items before and it's never been a problem but for some reason it's doing it with the character texture.

Can anyone help me out?

Try

$ ktech -f bicubic atlas-0.png atlas-0.tex
If this fixes it, I gotta make the bicubic filter the default. :razz:
Link to comment
Share on other sites

Try

$ ktech -f bicubic atlas-0.png atlas-0.tex
If this fixes it, I gotta make the bicubic filter the default. :razz:

That fixed it. It's looking great now. BTW where's the link for ktech?

Since you're on Linux, I assume you are using GIMP - it may be something to do with GIMP's PNG compression algorithms.

 

It may be that it's choking on some semi-transparent pixels.

My suggestion would be to merge layers, and duplicate the finished character art - convert this merged copy of the art to solid black. using an HSV adjust tool should make this easy - drop the saturation and value to the lowest possible. (Value is also called brightness, balance, brilliance, lightness, luminance, and probably a whole load of other things, depending on the program.)

Once you have your solid black "shadow" of the art, duplicate it a few times, then merge them all together - just to make sure none of that semi-transparency has escaped your wrath.

 

Put this "shadow" version on a layer underneath the main art, and hopefully, it will counteract the strange white outlines... though be warned, it will almost definitely make the outlines appear slightly jagged, when looking too close.

I... I think I understood most of that... :razz:

Link to comment
Share on other sites

Try

$ ktech -f bicubic atlas-0.png atlas-0.tex
If this fixes it, I gotta make the bicubic filter the default. :razz:

 

 

Well, sure, you could do it that way. xD

 

I guess I was right, then, though? The art was too 'soft' around the edges for the filter? (Semi-transparent pixels making the lines more smooth and not all harsh and jaggy.)

 

What filter were you using before? One of the sharper ones, I take it... so... Mitchell? Lanczos? Or was it a really rough one like triangle, for speed?

(I'm not really an expert on the different filters, so I'm just kinda guessing, here.)

Link to comment
Share on other sites

That fixed it. It's looking great now. BTW where's the link for ktech?

 

So it's settled, I need to change the default filter :razz:.

The link for ktech is here. I made some improvements to ktech in a new branch, but that's mostly for compatibility with the mod tools (making it a replacement for TextureConverter in the pipeline). Compilation got a bit more involved, though, as a consequence of getting it to compile under Windows as well :razz:. But if you're interested, the new instructions are in the README (bottom of the link I posted).

 

What filter were you using before? One of the sharper ones, I take it... so... Mitchell? Lanczos? Or was it a really rough one like triangle, for speed?

(I'm not really an expert on the different filters, so I'm just kinda guessing, here.)

The default filter is currently Lanczos. It's pretty good for downscaling, but it tends to introduce artifacts when downscaling too much. I found this to be somewhat problematic for mipmap generation :razz:. U&A just switched to full bicubic, after we had this white outline issue a few times (most notably with the vines, since their animations use very small mipmaps).

Link to comment
Share on other sites

The link for ktech is here. I made some improvements to ktech in a new branch, but that's mostly for compatibility with the mod tools (making it a replacement for TextureConverter in the pipeline). Compilation got a bit more involved, though, as a consequence of getting it to compile under Windows as well :razz:. But if you're interested, the new instructions are in the README (bottom of the link I posted).

Well, this could be just me but my DS mod tools in Steam is just the uploader so ktech is already my texture converter of choice.

Thanks for the link btw. When I was first having this problem I tried to see if I could find a newer version of ktech but I didn't know where to look. I must be turning into an old person or something. :razz:

@mouse

Use

$ ktech -f catrom atlas-0.png atlas-0.tex
instead. I just found out the 'bicubic' option in ktech is bugged, using in fact the cubic filter. The filter above will also get rid of the white outline, while keeping the image sharper.

I will. Thank you. Sorry I don't know more about filters.

Link to comment
Share on other sites

Well, this could be just me but my DS mod tools in Steam is just the uploader so ktech is already my texture converter of choice.

You won't find them on Steam. Just ignore the README, I didn't change it.

Thanks for the link btw. When I was first having this problem I tried to see if I could find a newer version of ktech but I didn't know where to look. I must be turning into an old person or something. :razz:

You probably clicked on the Files tab of my profile (or my gear badge), which only shows my 10 latest files. Though if you search for "ktech" in the Downloads section it'll instantly pop up.

I will. Thank you. Sorry I don't know more about filters.

No problem, you're not expected to know that :razz:. I'm the one who should pick as default ktech parameters values which minimize the chance of headaches, leaving it up to the user to adopt more advanced options which may produce better results, but not always work ideally.

Link to comment
Share on other sites

I really hate to do this but... This problem has some how manifested it's self again. It's exactly as I described before even when I'm using catrom as the filter. I even tried bicubic just for fun. And just as before, I've checked the actual image with different dark backgrounds looking for any stray streaks and nothing has come up. From what I can tell, nothing has changed except the image it's self and I stopped using ktech 1.0 and started using ktech 2.1(even though I tried both filters with 1.0 and the results were the same then too).

Here's a couple of screenshots. The character art is still a work in progress and I'm not an art major so please keep that in mind.

post-239075-0-48964900-1397926991.png

post-239075-0-64462900-1397927000.png

I also noticed, even with the catrom filter, there's still a strange white ring around the eyes like he's spent too much time in a tanning bed. However, catrom did fix the saveslot image (YAY!).

EDIT: I've also noticed his hair will occasionally 'sparkle', by which I mean little white pixels will randomly appear here and there on the back of his head like his hair is trying to communicate in binary. I don't know if that will help narrow down the problem or not.

Also, here's the tanning bed eyes thing I was talking about. It stands out more in the dark.

post-239075-0-12790400-1397933815.png

Link to comment
Share on other sites

@mouse

I recently made some improvements to ktech directly related to this kind of thing. If you can compile it from the cmake branch I posted (which requires a "sudo apt-get install cmake" so that it may be compiled via cmake), the issue should be gone. Alternatively, if you post the pngs here I can just compile them myself and post them back.

Link to comment
Share on other sites

when the character is done could you please give mea link to the download page?

he looks awesome.

All in good time. :-)

 

@mouse

I uploaded version 3.0 with the mentioned improvements to the forum. I also added a "configure" script for convenience, so it's compiled just like before. You'll still need to install CMake, however.

It's certainly an improvement, although, there's still the occasional out of place pixel here or there when zoomed out. But more noticeably, his mouth and nose are much less visible when zoomed out now.

post-239075-0-55869000-1398041716_thumb.

It's almost like the image got a vigorous blurring.

I've attached the atlas-0.png so you can test it for yourself.

Again, it's still a work in progress.

post-239075-0-86278900-1398041736_thumb.
Link to comment
Share on other sites

@mouse

Sorry, it seems my attempted solution in version 3.0 was a major fail.

I believe I fixed the issue with version 3.1. This is how your character looks at high resolution:

post-237781-0-42249500-1398053163.png

and at low resolution (the case where the issue would present itself):

post-237781-0-96045900-1398053171.png

I updated version 3.1 to the forums.

(but not to the git repo; I'm working on another project alongside ktech, and I'll wait until it's a bit more mature before pushing)

Link to comment
Share on other sites

@mouse

Sorry, it seems my attempted solution in version 3.0 was a major fail.

I believe I fixed the issue with version 3.1. This is how your character looks at high resolution:

attachicon.gifmhigh.png

and at low resolution (the case where the issue would present itself):

attachicon.gifmlow.png

I updated version 3.1 to the forums.

(but not to the git repo; I'm working on another project alongside ktech, and I'll wait until it's a bit more mature before pushing)

There's no need to apologize. Your work is single handedly allowing Linux users to make far more complexed DS mods. I've been using ktech ever since you linked me to it forever ago and this is the first time I've had a problem with it. It has always worked great with prefabs but I guess character textures are more complicated.

I did some light testing and it seems to be working even better now than before. I have to call it a night but tomorrow I'll put it to good use and let you know if anything weird happens.

Link to comment
Share on other sites

when the character is done could you please give mea link to the download page?

he looks awesome.

Well, it's not really "done" but I think it's ready enough, if you're still interested. Right now it's only on Steam until I rewrite enough of the dialog and work out any kinks I missed.

http://steamcommunity.com/sharedfiles/filedetails/?id=255833508

Sorry it took so long. I kept getting distracted by Pixel Piracy, the new FTL update and life. Plus it's not a lot of fun trying to imagine what he would say to every little thing in DS and writing dialog for it. :/

Link to comment
Share on other sites

This is happening to me when compiling for DST using scml.exe from the latest Mod Tools. I can fix it by extracting the atlas-0.tex and atlas-1.tex files from the compiled .zip, converting them to .png using ktech, re-converting them back to ktech using $ ktech -f catrom atlas-0.png atlas-0.tex, and then replacing the .tex files inside of the compiled .zip with the newly converted ones. This leads me to believe that whatever file is converting the .png files to .tex as part of scml.exe is doing it improperly.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...