Seamless texture patching and filtering addon

Very cool, and I have to say yes this does fill a need and purpose. Thank you for working on this!

Added some new stuff. You can now automatically generate diffuse, normals and spec into a material from a bitmap.

Good ! But, itā€™s possible to create a PBR map ? Normal, Diffuse (Albedo), Specular Color and Glossines.

The addon already generates normals and specular. Accurate albedo and height would require light and AO cancelling algorithms, which are very slow to implement with Python and Numpy, afaik. Metallic? Iā€™m working on it. But it canā€™t really be generated with just one button press.

What Iā€™m currently aiming for is fast material generation for prototyping ideas. Just load an image and BAMā€“you now have a material you can import into Unity or UE.

One thing Iā€™m also looking for is to paint with materials in Blender. One stroke affecting normals, spec and diffuse all at once. And copying into the object image maps. I donā€™t know if this can already be done, but if not, maybe I can write an addon for it.

You can try, and that woudl definitely be welcome - though Psy-Fi already indicated that this would cost in performance. I am hoping that the PBR efforts will enable at least a better way to paint the materials into the object with stencils on the flyā€¦

It would be nice if there was an explanation of what each parameter does(seamless part of the addon). And also why does window max out at 128 and overlap at 64? It would be good if you could make that seamless cross that is generated a bit wider/taller. Iā€™m guessing that is what window is for. It would also be good if you could crop the image to a desired number.

Otherwise, I think the seamless part of the addon is really cool and useful! Iā€™ve downloaded countless images only to find out that theyā€™re not seamless. Iā€™ve had most success with the window and overlap parameters both at max and lines on very low(1-3).

The seamless patcher is like building a puzzle using the original image as source. You pick a spot and try how it fits the adjacent piece. ā€œPuzzle pieceā€ lines work best with 1 to 3, as you discovered, because of how the algorithm works. I didnā€™t have the time to improve the algorithm, itā€™s still quite naive. Overlap is how much the puzzle pieces overlap. Itā€™s the distance that one piece fades into another. Window maxes out at 128 and overlap at 64 because at the time those seemed like good sanity limits. I may increase those limits (or you can do it yourself simply editing the script) after new buildā€¦

ā€¦which brings me to the point of what Iā€™m trying to do currently. Iā€™m trying to make the addon node based and itā€™s not going that well. I have limited amount time for the project and Blender documentation on node systems is a little bit bare bones. My experiments arenā€™t working and I donā€™t know exactly why.

hi i getting error by if i try to enable this addon version 0.1.8. please help me fix this. i used older version 0.1.5 i think and it was wonderfull and now i dont know what i did that i cant enable itā€¦


Love this addon also love the music, what is it?

Hereā€™s the direct link to the version 0.1.5. while I try and get the newest fixed. https://raw.githubusercontent.com/amb/blender-texture-tools/802fe60b5dc66fa8485f018793aeb11e233aa0df/seamless.py

Also if you have any ideas or wants for improvements, or stuff that you find redundant, please do tell. It might get implemented if itā€™s feasible and not beyond my ability or beyond the ability of the Python API.


hello,

i try to install version 0.1.5

but a report error say :no module named numpy.

what is the solution for to resolve the problem?

@cromos: You are probably using a Blender build that doesnā€™t come with Numpy Python library. The default Blender 2.76 should include it automatically, as far as I know. If you donā€™t have it, thereā€™s also an option to install it manually, but that is a lot trickier.

edit: Also hereā€™s a helpful thread. http://www.blenderartists.org/forum/showthread.php?384042-Numpy-error-when-trying-to-install-addons

Updated to 2.80. Not everything is ported, because how materials work differently. Rewritten to use a new style of framework that is much faster to iterate new operators with. For example hereā€™s how to create a completely new operator and add it to the panel (for Gaussian blur functionality):

class GaussianBlur_IOP(image_ops.ImageOperatorGenerator):
    def generate(self):
        self.props["width"] = bpy.props.IntProperty(name="Width", min=1, default=2)
        self.props["intensity"] = bpy.props.FloatProperty(name="Intensity", min=0.0, default=1.0)
        self.prefix = "gaussian_blur"
        self.info = "Does a Gaussian blur (semi-broken atm)"
        self.payload = (
            lambda self, image, context: ImageOperations(image)
            .gaussian(self.width, self.intensity)
            .pixels
        )

Iā€™ve found that the boilerplate holds back trying out simple ideas, so this should be a lot easier to iterate on. Itā€™s a complete framework thatā€™s in bpy_amb repo and is also used in Mesh Refine Tools.

1 Like

does it work that github link for 2.79?

For 2.79 you need an old version.
repo: https://github.com/amb/blender-texture-tools/tree/d205aec102ff5e6e53c1fd0a2508a83b968af8e9

2.80 is active, 2.79 is not something Iā€™m developing anymore.

1 Like

I cannot enable the addon in 2.8.

Apparently Github load from .zip doesnā€™t also include the submodules. Thanks for reporting. I will try to see if I can do it through releases. Currently, if you open a terminal and cd into your Blender addon folder and do the following, it works fine:

git clone https://github.com/amb/blender-texture-tools.git
cd blender-texture-tools
git submodule update --init --recursive

Update: Ok, the .zip is up at https://github.com/amb/blender-texture-tools/releases/download/v1.0-b2.80/blender-texture-tools.zip

Addon name is Paint: Image Edit Operations and itā€™s in the image editor Image tab > Texture Tools.

Thank you ambi for your quick response. Can you use it to make tileable textures from say a 975 pixel by 370 pixel image file or can you do this with gimp? up to say 8,000 pixels by 8,000 pixels.Thanks

Currently Iā€™m focusing only on textures with powers of two equal dimensions, such as 256x256, 1024x1024 etc. Cropping feature is something thatā€™s good to have once I get around to it. Iā€™m currently gearing the addon to be a framework to easily add image manipulation functions into Blender without having to write a lot of boilerplate. Simple image actions should be just a couple of new lines into the code. So at this stage there isnā€™t evertying, itā€™s pretty basic. But the idea is to have more in the future as need arises.

2 Likes

ambi I will watch to see when your addon has the features I am looking for. Thanks