Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

how can i make a canvas that only some part is transparent?

A topic by 7acques created Aug 14, 2024 Views: 138 Replies: 2
Viewing posts 1 to 2
(+1)

i’ve watched the project Puppeteer and the Ornamented Ovum project, when I try to make something similar, the canvas I make always all solid, or all transparent, which means the canvas will put a white rect in front of my background, or the image it self will be messed with background pattern. however in the two projects I mentioned at beginning, I see the egg canvas’ four corners is transparent, while inside the egg is solid. when I check the widget tab I see the egg canvas is shown as transparent.

i might missing some very basic part, since I searched through the community yet can’t find other having the same question. I’m still a newbie, plz forgive me on that.

Developer (1 edit)

There are two important steps:

1) Use "View -> Transparency Mask" mode to fill in opaque regions of your image. While Transparency Mask is active, the transparent parts of the card background image are shown as a mid-gray, and the "white" color in the palette is opaque white (pattern 32). In normal drawing mode, that element of the palette is transparent (pattern 0).

2) Set the Canvas widget you create to "Show Transparent".

It may be clearest to provide a demonstration:


Does that help?

(+1)

thanks!!! this solved my problem!!!!