Doodling possible?

Hello Smarties :slight_smile:

I have seen applications/games built in Unity that allow the game player to paint on the terrain (ie. FriendsHangout).

Is the same possible of regular geometry?

I have a game concept in mind where the player actually paints the world objects themselves. I want to start with a wall, cube, or other primitive that the player can conjure and effectively doodle on.

I’m thinking that the object will have to have a two layer material, where the outer layer has an opacity map that begins completely transparent. When the player “doodles” on the object, they are altering the opacity map of the outer layer of the objects material by adding opaque areas.

Do you think this is possible? Or are there examples of this that have already been done?

Thanks for your help,

-Whystler

So now, I’m taking a look at the API reference, and I see some ways via texture2d, setpixels, and getpixels that I can store a texture generated in-game. I’m just not sure yet how I might go about generating the texture via mouse point and click.

I wonder if a click on the face of a mesh can send the coordinates of that click back to the script, so that the array that represents the texture can be updated with a black pixel in that spot.

Any ideas?

-Whystler

–Eric

Perfect! Thank you!

-Whystler