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.

Tween camera is laggy first run but then smooth.

Home Forums General Questions Tween camera is laggy first run but then smooth.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #64475
    pontus
    Customer

    Hello I am building an app in Verge3D for Blender and I am using the Tween camera puzzle to switch between different 3D models on event triggers. In total the application has 600K triangles (not so heavy).
    When loading the application and Tween the first time it is very laggy, but then smooth until the page is reloaded.
    How could i make sure that the transition with Tween camera always stays smooth?

    Also I would like to be able to “look at” a group of objects so that i don’t have to use the Zoom puzzle to center the model every time, this is just a wish for future updates.

    Best regards
    Pontus

    #64487
    xeon
    Customer

    Can you provide a screenshot of the performance metrics from Chrome Console?

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

    #64488
    kdv
    Participant

    Most likely not all meshes are shown on the screen initially. While tweening the camera shows new objects forcing the engine to initialize their geometry buffers and textures. It’s a little laggy process.

    Try this script before tweening. It will force updating all geometry buffers and textutes in the scene

    app.scene.traverse(function(obj) {
      if (obj.isMesh) {
        if (obj.material.isMeshNodeMaterial) {
          for (let name in obj.material.nodeTextures) {
            app.renderer.initTexture(obj.material.nodeTextures[name]);
          }
        }
        app.renderer.updateGeometry(obj);
      }
    });

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #64514
    vklein
    Customer

    I have this problem too with absolutely no geometry change or incoming/outgoing objects before, during and after the camera tween. In v3d 4.3 and 4.4.

    #64516
    kdv
    Participant

    with absolutely no geometry change or incoming/outgoing objects before

    Are sure? Press P+P+P before and after tweening and compare the count of geometry buffers

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #64615
    pontus
    Customer

    Thank you for the script and feedback! the script does indeed do a little bit difference, it is still a bit laggy though. I wonder what it could be.

    #64616
    kdv
    Participant

    At least you should show your app to see and test it. Telepates are somewhere else but not here. Nobody except you knows what you did in your app…

    One more probable cause: you show/hide objects while tweening. The first time it can be laggy.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

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