set specific color on face of cube

edited August 2017 in How To...

hi need to find a way to load all points from the back face of the cube into array so i can change the colors and set the modified colors back on the face again. just like in C# where you get modifi single pixel on the screen.

can anyone tell me if it is posibel or do i need to create an image and then use beginShape with image as texture. it just seems power consuming like that.



  • Where I've done something like this I've written my own cube method that draws 6 individual squares.

    beginShape method sounds like it might work though. Try it.

  • edited August 2017

    PGraphics will give you an addressable object with a pixels[] array. If you write your own cube object made of six images (six PGraphics) oriented in space, then you can read from them and write to them as you like.

    beginShape with image as texture might work too -- I'm actually not sure.

  • These two links should be in your list to check:

    Then you just need to modify the texture that you are setting in the back face of the cube.


Sign In or Register to comment.