Feature Request/Discussion : Texture painting with real layers (PSD,ORA,XCF,KRA ?)

Hi,

Since we’re all looking towards the future and Blender 2.8, we’re all gathering ideas and discussing Blender’s development, I thought it was a good time for me to share something that I’ve kept telling to my friends for years but never said out loud. Although it is a known missing feature and that it has been subject to proposal here and there through Blender’s history, I’ve never seen any serious subject on the matter, so here I go.

Intro
Blender’s painting tools haven’t ceased to improve through time. With time, effort and money, blender has been able to compete with the greatest 3D painting tools available on the market. Though it is still maybe not at the level of super high-end painting apps, such as Mari or Substance Painter, it is able to compete with other high-end and well known 3d apps in this domain, such as 3DCoat or Mudbox. But is it really production ready ?

Myself

First of all, let me present myself quickly. My name is Ghislain, I’m 25 years old and I live in France. I’ve been using Blender for 9 years and 7 years as a professional artist. I’m mostly focused on stylized hand-painted video games props. I’ve been recently offered a job in the biggest German video-game studio and before that I also worked 7 months in Paris in a CG studio, and had tons of freelance experiences through the years.

Anyway, I’m not here to post my full curriculum vitae but I just wanted to say, maybe a bit poorly I admit, that I know a bit about 3d painting.

Problematic

So, obviously, Blender’s painting tools has always been a huge interest to me. Yesterday again, I talked about it with a former working colleague of mine, that is now mostly working with Blender in a big German production. He discovered Mudbox’s painting tools and was amazed by how cool it was to be able to share the layer workflow with Photoshop, to be able to load a psd file in mudbox and paint on it both in MudBox and PS. And he got me thinking, was I the only one here thinking that this is such a most basic needed feature in Blender ?

And so I’ve been both amazed and super frustrated at the same time for years that Blender has still no true painting layers.

Current system and why it is not working?
Yes, in a way, you can use layers to paint in Blender, but for each layer, you have to create an unique and single image. No matter what addon you’re going to link me to facilitate the workflow and I’ve seen them all, anyone who truly paints knows that it is not going to work.

Biggest reason to me is the « sketching » aspect when you paint. Anyone who have already painted something somewhat sophisticated in a 2D app, knows what I mean. You create layers and delete layers a LOT, sometimes you don’t even know why. You end up with fifty unnamed layers and your file is a sketchy mess but because painting, mostly, IS sketching. Even Feng Zhu doesn’t name his layers and has dozens and dozens of them ! You have to be able to create or delete a layer in a single click when you feel it, for any unsure stroke you might want to do, for any numerous lighting pass you might need to do, for any shadow stroke you should have to do, for anything you might want to tweak later on. Otherwise, it is just plain not possible.

I’ve seen it, I’ve done it and I know how much the current workflow is flawed, just because the way Blender handles data. Imagine having 30 layers, meaning 30 unsaved images : some might be saved externally yes, but some probably aren’t and are waiting to be unwillingly deleted if you forget to save them externally before you quit. Even if there’s buttons and addons to help you deal with that, you will forget, you will mess things up one day or another and you will loose your work. I’ve experienced it and I’ve seen it in production.

Also, because of the way Blender handles data again (which is not itself wrong !), for each layer, meaning for each image, you’ll have to name both the source and the image inside Blender. And let’s say later on, you rename the source for one reason or another, well you also have to rename the image inside Blender. And if you forget, you’ll end up someday believing this « highlight_001 » texture, equals this « light.png » image and because it is not, you’ll save and overwrite the wrong image !

Even if you just want to delete layers (and we do a LOT, because, again, painting/drawing is somewhat sketchy), you’ll still have the images in your folder so there’s that to clean. Plus, the data in Blender is still there and is waiting for you to quit to be erased. So you still have a list of rusty and unused images when you’re selecting your images while painting. Yeah, one more way to make a mistake and start painting on the wrong image.

But that is not even a problem. Obviously the main issue is sharing your painting with an external 2D application. You can’t share layered files with Gimp or Krita or Photoshop. Only way to do that is to import every images you created in Blender and reconstruct the layers by yourself. And if you had the misfortune to use a weird blend type in Blender, let’s say Linear Light, you’ll end up seeing that Krita doesn’t use the same algorithm and that you have different colours results with the same setup.

Real painting work requires real layers, for the plain reason that a 3D application is supposed to be used with an external 2D application. There’s so much stuff that is quicker to do, or that you can only do in a 2D application, that you cannot avoid it. And you can’t paint everything on a 3D object in a 2D app either, so a sharing workflow must exist between the two. And we can’t do that in Blender and it’s such a shame considering how great the painting mode is in Blender. Either you have to export/import flattened image (…) and or deal with the broken layer workflow at you own inconvenience.

What should we have?
The ability to load a single multilayer file format (cf below) and paint on those layers. 3DCoat for instance only has basic psd supports (text layers, layer groups, dynamic layers, FX layers and all are not supported and has to be rasterized and flattened in order to be read) but it is way enough for texture painting. We don’t need anything fancy.

So basically we should need to be able to list the layers stored in the multilayer file, select them individually in Blender so we can paint on them, toggle their visibility, change their layer mode (screen, colour, add, overlay and multiply are the most basic ones), move them up or down, deleted them and create new ones.

Why it doesn’t exist yet ?
Substance Painter for instance, doesn’t have such feature and yet is one of most regarded 3d painting app. I quote from the devs :
“Building a PSD exporter is actually much more complicated than it looks like at first glance.
Substance Painter channels all use different color space and bit depth. The height map even uses negative values, which Photoshop can’t handle. Merging all this information in a single PSD file is tricky to say the least.
The current PSD export was a specific request from some of our AAA customers.
We do have plans to make a full PSD exporter happen at some point though, but it requires a lot of thinking and engineering to make it work flawlessly.”

I’m no fool, I learned the basics of C++ some years ago and wrote some very basic programs myself and I know how quickly coding can become complicated. And there’s other issues as well.

The biggest to me is the image format. Psd seems obvious but it is proprietary and developing such a time and money consuming feature using a proprietary format is unlikely as well as unreasonable. Other two obvious format I have in mind are .xcf and .kra.

Blender already does import and flatten xcf files so it’s a start, but Gimp has been lagging behind for ages. It’s future is unsure and it’s development is somewhat abandoned by most devs. Gimp 3.0 will still not be released in years to come and Krita will be mostly long ahead by that time. But Krita is mostly focused on painting and does lack the photo manipulating workflow that Gimp can provides. Also I’m unsure how easy it would be to support .kra and putting Gimp aside, being the most know free 2D app in the world, is probably not reasonable.

A friend pointed me towards the ora file format which is supported by mypaint, gimp and krita so it sounds promising.

Basic UI proposal
The other issue is concerning the interface although a simple proposal such as that would work for me.


Any thoughts ? Anything comments devs would share with us ?

Discuss !
Thanks

Yes! Reading from and writing to layered file formats would dramatically improve blender’s texture painting workflow.
It doesnt really matter to me if layers are seen as slots in blender. The more important part is import and export of layered files.

I would urge developers to support ORA, as it is the one open source format that can be used by gimp,krita,mypaint and others.
If PSD is supported, it would benefit photoshop users, it would help however keep that proprietary format popular. I think photoshop users can nowadays install an ORA exporter with an unofficial addon.

Dont help adobe and autodesk keep their dominant proprietary formats the industry standard. We must help open source formats get established as industry standard. There is so far no good replacement for FBX sadly.

I probably don’t know enough about the various file formats to offer a suggestion there. I’m guessing if Blender actually had layer support of some kind, the I/O itself could be handled fairly easily with Python, similar to all the various 3D formats.

Unfortunately, with Psy-Fi off to greener pastures there doesn’t seem to be a dev focusing very heavily in this area anymore, and I’m assuming that adding image layers isn’t a trivial feature to add into Blender.

I remember a guy develop multi layer system for blender.

@Cremuss: Love your hand painted textures! (I was looking at your portfolio earlier today and then shortly after saw this post :slight_smile: )

Btw, Mudbox is only $10 a month http://www.autodesk.com/products/mudbox/buy

I wonder if a licensee stops paying Autodesk, do they simply suspend your rights using the app, and you can resume as you begin paying again, or something else ?

Blender needs better performance in vertex painting (and vertex painting with dyntopo) to rival ZBrush, and true layers for Paint mode. I am not sure if connection to 2D app is critical and if it is, then what open source app to go with?

Well blender support png format till some degree, its an open format.
PNG can hold layers, … but guess what … closed source photoshop cant read layers from png either…

“weird blend type in Blender, let’s say Linear Light,” its not weird, this kind of stuff was badly designed from beggining. It looks different cause of math that should be made in linear color space. Bartek Skorupa nicely explained why this is happening in this tutorial series


you can recreate this in blender node system

as for the topic, plus from me but add color picking from screen to list cause some shameless devs removed it

And Kevin had updated this to the phabricator and he is active, we still have hope people :slight_smile:

pachupp > Thanks for the link, interesting stuff ! Also I believe colour picking from screen still exists. When you click on a colour, you can click on the sampler button next to the Red colour slider. It says Sample from 3D view but it works on the whole screen for me.

Razerblade > I’m pretty sure PNG doesn’t support layers. To my knowledge, few apps like PS or Firework used to write specific metadata into png to support layers but only those apps could read it. I don’t know if that’s still the case.

motorstep > Thanks, I appreciate the support :slight_smile:
Mudbox is great yeah. I didn’t know it was only 10$ a month. It’s surprising low for something made by autodesk :slight_smile: I’m not sure how these monthly based license works. Still, there’s no Linux support so it’s a dead end for me. Plus, that doesn’t mean we shouldn’t have the feature in Blender !! :smiley:

sergiopt > I didn’t know that !! Thanks for pointing that up. A shame that all that work wasn’t pushed any further :confused: At least we have some code samples in the wiki. It’s a start…

xrg > I was thinking about psy when I wrote my post. Snif :’( Where did Psy go ? He did amazing work with the texture paint mode !!

blurymind > Ora sure does looks promising ! I didn’t know that file format before today and it something to keep an eye on !

erickBlender > really ? cool ! Do you have any link ?

i know but its not user friendly

Have you looked at Zero Brush? It’s an addon for Blender that streamlines the painting process by handling a lot of the annoying image creation and configuration of them as layers for paint mode. It also has a lot of other features and looks quite well designed and easy to use:

It also supports sculpt mode.

Note that the user’s channel has tons of tutorial videos and I think he’s developing some other addon bit like Mesh Fusion in Modo, which is another thing that I’ve seen crop up in discussions around here as a feature people would love in Blender.

Having said that, I would like to see Blender’s native paint tools get an upgrade, although I must admit that I haven’t really used them myself - mostly because it doesn’t have proper layer support and I’m still going to have to UV unwrap the model anyway, so I tend to just work in Photoshop.

This. Vertex paint already has layers of sorts. If it was use-able and we had true layers in paint mode that would be a major leap in itself.

what happened to psy-fi? got a job elsewhere?

tl;dr, but yeah, without layers all those fancy texture paint tools are going to waste.

Also, when we do finally get layers and masks, let’s make sure each layer can be composed of multiple textures that can be painted on at the same time - diffuse, roughness, metallicity, specular, alpha, etc.

Note on formats: .xcf and .kra are internal formats of their respective applications. Their specifications are always subject to change. It’s an utterly horrible idea to use these. The only interchange formats that do support layers I can think of are OpenEXR (but it doesn’t support 8 and 10 bit integer formats) and OpenRaster (which on the other hand isn’t widely supported).

Actually, a good open format option for texturing just doesn’t exist, so in a perfect world, I’d actually suggest creating a totally new image interchange format tailored to texture authoring needs - multilayer, with an arbitrary number of channels, bit depth and resolution set per channel, lossless compression. Probably a few other features I can’t think of right now. This would however require manpower and also getting 2d editor makers on board. So it’s not going to happen unless a company like Pixar takes point on this.

He’s working at Crytek since a few months.

Mr_Flamey > Yeah I looked at Zero Brush. It looks great but it doesn’t solve a lot of the issues, yet alone the lacking workflow between a 2D app and Blender. I’ll keep an eye on it anyway :slight_smile:

Piotr > TL indeed :stuck_out_tongue: I just wanted to cover every points I had in mind. .Xcf and .Kra are indeed a bad design choice… A least they’re open source so if the app dies somehow, you can still use and develop the file format itself I guess. But the Ora file format sure looks to be the best option here. I don’t see the point of creating yet another new file format since Ora is looking great and is already supported by the mains 2D FOSS apps. It is open source and features everything we could need.

Sanctuary > Good for him ! Too bad for us :smiley: Crytek was in bad shape a few months ago, I hope everything has returned to normal :slight_smile:

Anyway, I talked about the feature at #blendercoders. Kevin was indeed working on it but there was some big issue with multi-threading and massive memory leak as far as I understood. He long stopped working on it, but maybe he’ll take another look into it this week. The devs know this is a big feature request but implementing it would need some heavy work and it is no joke, so right now it isn’t very likely to happen unfortunately.

ORA may be supported by the libre world, but if photoshop and other commercial tools won’t open it, it’s a dead end.

Ah, guess we knew it would happen eventually, best of luck to him.

Slight update, I just fixed the threading issue, the memory leaks will be a bit trickier. Stay tuned.

Do not invent a new format, contribute improvements to ORA and keep PSD for compatibility with current pipelines.