3

Alright, I'm in the middle of making a decal system that paints directly on textures. I also have it doing the legwork on the video card so there's no lag like using a Texture2D.Apply() approach.

Anyway, essentially I'm just stamping the texture with the decal at the specified UV coord. My next step is to isolate the island hit by the raycast so I can limit the decal to that island. So that way when a decal hits near the edge of an island, it doesn't leak into neighboring islands.

What I know:

-UV coord of raycast hit (where I draw)

-triangle index that was hit (how I find the correct texture to draw on)

-an array of all the UVs (not using it yet, but I'm fairly sure it would help in the isolation process)

Can anyone help me figure out how to isolate the island that was hit? I've really scowered this forum, unity forum, and google...found some similar pleas for help but no answers.

Any help is much appreciated : ]

Edit: After speaking with some of the artists, a UV Island is also sometimes refered to as a shell.

4

0 回答 0