Hi all, I hope you can help me with this:
I am downloading a texture in runtime to use it as a texture. However, mipmaps are not generated, so there’s a moiree effect going on (texture is not smooth). Is there a way of generating mipmaps once the texture is downloaded using blueprints?
Thank you for your help, Bits360. It’s already in power of 2, though (1024 X 1024). The same texture works fine if I import it manually through the editor.
I’m starting to think there’s no way of using an image downloaded at runtime as a texture…
Render targets can generate mipmaps, and you can draw a material to a render target via the “Draw Material To Render Target” node.
Basically you get your download texture, put it into an emissive material. In blueprint, you create a render target with mipmaps enabled and then you try drawing the material to it. Then you would use the resulting render target in your final material. I’m not sure this will actually work though as I have never tried it.
I believe that is correct, yes. But since it’s a static texture you only need to capture one frame. You may see a performance hitch when it does the capture though.
Unfortunately this is the only idea that I have so I’m not sure there’s any way to avoid that. Hopefully someone smarter than me will offer something less janky.
As far as render targets go, this should be so simple that even the most basic tutorials on the subject are overcomplicated… I’ll give them a try later. Thanks!
All the tutorials are severely over-complicated. To summarize converting a material to a texture, Make a plane, make an orthographic camera, with the height/width of the plane face the plane, use the output from the orthographic camera.
It works! The only problem is that, whenever I select Autogenerate Mipmaps and the texture is bigger than 256 px x 256 px, the render target gets all black! (see screenshots)