how to light stroke?

edited September 2015 in Questions about Code

hello,

playing around with lights and noticed lighting has no effect on stroke.

is there a way i can achieve it?

many thanks

void setup() {
  size(400, 400, P3D);
  smooth(8);
}

void draw() {
  background(0);
  fill(255);
  stroke(255, 255, 255, 255);
  pointLight(150, 102, 122, mouseX, 40, mouseY);
  translate(width/2, height/2, 0);
  sphere(100);
}

Answers

  • edited September 2015

    Yes, it is working. Try to set the fill to noFill() and set stroke(255,255,255,50);

          background(0);
    
          fill(255, 255, 255);
          pointLight(150, 102, 122, mouseX, 40, mouseY);
          translate(width/2, height/2, 0);  
          //noFill();  
          stroke(255, 255, 255, 10);
          sphere(100);
    
  • Hmm.

    But you have the transparency of the stroke set to 10.

    How can this work with transparency set to 255, just like for the fill.

    I don't want dull, low alpha colors in the stroke, but vibrant ones as they are at full opacity.

Sign In or Register to comment.