Menu
Texture Processing

Texture Processing

I just pulled an all-nighter to add a feature to my software that I’ve been wanting for years! The feature allows me to process textures when their loaded, so that I can manipulate their color, contrast, brightness, and more.

I have an ever-growing library of textures and patterns that I use in my pieces. Sometimes I like the patterns, but not the color. Other times, I want to generate an alpha channel based on color, etc. I can do this with a standalone utility, but that’s just creating more redundant data. Now, I can tweak the color of the texture as it exists within the scene.

I used “muparser” to allow me to create equations for processing texels. It happens in C++, so it’s pretty fast. I’m impressed with how easy muparser was to integrate into my project. Now I send a series of equations from the Python front-end, and C++ side parses the equations, processes the texels, and re-loads the texture. It’s pretty fast!

Even better, I’ve made a quick “randomize process function” routine which allows me to generate color-manipulating functions. I love creating and using these type of “randomizing” functions, as it helps me quickly find combinations that I’d never think of attempting manually. So much fun to have a new tool like this!