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.

shantiscript

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • in reply to: Error Using v3d module import in react #36844
    shantiscriptshantiscript
    Customer

    Sorry what do you mean with guess? Is it supported or not?
    And if its not supported yet, what is the function of the module file?

    in reply to: Error Using v3d module import in react #36823
    shantiscriptshantiscript
    Customer

    Yes. I have been working with the integration described in the link for a while now without problems. But i am trying to improve the provided integration by moving to import statements directly in app.js

    In the template the verge3D library is imported by using a script tag in index.html

    Under step 4.)
    <script src="%PUBLIC_URL%/v3d.js"></script>

    Instead of that i am trying to import the verge3d modules from v3d.module.js (which should provide verge3d as modules that can be imported) directly in app.js

    • This reply was modified 2 months, 2 weeks ago by shantiscriptshantiscript.
    • This reply was modified 2 months, 2 weeks ago by shantiscriptshantiscript.
    shantiscriptshantiscript
    Customer

    Yeah in the puzzles you would create some function, either a while loop that constantly checks if the first frame has been rendered. Or a interval function that checks if the first frame has been rendered.

    In code i created a function that first checks if the first frame has been rendered already and if not it runs a check function at an interval of 200ms. The function returns a promise in booth cases

    you can then run or trigger anything that needs to wait till the first frame has ben rendered in the then() block of that function

    waitForFirstFrame().then(runAnimations(animations, { frame: 553, speed: 1 }))

    in the example runAnimations will wait till the first frame has been rendered and then start an animation

    • This reply was modified 3 months, 1 week ago by shantiscriptshantiscript.
    • This reply was modified 3 months, 1 week ago by shantiscriptshantiscript.
    shantiscriptshantiscript
    Customer

    Just an update on this for anyone who might come across this again. There is a better way than using a timeout function to solve this. If the timeout function is too short on a slow device you could still run into running functions before the first frame is actually rendered.
    The app instance has a property called frame

    https://www.soft8soft.com/docs/api/en/extras/App.html#frame

    By checking if the the first app frame has be rendered (for example using an if condition) you can make sure that nothing runs before the first frame has be rendered to the screen

    in reply to: Updated App Integration for Vue.js And React #35768
    shantiscriptshantiscript
    Customer

    Thanks Yuri for the fast reply
    :good:

    shantiscriptshantiscript
    Customer

    Awesome that worked!

    shantiscriptshantiscript
    Customer

    Hi thanks for the replies!!!
    I don’t think you really understand the problem i am running into, so i will try to rephrase.
    I disabled auto run in blender for the animation and used the play animation puzzle placed in the main tab as Yuri described.

    The problem with that is that the animation starts playing the key frames of the animation before the scene is visible to the user (before the first frame of the actual app is rendered to the screen). Means the animation already starts playing in the background while the loading screen is still indicating the loading. So half of the animation has played once the scene is actually visible to the user.

    This is because in my understanding the run() method that is called inside of app.loadScene triggers the render of the app instance after the loadScene callback is fired (once the gltf loader has fetched the gltf into the app instance)
    But code thats executed in the puzzles or in run() doesn’t wait for the render function to finish but its executed asynchronously right after the run() function has been called. It doesn’t wait for the first render to be finished and there is no callback or promise to wait for that to happen.
    So if the render takes longer to execute all animations triggered with the puzzle on start or in run() will already start running in the background

    So i need a way to wait for the animation to start until the first render is completed.

    shantiscriptshantiscript
    Customer

    Just to add when using the play animation puzzle in the puzzle editor the same thing happens.
    The animation starts playing before the first frame is rendered and half of the animation already happened once the first frame renders.
    I can’t use autostart (in Blender export) to trigger the animation as there are some other dependencies in javascript in my project, so i need to start the animation by using javascript/puzzle

    shantiscriptshantiscript
    Customer

    hi I allready found an answer myself:
    https://stackoverflow.com/questions/16625969/how-do-i-change-the-same-parameter-on-multiple-objects-efficiently-in-blender

    copy to selected is the magical command.

    Still would be courius about las question. Can i change all settings for export globaly?

    shantiscriptshantiscript
    Customer

    Another quesiton. Is it possible to change the animation settings globally for the whole export? I want to trigger all animations through code in the end and would like to dissable on all animations on start for export. But have the ability to also turn all of them on easily for the purpose of building and testing

    in reply to: Memory Leaks In Single Page Vue.js Application #30731
    shantiscriptshantiscript
    Customer

    Thanks for the very detailed reply and also for fixing the memory leak of dispose so quickly.
    Also the api explanations of dispose and unload are much clearer now. This is very helpful. I want to work on loading models dynamically into scenes and now its clear where and when to use unload instead of dispose.

    Thanks

    in reply to: Memory Leaks In Single Page Vue Application #30730
    shantiscriptshantiscript
    Customer

    Thats fantastic, thanks.

    in reply to: Verge3D 3.3 pre3 available! #30729
    shantiscriptshantiscript
    Customer

    Thanks for the fast response on this, appreciated.
    I tried the updated version and all works smoothly now. For the previous problematic scenes render time went down now by 3 to 4 seconds which is fantastic.
    Thanks for the improvements made

    in reply to: Verge3D 3.3 pre3 available! #30715
    shantiscriptshantiscript
    Customer

    Hi,
    i did load the scenes multiple times in booth versions. So it would have been cached for version 3.3 as well. The difference in loading time with this specific scene is 17 second and stays the same even if i load multiple times. I also tested this with incognito mode, to make sure that there is no cached version yet, and same results
    So it can’t be the cache.
    There seems to be an issue with the new version using scenes that have larger texture maps. I tried a couple different scenes and the once with smaller texture maps are loading faster while the once with bigger texture maps got worst.
    I tried to upload this specific scene (that got 17 seconds slower) to the verge network but the upload is super slow.
    So i removed the blender files, zipped the app folder and uploaded it to my gdrive. I created one version with verge 3.3 and one with 3.2.
    Can you please have a look and test? As other users have reported slower scenes as well i think there is some problem for specific configurations. Nothing changed between the two apps, i only updated to version 3.3

    version 3.2:
    https://drive.google.com/file/d/18agspUHv3K-WZwEHT9-5qU7of6-zxuf7/view?usp=sharing

    version 3.3:
    https://drive.google.com/file/d/18AsjQ-Bry2ljIcBqq_sWZmS1HuIx4ljh/view?usp=sharing

    if you need the blender files as well, please let me know then i will upload them

    • This reply was modified 7 months, 1 week ago by shantiscriptshantiscript.
    • This reply was modified 7 months, 1 week ago by shantiscriptshantiscript.
    • This reply was modified 7 months, 1 week ago by shantiscriptshantiscript.
    in reply to: Verge3D 3.3 pre3 available! #30694
    shantiscriptshantiscript
    Customer

    Also Is the missing support for the parallel compiler due to old computing hardware? If so this could be an issue for a lot of people with older computers and older phones? But i guess for these ones you switch back to legacy compilation automatically?

    • This reply was modified 7 months, 1 week ago by shantiscriptshantiscript.
Viewing 15 posts - 1 through 15 (of 23 total)