Dad72

Members
  • Content Count

    4,168
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Dad72

  1. Dad72

    SPS Optimization : Feedback Wanted

    Windows 10 -- CPU i5-2300 -- GPU GTX 1050 ti -- Chrome 69 : Result : Of 2000 to 8000 => 44FPS (Legacy) Of 2000 to 10000 => 60FPS (refactored) ----------------------- Legacy: 12 000 particle => 31 FPS refactored: 12 000 particle => 53 FPS ----------------------- Legacy: 14 000 particle => 27 FPS refactored: 14 000 particle => 46 FPS ---------------------- Legacy: 20 000 particle => 18 FPS refactored: 20 000 particle => 32 FPS ----------------- Legacy: 40 000 particle => 11 FPS refactored: 40 000 particle => 17 FPS For me the refactored version doubles the performance. Super optimization.
  2. I changed that: line 5: scene.gravity = new BABYLON.Vector3( 0, -0.75, 0 ); line 43: subdivisions: 384; line 48 : gmsGround.optimize(16); 2048 subdivisions is huge, you will have a significant loss of FPS
  3. @jdavid, I use a value of -0.75 which gives a good result. -9.81 is for the physics engine. For collisions without physics, I use a value between -1.0 a 0 You have something better here : 58 a 60 FPS http://www.babylonjs-playground.com/ts.html#IIFQWH#10
  4. Dad72

    BabylonJS Editor V2

    @Luaacro, This was done with the GUI : https://www.babylonjs-playground.com/#XCPP9Y#650 And you, in what ways did you do it?
  5. I noticed this recent problem with the water making some area of the land transparent. It's about a week ago basically. IF I try the version from 3.2, it does not work anymore. If I remove the soil from the refraction with: water.addToRenderList (ground); it works, but the water is not pretty. https://www.babylonjs-playground.com/index.html#1SLLOJ#517 If I try with the previous Stable version, it tells me BABYLON.WaterMaterial is not a constructor. On my project, it makes half of my land transparent.
  6. Dad72

    Transparency of the ground with water

    Yes, I saw that yesterday Thank you Deltakosh
  7. Hi @trevordev, I found, I think, a bug to recover the change of position / rotation / scaling with the observable DragStart and DragEnd which retrieves the same position value for example. If I start with DragStart, I should recover the position of an object at the start, that's OK, but when we move and release (DragEnd) the position of the object should have changed, but it is the same as with DragStart and yet the object was moved on the stage, but not in the recoverable value in the observable. A PG is better than a long explanation: (move the X axis (red) and look at the values in the console. the x position is the same as dragStart and dradEnd) https://www.babylonjs-playground.com/#4TBMBR#8 PS: Using e.dragPlanePoint.x it gets the X position of the gizmo pointer and not the pivot object select (maybe we could get the object selected) I find it very repetitive to use an observable for each axis. This gives : This would be shorter : gizmoManager.gizmos.positionGizmo.Gizmo.dragBehavior.onDragStartObservable.add((e)=>{ console.log(e); }); gizmoManager.gizmos.positionGizmo.Gizmo.dragBehavior.onDragEndObservable.add((e)=>{ console.log(e); }); than that : gizmoManager.gizmos.positionGizmo.xGizmo.dragBehavior.onDragStartObservable.add((e)=>{ console.log(e); }); gizmoManager.gizmos.positionGizmo.yGizmo.dragBehavior.onDragStartObservable.add((e)=>{ console.log(e); }); gizmoManager.gizmos.positionGizmo.zGizmo.dragBehavior.onDragStartObservable.add((e)=>{ console.log(e); }); gizmoManager.gizmos.positionGizmo.xGizmo.dragBehavior.onDragEndObservable.add((e)=>{ console.log(e); }); gizmoManager.gizmos.positionGizmo.yGizmo.dragBehavior.onDragEndObservable.add((e)=>{ console.log(e); }); gizmoManager.gizmos.positionGizmo.zGizmo.dragBehavior.onDragEndObservable.add((e)=>{ console.log(e); });
  8. Thank you Trevor. And for the use of dragStar and end on the position, rotation / scale. What changes? gizmoManager.gizmos.positionGizmo.zGizmo.dragBehavior.onDragEndObservable.add() should we do like this? gizmoManager.gizmos.positionGizmo.dragBehavior.onDragEndObservable.add() Or gizmoManager.gizmos.positionGizmo.onDragEndObservable.add()
  9. Dad72

    Contributing to documentation 101

    You can also loaded it and hide it with setEnabled (false) or isVisible = false Then display it only when you need it.
  10. 60FPS here. Your subdivisions was much too high for a terrain of 512 * 512. http://www.babylonjs-playground.com/ts.html#IIFQWH#3 Try to display your land in wireframe mode to see your subdivisions. Putting 200 in subdivision for a terrain of 512 * 512 is more than enough. (You can push at 220 can be, but too much subdivision (when using collisions in the field) lower the FPS. Now an Octree usually fixes this problem, but there is a bug in Chrome with Octree I think, because the terrain should not disappear. Unless it's a bug in Babylon. Deltakosh will tell us more. I add to your code : camera.ellipsoidOffset This brings up the camera for slides better on the ground and to improve the collision with the ground. When a collider is too deep in the ground, it tends to drop the PFS
  11. Dad72

    Serialize mesh with actions

    Lorsque je sérialise un objet qui a des actions, j'ai une erreur avec le maillage : http://www.babylonjs-playground.com/#GI1F90#71
  12. Dad72

    Serialize mesh with actions

    In fact I do not need to serialize the actions. I use them just to have a hover point on the meshes. So, perfect if the crash is fixed. Thank you Sebavan
  13. I think my scene has increased between 3.2 and 3.3 which makes me think that. and I did not use labels yet Ok, but the fall of FPS is pretty huge I think, no ? What is the way to optimize this? Arf, that's not the subject of the post, I thought it was bind, but no.
  14. In fact, I think it's because of the GUI label that I create when there are some numbers. When we have some objects, as well as GUI tags, this is where it starts to degrade many FPSs. http://www.babylonjs-playground.com/#3YFJ5R#3 Try to move the camera, zoom in and out. If you stop the camera, it goes back to 60 FPS
  15. @Deltakosh, I noticed since the version 3.3, when one moves the camera (free or rotate ...) the FTP moves enormously between 50 and 60 FPS. It is enough that I move a small millimeter so that the FPS goes from 60 to 51, 52 FPS. IF I do not move the camera, I stay at 60 FPS. When I move the camera for a long time, the FPS can put down <= 40 (-20 FPS just by moving the camera) I think there must be some worries somewhere. Before 3.3 did not change anything to the FPS when moving the camera.
  16. Dad72

    Bug on Safari 12 BJS 3.2

    I suppose. All the browsers, do not have WebGL 2 yet to support I believe.
  17. Dad72

    Bug on Safari 12 BJS 3.2

    Yes, Chrome uses WebGL2
  18. Sorry, it was for GroundMesh and not Mesh. But you create ground with GroundMesh logically with Heightmap. http://doc.babylonjs.com/api/classes/babylon.groundmesh#optimize
  19. Octree can help with the collisions in the field. and mesh.optimise () can be found in the API. When I create large terrain with collision, I use Octree + optimize () and it always makes me return one of the PFS to 60.
  20. I think that Babylon has in the latest version some small performance problem due to small bug in the latest version of Chrome (if you use Chrome). I made a field editor that runs at 60 FPS: https://bitbucket.org/JSbabylon/terraineditor Try to see what this gives. You can also use an octree in the terrain, but currently Octree is lowering the performance because of the Bug in Chrome. which I hope will soon be fixed. There is also terrain.optimize (64); who can help. You can also reproduce your way of doing it in the Playground.
  21. Hello, Does anyone have an idea of how to create a splashScreen on the user's screen. A kind of foreground image that lasts only a few seconds with a flicker. Thanks
  22. Dad72

    How to create a splashScreen

    Yes, I had not paid attention to that (clearInterval). Thanks for reminding me.
  23. Dad72

    How to create a splashScreen

    Thank you Gijs. it seems simpler than I imagined and works pretty well. I imagined a post-process or something like that. Thank you very much.
  24. On this official demo when I activate Use GPU Particles, it produces a strange thing. (How to say: She runs away, running. and enters the fourth dimension 🤣) https://www.babylonjs-playground.com/#BHNVUE#2