When using variables, pixel content replacement doesn't preserve clipping or masks!

This might be an involved question! Essentially, I'm looking to use the variable function on Photopea to generate several variations of an image, where the variable function controls the fill of a certain layer. That fill layer is clipped to a shape beneath. Whenever I export, the exported images will have the fills right, but the fills are not clipped to the shape beneath. I tried masking the shape instead, and that still didn't work. Does anyone know of a way around that?

More context: I make dress-up games! :) Each asset includes a base shape and a few clipped layers on top using blending modes to give the shape depth and detail. In the past, I've simply turned on alpha lock and brushed over the relevant layer with a color variation, which preserves the blending layers, and exported the folder as a transparent PNG. It's sort of tedious when I have a lot of color variations. I've been trying to think of ways to automate it, and I think that this variable function is the way to go, if I can figure it out.

​

Here are what my layers are doing. Layers 2 and 3 are multiply layers with details. (Usually the layer \"bodycolor\" is visible, I was messing with it. It's just a black box.)

Variables panel. This is the only layer being messed with.

Data set

These are my source images, I want them clipped to the body shape. It works if I do it manually.

Here are the exported images. As you can see, the source images are done in the right way, and the blending layers are working, but the clipping isn't. The same thing happens when I put a raster mask on the bodycolor layer.

Something else that I can't wrap my mind around: if I instead turn on the alpha lock of the bodylayer layer, the one with the shape, and set that layer to the one being replaced, nothing at all changes, and I'll get a folder of 7 identical images with the test skin tone.

If you have any advice or ideas for making this work, let me know! I'm a little confused by what's happening, honestly. Thanks!

Posted May 1, 2023, 1:21 AM UTC

13
97buckeye•

u/Ivanhoe90 This one is too complex for me.😁

1
ivanhoe90•

I think it is fixed now. Could you try it again?

1
LetteredVioletOP•

It worked perfectly! Thank you so much, you have no idea how much time this will save me! :D

1