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.

Replace texture sometimes fails

Home Forums Graphics / Blender Replace texture sometimes fails

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #53159
    raphroberts
    Customer

    Hello!

    I have a couple of ‘replace texture’ puzzles, and I am finding that sometimes they are working but sometimes they fail. The attached image explains the problem.

    Not sure if I am doing something wrong, or some kind of bug? Ive noticed in web inspector, a lot of files appear to be loading twice, and sometimes failing? Not sure if that is normal or not.

    Thanks for all your help :)

    Attachments:
    You must be logged in to view attached files.
    #53161
    raphroberts
    Customer

    Quick update – it seems the problem is only occurring in Safari (15.5). So it’s no pressing concern but perhaps something worth knowing about. Thanks all!

    #53163
    xeon
    Customer

    Hey there,
    Based on the console log I don’t believe the files are loading twice.
    It seems you have a server that is delivering the files in byte ranges instead of single files. This is common on apache servers. It’s an option that can be turned on or off but it has some advantages.

    Replacing textures with video can lead to black screens if the request for the video file is made before the video is actually downloaded as well as if the video file itself doesn’t exist.

    What you will want to do is “preload” the video probably in the init tab and if you are able, make sure its one of the first files to begin downloading.

    With that said, you need to validate the video is downloaded and ready to play before making a request to play it. This can be done a number of ways. But if you are using puzzles only, load the puzzle in the init using connector puzzle ( in the advanced tab) and get it preload. Assign it to some offscreen object and set the playback frame to any other chosen frame i.e. frame 1. Then test that video to make sure it made it to that frame. If not, then the video is not loaded. If the test is true then reset the video to frame 0 and play the video as you have it.

    The second file you have listed although the same name have different extensions. Ones the .js and the other .css so that will make them look like they are the same file.

    Overall looks good I was playing with your demo the other day…hope all goes well.

    Regarding Safari 15.5… I think if you put the video testing in you will find it runs fine in Safari 15.5…at least it does here.

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

    #53165
    raphroberts
    Customer

    Thanks Xeon!

    Funny that I can’t reproduce the problem in Chrome but it happens a lot in safari even if I wait 10 seconds before clicking the button (on local server too) – for this reason, I wouldn’t think that it’s caused by the file not being fully cached.

    I will ask our server admin about what you have mentioned re: bytes vs files.

    Thanks for your input, much appreciated :)

    #53167
    xeon
    Customer

    Although Safari and Chrome are built on Webkit, Safari just does things differently and not always the way developers are happy with as you are finding out. Safari is a tad slower when playing back video, especially if the video is not to their specific standards and your web server is not packaging them the way it wants. Of course, it will play but it will have a bit of a lag if not all the requirements are met. Chrome on the other hand…less picky and will just play the file and hope your system and internet can keep up. Two acceptable methods, but require us as developers to take both scenarios into account and manage the video loads.

    The other thing you will have to watch out for is if your buffer goes over 50MB…Safari will just not run the video if you are over budget. Lots of little things affect video performance. Safari is just pickier than most.

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

    #53168
    xeon
    Customer

    just to test things out…. I tested your demo on chrome and safari latest OSX and browsers and they responded with the same speed.

    I then downloaded your sample file directly.

    in Safari and Chrome and both played back without issue as well.

    I also took a look at the console and I am not getting batched file downloads as shown in your console image. But over here…in the US…the demo seems to be functioning well regardless of the browser.

    However, since you are having the problem…see what happens in Safari when you download the file directly?

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

    #53173
    raphroberts
    Customer

    Thanks Xeon,

    You’re right, safari is a challenge sometimes! I am not sure what you mean by downloading the file directly – the mp4 file certainly plays on my local machine. The problem also occurs regardless of whether I use localhost or cloud hosting.

    I am not particularly worried – given it is working properly in other browsers, I just thought the verge devs may want to ensure it is not something in verge that is having trouble – particularly because texture swap puzzle with compressed textures is new in version 4.

    Regardless – appreciate you taking the time to get back to me and thanks again for the feedback and for sharing your results.

    Cheers,
    Raph.

    #53251
    xeon
    Customer

    The link above is to the video file itself. Does your Safari have issues playing it back other browsers?

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

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