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.

Switch between video and image with replaceTexture

Home Forums Puzzles Switch between video and image with replaceTexture

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #30425
    Avatarweb
    Licensee

    I’ve got a little issue with the replaceTexture puzzle.

    I would like to have two buttons, to switch between playing a video and showing an image on an object.

    Problem is that, as soon as I replace the map with the video, I can no longer switch back to the image, cause the map name doesnt exist anymore.

    What can I do to fix this?

    #30447

    Problem is that, as soon as I replace the map with the video, I can no longer switch back to the image, cause the map name doesnt exist anymore.

    Use two materials that look the same, load video texture into one and replace materials.

    Co-founder and lead graphics specialist at Soft8Soft.

    #30452
    Avatarweb
    Licensee

    Okay, will do it that way.
    Thx

    #31011
    Avatarweb
    Licensee

    Have to get back with this. This worked at first, but now it doesnt anymore and I dont know why.

    Maybe because of the latest update?

    I tried to debug this with a simple scene and pure puzzles. And it seems that after assigning the video material to the object, the other material gets deleted from the scene. Because after that happens the puzzle shows the material in red letters and in the dropdown it isnt anymore.

    • This reply was modified 2 months, 3 weeks ago by Avatarweb.
    Attachments:
    You must be logged in to view attached files.
    #31059
    Avatarweb
    Licensee

    Sorry to push that issue again. Would need to get this fixed pretty soon. So would be great if someone of the devs could get back to me :rose:

    Otherwise I would maybe need to create materials on runtime via javascript to workaround that issue.

    #31061

    Hi,
    in Verge3D 3.3 we introduced a feature when materials being replaced by other materials are automatically cleaned up. If you need to preserve it, assign (in the loaded asset or dynamically, via Puzzle) to some other invisible or remote object. So I believe in your case the issue is with geo_video material being clean-up by Screen material.

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

    #31062
    Avatarweb
    Licensee

    Nevermind, got it working.
    I just created two hidden objects as material holders.

    This way its working.

    • This reply was modified 2 months, 2 weeks ago by Avatarweb.
    #31063

    Simply assign the test material on some invisible plane in your modeling tool and reexport.

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

    #31065
    Avatarweb
    Licensee

    Damn, to slow.
    Got it working. Exactly as you said

    #31066

    Great!

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

    #32705
    Avatarnwn43
    Newbie

    Would you be able to show me (screenshots) of how you accomplished this? I’m looking to do the exact same thing. Possibly to swap a video texture with another video as well. I’m very new to this, and this has been a big stumbling block for something I’m looking to do. Any help would be appreciated. Thanks!

    #32736
    Yuri KovelenovYuri Kovelenov
    Developer

    Hi,

    you can check out the demo Video Texture if you’re using the Blender version.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #32773
    Avatarnwn43
    Newbie

    I looked at the blender monitor/aquarium file. I was able to change the image texture to a video texture, but I was not able to replace the video texture with an image, or another video texture.

    #32788
    Yuri KovelenovYuri Kovelenov
    Developer

    There were issues with video textures fixed in version 3.4 preview. You might give it a try. Here is a setup that works for me:

    Attachments:
    You must be logged in to view attached files.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

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