Skip to content

Mask does not appear in syphon feed. #32

Description

@Tenkir

I have an alpha mask that I'm using on the canvas. It works fine in the processing image, but when viewing the syphon feed, I only see the base layer. The mask and anything after are not rendered.

import processing.video.*;
import codeanticode.syphon.*;

PGraphics canvas;
SyphonServer server;
PImage mask;
PImage lines;
PImage backdrop;
Movie background;

void setup() {
  size(1920,1080, P3D);
  canvas = createGraphics(1920, 1080, P3D);
  mask = loadImage("alpha_mask.png");
  backdrop = loadImage("white_backdrop.png");
  background = new Movie(this, "finalimage_1.mov");
  background.loop();
  
  // Create syhpon server to send frames out.
  server = new SyphonServer(this, "Processing Syphon");
}

void draw() {
  canvas.beginDraw();
  canvas.background(100);
  canvas.image(background, 420, 0);
  canvas.mask(mask);
  canvas.image(backdrop, 0, 0);
  canvas.endDraw();
  image(canvas, 0, 0);
  server.sendImage(canvas);
}

void movieEvent(Movie m) {
  m.read();
}

Processing Window:
screen shot 2017-09-22 at 12 07 44 am

MadMapper:
screen shot 2017-09-22 at 12 07 55 am

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions