Home › Forums › General Questions › Tween camera is laggy first run but then smooth.
- This topic has 6 replies, 4 voices, and was last updated 1 year, 6 months ago by kdv.
-
AuthorPosts
-
2023-06-09 at 8:37 am #64475pontusCustomer
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
Pontus2023-06-10 at 2:52 pm #64487xeonCustomerCan 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.com2023-06-10 at 3:55 pm #64488kdvParticipantMost 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.
2023-06-12 at 3:23 pm #64514vkleinCustomerI 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.
2023-06-12 at 3:33 pm #64516kdvParticipantwith 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.
2023-06-14 at 2:15 pm #64615pontusCustomerThank 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.
2023-06-14 at 2:19 pm #64616kdvParticipantAt 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.
-
AuthorPosts
- You must be logged in to reply to this topic.