Panel masking(again)

Posted By: Roel

Panel masking(again) - 12/15/06 15:21

This time my post is WITH pictures
The Idea was Panel masking, with that I mean that You can show a bit of a panel,just like with the window .... definition in panels.
the problem with window is that it has a square shape. and with defining a panel mask it should be possibleto get EVERY shape you want by assigning a mask to a panel.

this is just a panel, red is visible and white isn't


but if it gets possible to assign a bmap mask you create something like this
where the panel and the mask overlap each other you can see the image
red is visible, white is not visible in the panel AND in the mask.
yellow parts exist in both images but are not visible


his is an easy example, it is also possible to do with window, but you can also have a mask shape like this:
[image] http://88.198.45.9/pic/intenscriptfiles_pm_03.png[/image]

the code can be this

bmap mybmap <blub.bmp>;
bmap mybmapmask <blubmask.bmp>;
panel mypan
{
bmap = mybmap;
mask = mybmapmask;
}
Posted By: Joey

Re: Panel masking(again) - 12/16/06 12:02

how about using transparent images?
Posted By: Roel

Re: Panel masking(again) - 12/16/06 15:58

hmmm maybe it is possible to multiply the alpha of the bmap's pixel alpha by
the mask's pixel alpha. or just adding it.

I don't know which I have to choose
Posted By: Joey

Re: Panel masking(again) - 12/17/06 12:04

multiplying with a normalized value between 0 and 1 or adding a normalized and clamped value between -255 and 0.
Posted By: Roel

Re: Panel masking(again) - 12/17/06 17:00

I think multiplying gives the best result.
'To multiply the alpha of the bmap's pixel alpha by
the mask's pixel alpha'
Posted By: Roel

Re: Panel masking(again) - 12/17/06 17:06

I think it's not a very bad Idea.
Posted By: Joey

Re: Panel masking(again) - 12/19/06 19:04

who said it was a bad idea?

by the way, can shaders be applied to panels? i'm not sure about this (i don't think so), so you should probably use view entities for this job.
Posted By: Roel

Re: Panel masking(again) - 12/28/06 15:29

I don't mean shaders, I kno they're not applyable to panels but maybe it is
possible to give a mask over a whole panel like in paint programs, where you
only see the part you want to see.
but not with bmaps, but with whole panels.
© 2024 lite-C Forums