x


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.

more ▼

asked Aug 17 '11 at 06:04 PM

DEtH_MoroZ gravatar image

DEtH_MoroZ
13 7 9 15

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Aug 18 '11 at 12:10 AM

Waz gravatar image

Waz
6.4k 22 33 70

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 wo 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).

Aug 18 '11 at 12:36 AM DEtH_MoroZ

I would just use the existing UV map. Raycasting to a MeshCollider 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.

Aug 18 '11 at 01:32 AM Waz
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2192
x109
x58
x37

asked: Aug 17 '11 at 06:04 PM

Seen: 1123 times

Last Updated: Aug 18 '11 at 01:32 AM