- Home /
Save result of projection to texture
Hi there.
I manage to make some kind of drawing tool for unity in runtime. This tool have to work like this: Ingame video of Street Legal Racing Redline. This tool is not just projecting, but edit textures itself.
Just to clean understanding: yes, i know how projectors works. i personally made something like frameshift decal framework, but for complex objects.
1)How do u think it may be done? Easiest way is combine projected texture and original texture of object (as i think, of course if build-in projectors don't build culling mesh).
2) Is it possible to save result of projection? Any ideas are welcome :)
Best regards, DEtH_MoroZ.
Answer by Waz · Aug 18, 2011 at 12:10 AM
I'd be slack: I would assume that UV mapping is sufficiently proportional to just find the UV of the center of the brush and paint around that in the texture. The only tweak that would be essential is ensuring the painting is clipped to the UV mesh island is started on - probably need an extra control bitmap for that.
You could extend this by casting multiple points and deforming the brush accordingly.
tyvm for respond
(as i read it first time i manage that u didn't get what i mean lol)
as i understand: 1) make culling mesh by simply sphere cast (or classic way, but, actually w\o real culling. just gather triangles and uv) 2) assign texture to culling mesh 3) cut this texture apart (by spherecast saved info) 4) assign all parts to correspondent textures, by info gathered before
did i get it right? i am really afraid that i will spend 2 week to clean this up but performance will be awful. and yes, important feature is drawing on runtime generated complex meshes (got mesh - paint it).
I would just use the existing UV map. Raycasting to a $$anonymous$$eshCollider gives an exact UV position.
Performance may indeed be a problem (regardless of how you do it), unless you use RenderTextures and a clever Shader to do the blitting of the brush.
I realize this thread is old, but I'm doing something similar and I'm trying to figure out how to clip the "paint" to the UV island it hit. I know which triangle was hit, and I can get an array of all the UVs, but I can't figure out how to isolate an island : /
Did you figure out how to isolate an island @gord0_ ?
Your answer
Follow this Question
Related Questions
Painting a texture without using Terrain editor 0 Answers
Projector + custom fragment shader = endless texture draw 2 Answers
Projector on sphere creating extra lines 2 Answers
Painting on collision similar to (de blob or meat boy running system) 0 Answers
Lightmap projector effects or attach it to the texture 0 Answers