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
    web
    Customer

    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
    web
    Customer

    Okay, will do it that way.
    Thx

    #31011
    web
    Customer

    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.

    #31059
    web
    Customer

    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.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #31062
    web
    Customer

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

    This way its working.

    #31063

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

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #31065
    web
    Customer

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

    #31066

    Great!

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #32705
    nwn43
    Participant

    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

    Hi,

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

    Chief 3D Verger | LinkedIn | Twitter

    #32773
    nwn43
    Participant

    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

    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.

    Chief 3D Verger | LinkedIn | Twitter

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