How to achieve "Clipping Mask" effect? Dynamic gradient?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
How to achieve "Clipping Mask" effect? Dynamic gradient?
I want to apply for example a gradient to a layeredimage, but not everything else. The layeredimage is on its own layer, is there a way to "clip mask" the gradient to only effect the pixels on a specific layer? My sprites have many different outfits, and there are 40 characters, so manually making a gradient for each possible combination is not feasible. For example, on a late afternoon I want to tint the sprites slightly orange without affecting bg with full screen tint. Surely many games have this feature, yet I cannot find any solutions. Thank you.
Re: How to achieve "Clipping Mask" effect? Dynamic gradient?
One option is to use detached layer. It is pretty close to "clipping mask" effect. This way you can apply transform to the images displayed on the detached layer. For example, tint the sprite/sprites without affecting bg:Gachapen wrote: ↑Mon Aug 07, 2023 2:26 pm I want to apply for example a gradient to a layeredimage, but not everything else. The layeredimage is on its own layer, is there a way to "clip mask" the gradient to only effect the pixels on a specific layer? My sprites have many different outfits, and there are 40 characters, so manually making a gradient for each possible combination is not feasible. For example, on a late afternoon I want to tint the sprites slightly orange without affecting bg with full screen tint. Surely many games have this feature, yet I cannot find any solutions. Thank you.
Code: Select all
define config.detached_layers += [ "stage" ]
image the_stage = Layer("stage")
label late_afternoon:
scene bg_scene
show the_stage:
matrixcolor TintMatrix("#fa0")
show eileen onlayer stage
3)You can also use attributes or conditionswitch to apply transform to particular elements of the layered image depending on the attribute/variable.
Who is online
Users browsing this forum: Ahrefs [Bot], jeffster, risukadekei