# Painting textures in real time?

**URL:** <https://forums.unrealengine.com/t/painting-textures-in-real-time/37878>\
**Category:** Asset Creation\
**Tags:** unreal-engine\
**Created:** [August 7, 2015, 8:49pm UTC](https://forums.unrealengine.com/t/painting-textures-in-real-time/37878 "2015-08-07T20:49:21Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Otreum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Otreum](https://forums.unrealengine.com/u/Otreum)\
**Post date:** [August 9, 2015, 8:15am UTC](https://forums.unrealengine.com/t/painting-textures-in-real-time/37878/7 "2015-08-09T08:15:34Z")

</div>

I would also like to know how this is done. RUST and now ARK have a form of drawing boards in the games as well as Duke Nukem Forever.

For me personally, I’m not so much concerned about painting pictures, but being able to “paint” an alpha mask at a hit location from a line trace in real time to reveal a layer of a material, which I believe would actually use the same principles as painting on an object/material in real time. If I am off topic, I am happy to create a new thread, but seems like this is all relevant to the topic anyway.

I think that ultimately, it will be a matter of getting hit location from a line trace (or click location), getting material from the hit actor, converting the hit location to UV coordinates on the material, and somehow altering the pixels on a mask on that material, or in the case of painting colours, adding colour to a blank texture which would blend with the diffuse, specular, normal etc (depending on complexity of paint material).  
It’s the “how” part that has me a bit stumped, and I believe it must be done with some coding, not via blueprints like I’m trying to do.

I stumbled across these links which may be of some use:

> **[Accessing pixel values of Texture2D](https://forums.unrealengine.com/questions/25594/accessing-pixel-values-of-texture2d.html)**
>
> I was wondering if there is a way to read/write pixel values on a UTexture2D object (e.g. read values from a heightmap or draw something on a texture). I’ve seen that there are FTexture2DMipMaps stored on the Texture that contain BulkData, which...

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

A while ago I also stumbled across this cool video of real-time per-pixel painting in UDK/UE3 for interest 🙂

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/c/8cc5f49ead0dcbbea2c00064569d0aa92674c53a.jpeg "UDK per pixel painting test 2") ](https://www.youtube.com/watch?v=R1B3VCMhE4I)

---

_[View the full topic](https://forums.unrealengine.com/t/painting-textures-in-real-time/37878)._
