One question I’ve been wondering is it possible to generate textures dynamically through code or blueprints. for instance generating noise patterns, making a ray casting engine in UE4, making a drawing game or stamping textures to mesh instead of using decals.
In ActionScript 3 there is a class called BitmapData which is just bitmap data with functions like set and getPixel, which sets the pixel color at the specified X and Y coordinates of the BitmapData.
I haven’t done too much with it, but the Substance Plugin has some cool features for generating textures in realtime. Check it out, maybe it can do some of the things you are wanting!
No, the material system is not what I need for this problem or using it in that way is needlessly complicated. The closest thing to the what I want is a render target however to my understanding there is no way to draw to a the texture on a pixel level.
Well at a glance you’re telling me it’s completely possible but there also doesn’t appear to be a high level solution, like “Use the UDrawTexture Class” or something like that.
Truly if that’s the case there really should be something like that, it’d be really handy to just be able to say something as simple as say
SetPixel(10, 20 ,0xFF8A00);
I suppose beggars can’t be choosers but the Epic should really get on that.
Thanks for the code, I’ll have to take a long hard look at all this. I really don’t know what’s going on here.
Your absolutely right for large textures setting each pixel one by one would be inefficient. You obviously want to involve the the GPU to generate the textures as much as possible. My gripe is more on the fact that there is no flat out built in simple solution.