Author Topic: Mask for background animations and transparencies  (Read 16439 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10723
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
now I see. We need something like stencil buffers then.
That's pretty complex for caanoo to program. But I add it to the list.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4152
  • On the shoulders of giants.
    • View Profile
    • My Apps
I wouldn't worry about it Gernot. We now have a couple of ways of achieving this effect and there's only a couple of us here that develop for the Caanoo anyway. iOS and Android systems are far more powerful so they probably don't need anything better than what we have now. But if you want the challenge... :)
I came. I saw. I played.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4240
    • View Profile
    • Portfolio
But I kind of think it is important to be able to draw transparent, with polyvectors or drawsprite. ::) on all platforms
If the caanoo´s part gets to be a bit taxing(let´s say like rotozoomsprite), it is fine.

Such way of drawing is quite similar to how photoshop or standard drawing programs go about.
It is (IMHO) what would be expected for a new user coming around GLB first time.

For this last reason I take it to be quite important.
I hope it won´t cause too much trouble to implement.

Thanks a lot for looking into it! :good:

Offline doimus

  • Dr. Type
  • ****
  • Posts: 284
    • View Profile
now I see. We need something like stencil buffers then.
That's pretty complex for caanoo to program. But I add it to the list.

Yes, please!!  :good:

Ability to POLYVECTOR draw with transparency would be awesome!
Even more awesome would be the usage of alpha-masks.
As Erico said, just as Layer Mask in photoshop: 256-level grayscale image which determines the alpha value of another image(sprite).


Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4152
  • On the shoulders of giants.
    • View Profile
    • My Apps
That's what I wanted too (I requested this last year) - just to be able to draw with transparency onto a virtual image (with sprites or POLYs, I don;t mind). Stencil buffers are a tad different - http://en.wikipedia.org/wiki/Stencil_buffer
I came. I saw. I played.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4240
    • View Profile
    • Portfolio
I think these 2 may fit the spot better:

http://en.wikipedia.org/wiki/Mask_(computing)#Image_masks
^ The OR operation is the one discussed on this thread I guess.

---

http://en.wikipedia.org/wiki/Alpha_compositing
^ Maybe a tweek on the current alpha blending stuff could do the thing too?