Announcement

Collapse
No announcement yet.

Swapping textures in a dynamic material instance with preloading

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Swapping textures in a dynamic material instance with preloading

    I have a bit of a weird problem. I have a material fed with only one texture parameter. This texture will be swapped out and replaced with 10 different textures from a blueprint. When you press a button the blueprint will cycle through the images and display them on the mesh.

    I have a slight problem though, and I am not quite sure where it's coming from. When I press the button the image changes, but for 0.1 seconds the image is blurry and after that it returns to a normal state. It seems though as if it does not have enough time to finalize the image or something similar. So, does anyone know where the problem might lie? Can I preload the textures somehow?

    The textures are 2048x2048, they have streming enabled and so on.

    Cheers!

    #2
    what you're seeing is ue4 streaming in mips first, probably at 256 or 512, until it can load the full 2048. you could set a minimum mip level for it, or disable mipping, but that will cause aliasing problems at distance
    CEO of Prydetech

    https://www.artstation.com/ixicalibur

    Originally posted by ixicalibur
    Here you go, this is a link to every tutorial you could ever need plus instructions to access all the collective knowledge of mankind: [Super massive awesome link that every amazing game developer uses to instantly learn to be super awesome at making stuff]

    Comment


      #3
      Another option would be to create instances of the material and assigning them to the mesh.
      Or try and use 2 materials and toggle between them (double buffer style), but Im not sure if that would make a difference....

      Comment


        #4
        Set two textures at once for material and lerp between them based on frame fraction. Or just don't use second texture but this way engine is forced to stream it.

        Comment

        Working...
        X