Join GitHub today
setStroke() does not work with imported OBJ Pshapes #4377
If I load in a *.obj file using loadshape(), I can bring the file in, and change its color using setFill(). However, setStroke() and setStrokeWeight() have no effect on the shape, whereas with shapes created using createShape, it would result in a 'wireframe' effect of every poly being outlined.
@paraclete-pizza thanks for reporting this. Actually, setStroke() works partially, if you do the following:
obj.setStroke(true); obj.setStroke(color(0, 255, 0)); // needs to be different from black obj.setStrokeWeight(1.2f); // if the weight is too small, the stroke won't be visible (it will be occluded // by the faces of the object (strokes in 3D can be tricky). obj.setFill(color(255, 0, 0));
you should have green strokes applied to your obj shape. However, due to a bug in the logic, black strokes are ignored, this is taken care of with 2a8d62b