I am trying to build an app that would allow users to paint colors and images on models using just WebGL (no three.js). I have all the rendering stuff set up. I know that painting on 3d objects have something to do with the stencil buffer but I am not sure how it looks in the code. I also want to draw images onto the models, so I guess the brush should be an image.
Any outline code for handling the painting would be good for me.
In that case, you are on the wrong forum. You should ask on a WebGL or OpenGL forum instead.
You are asking people to do your work for you. Usually, you’ll get a better response if you show how you have attempted to solve this yourself, first.
I am not asking for the full code. just something that would get me started. Some thing like ‘do this and then do that’. I searched on google for the topic. I could only get a github repository that did it all but it had no explanation on how it all worked.
Also, the principles would be same for three.js and for just using webgl, so I don’t think it was a bad idea to ask here.
is there a way that i can somehow do the splash on the texture (by clicking on the model) instead of adding a new object everytime?
yes you can, but that requires carefully unwrapped object with as little seams as possible. 3js now returns UV of the clicked point, with these you can alter the pixel under mouse in the texture
what about this?
click the model with your mouse, or touch with your finger if on mobile.
I’m very interested in this.
am i missing something with the scanned head link, instructions etc?
is there a repo for all of this? open source?