SvenFrankson

Members
  • Content count

    94
  • Joined

  • Last visited

About SvenFrankson

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://www.svenfrankson.com
  • Twitter
    FranksonSven

Profile Information

  • Gender
    Male
  • Location
    France

Recent Profile Visitors

1,107 profile views
  1. SvenFrankson

    3D Spaceship Camera

    In case it help, I did some camera for flying spaceship for this demo Here is the script about the flying camera following the spaceship : https://github.com/SvenFrankson/space-scout/blob/master/scripts/SpaceShipCamera.ts Line 55, there's an update loop for the camera. Main idea is that I keep an empty mesh at a fixed position relatively to the spaceship (it's the vector named _targetPosition), and lerp to it each frame with a smoothness factor. It makes the camera go to a point with some delay, so when spaceship accelerates you feel it a little more because it goes further. A Slerp make the camera rotationQuaternion go to the spaceship rotationQuaternion, so barrel rolls are smoothed too. For the most part it's inspired from the Galactic StarFighter mode of Star Wars The Old Republic. Hope it helps, good luck !
  2. SvenFrankson

    What causes a mesh to look like swiss cheese

    Have you tried checking the real value of numBoneInfluencers on your mesh ? For example, add in your loading method, where myAnimatedBinder is your animated mesh. alert(myAnimatedBinder.numBoneInfluencers) (debugging mobile like a boss, but note that alternative and more sophisticated methods involve a properly setup Safari browser and a USB-Iphone cable...) If it says less than 4, some bone influences might be dropped, causing the holes...
  3. SvenFrankson

    What causes a mesh to look like swiss cheese

    Is the binder animated with bones ? If so maybe it's because of limitations about the "bones per vertex" number ? I think it's low for mobiles (documentation says 3 on mobile, 4 on desktop https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons )
  4. Hi, You can add a resize after the first frame, it will be ok. this.animate(); setTimeout( () => { this.engine.resize(); }, 100 ); (but it's a fix, I don't really understand why the issue happens in the first place, I also experience it quite often)
  5. If it's only one station you wan't to display, I'd say your problem could come from the fact your meshes are not designed to be used in a real time application. Where did you got them ? Every 3D drawing software has a decimator tool to reduce the amount of triangles in a model, try using it on pieces too detailed. The fact you want to keep the ability to pick meshes make it harder to reduce the mesh count. I'd try something like this : https://www.babylonjs-playground.com/ts.html#IDBWZN#1 The rail sleepers are merged together, so only 1 draw call, but when picking you can get the index using the world position. A more generic and elaborated way could be using another information in the mesh, for example the UV2 channel if you are not using it yet. https://www.babylonjs-playground.com/ts.html#IDBWZN#2 Here, you merge the meshes but stores an information about their original index in the UV2 channel. Whenever you click, check the value of the UV2 channel where you clicked, and you know which element you picked in the mesh.
  6. SvenFrankson

    TYPESCRIPT in Playground

    That's really great, thanks a lot !
  7. I think each mesh requires as many draw calls as it has subMaterials, which would explain the huge draw calls count. Any hint about what you are trying to render ? A full city ? A very detailed building ? The easiest way to improve performances would be -> Freeze meshes not moving. If a mesh only move "sometime" (on user input for example), keep it frozen when it's not. There's some true optimization here, if not done already. -> Merge meshes sharing materials together, you will reduce the draw calls count, also some true optimization. It's harder, but you will also need some LOD and / or baking into texture, because I'd say your triangle count is way too high... Everything's here : https://doc.babylonjs.com/how_to/optimizing_your_scene Good luck !
  8. SvenFrankson

    Moving diagonally at the same speed as horizontal/vertical

    Oups, indeed kurhlaa is right here
  9. SvenFrankson

    Moving diagonally at the same speed as horizontal/vertical

    Maybe it will work with X = sqrt(3) and Y = sqrt(3) ?
  10. SvenFrankson

    Is there a way to modify material ID of imported meshes?

    I need something like this too (removing textures from imported material), the way we do it is $.json( { url: "model.babylon", success: (rawData) => { data.id = "newId"; data.mesh.material.id = "newId"; BABYLON.SceneLoader.ImportMesh( "", "data://" + JSON.stringify(rawData); scene, (meshes, particles, skeletons) => { // success callback } ) } } ) (It's pseudocode, the success callback in the first $.json call is likely to be much more complicated...) The idea is you first load the .babylon file as a Javascript object, so you may edit it easily. Once all changes are made, you serialize and re-inject it. (It would be better to be able to load a mesh from a Javascript object, but it requires some changes in Babylon code...)
  11. SvenFrankson

    What's next?

    Mine too, but why would you assume it's a deletion ? It looks like a bug...
  12. SvenFrankson

    NASA turns to Verge3D

    Great job ! Is this app made only using your "Interactivity without coding" feature ? Are the handles in the scene (the blue arrow moving the cameras for example) from a ToolBox in your software ?
  13. SvenFrankson

    What's next?

    Are you sure we can ? I don't fully understand how SubMesh are implemented, but it seems copying the array would not set subMesh._mesh or subMesh._renderingMesh,
  14. SvenFrankson

    What's next?

    What about this feature ? https://playground.babylonjs.com/index.html#6FLBU3#2 I often need to extract VertexData from meshes with submeshes, but it ignores the submeshes. Maybe there's already a way to do it without keeping track of the submesh indexes along the VertexData ?
  15. SvenFrankson

    How to get circumference of mesh?

    Your hit variable is never null, there's a boolean property hit.hit telling you wheter your ray touched something or not https://www.babylonjs-playground.com/#KNE0O#94