We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Repalce texture lagging ?

Home Forums Puzzles Repalce texture lagging ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #70302
    aortalab
    Customer

    Hello,

    I though I was being smart by reducing the number of meterials in my scene and using replace texture instead, but now I have an lag issue and I hope you guys can tell me what I have done wrong!

    I have two different object with different UV but the same materials.
    I use the replace texture to make sure that as I switch to the other object the material change accordingly.

    It works… but as you can see in the .gif that I linked, it lags before changing to the right texture.

    The textures are black/white non color 2048*2048 and about 1.5mb.

    Thanks for your help.

    Quentin

    • This topic was modified 10 months, 2 weeks ago by aortalab.
    Attachments:
    You must be logged in to view attached files.
    #70311
    xeon
    Customer

    I personally would need a bit more info but here are some things to consider.
    Replacing a texture (depending on its size) and the machines abilities can take a beat. How larger are your PNGs and are they already loaded in memory when you do the swap?

    The number of materials is not going to be the issue typically when it comes to scene load efficiency…it has a roll but insignificant in comparison to the number of Images/textures you have. If you want to be efficient, you use one texture for both objects.

    Alternatively if you want to keep it the way it is…you may want to preload your textures that are not currently loaded. Basically create small triangle faces and assign a material you want to use as the swapping material. This will insure the mat is loaded in memory…then you just change materials…..make sure the original material also has a small hidden triangle somewhere. This will eliminate the loading lag you are getting.

    Although not your exact problem the process is described here: https://www.xeons3dlab.com/post/assign-materials-puzzles

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #70321
    aortalab
    Customer

    The solution from Mikhail

    “If you have only 2 or 3 texture to change you can put them directly into your main material and combine them with mix color node with connected value to the inputs of this nodes and switch them even smoothly”

    On this post : https://www.soft8soft.com/topic/preload-collection-of-textures/

    Helped me get a smoother result. :yahoo:

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.