I am relatively new to Three.js and wanted to create a web app for drawing lines/ painting on 3d models . I can load the model but have no idea how the painting process would work . Any advice?
- Unwrap the entire model onto a single UV map, similar as you’d do with a lightmap (best if the entire model also uses a single material, but you can adjust that also with code.)
- Apply a CanvasTexture to the model (example.)
Thank you for your reply. But in the given example we would have to draw on the canvas(on the top right) to see it’s effect on the model. I was wondering how could we achieve direct drawing in the model ?
This is amazing, there any repo for this?
The original was deleted, so I copied it to GitHub - makc/three-texture-painter and did a couple of edits. Also need to fix its resize() method.
@makc3d I read the repo , ig Im too dumb to know how it works , For example what does the funtion frombuffergeometry do? I mean do you have an idea how the’ve done it?
it makes sure the old code keeps working in newer 3js, dont worry about it
well, then you gotta un-dumb yourself by studying docs and other, simpler examples - there is no way around it.
. got it