pichou

Members
  • Content Count

    99
  • Joined

  • Last visited

About pichou

  • Rank
    Advanced Member

Contact Methods

  • Twitter
    PichouPichou

Profile Information

  • Gender
    Male
  • Location
    Paris

Recent Profile Visitors

968 profile views
  1. pichou

    idleRotationWaitTime not working?

    Hummmmmmm Okkaayyyyyyyy! 😅 I haven't read the document carefully enough. Sorry I did not understand we had to add autoRotationBehavior property. Thanks! Perhaps that could be more obvious in the documentation? @Deltakosh Can you tell me how to make a PR on the documentation please?
  2. Not sure if it's a bug but it seems like camera property idleRotationWaitTime is not working. Look at this playground, whatever the time you put, it always wait 2-3 seconds before starting moving again : https://www.babylonjs-playground.com/#6FBD14#75
  3. Hi everyone, I come here to share with you something While working on a project, I had issues because of the maxSimultaneousLights for a material. Indeed my scene can have a lot of lights. Rather than increasing the maxSimultaneousLights parameter, I thought it would be more performant to check what was the mesh around the light depending on its range. So I ended up with this code : checkIncludedMeshes () { let includedContent = []; for (let i = 0; i < scene.meshes.length; i++) { let mesh = scene.meshes[i]; if (mesh.absolutePosition) { let dist = BABYLON.Vector3.Distance(this.light.absolutePosition, mesh.absolutePosition); if (dist < this.light.range) includedContent.push(mesh); } } this.light.includedOnlyMeshes = includedContent; } But then I ask myself: "Why is it not the default light behaviour in BABYLONJS?" I guess there would be performance issues doing that. Anyway, I wanted to have your opinion on this and I thought that could help the community!
  4. Most of the time geoJSON are made of latitude/longitude coordinates which you can easily translate to babylonJS Vector3 with this function : let getVectorFromLatlng = (lat:number, lng:number, radius) => { var phi = (90-lat)*(Math.PI/180), theta = (lng+180)*(Math.PI/180), x = (radius) * Math.sin(phi)*Math.cos(theta), z = (radius) * Math.sin(phi)*Math.sin(theta), y = (radius) * Math.cos(phi); return new BABYLON.Vector3(x/3, y/3, z/3); }
  5. pichou

    WAZANA.IO

    A lot of very nice feedback since WAZANA.IO is featured on the BABYLONJS homepage. I suspect you guys to help me make this game even better! Huge thanks
  6. pichou

    Plane tangent to a sphere

    Hi @ssaket, I needed to keep my latitude longitude approach but thanks to your suggestion, I managed to get the right formula: https://www.babylonjs-playground.com/#VDG184#9 Thanks, I didn't know about the alignWithNormal function but very useful! Cheerz
  7. I am sure the problem is already solved somewhere and well known but I can't find a working solution. I have a sphere with planes around it and I need those planes to be tangent to the sphere depending on its position. I have made a playground with my basic setup: https://www.babylonjs-playground.com/#VDG184#2 You will see 2 solutions I tried but which are not working, one using path3D and one with basic math. Thank you, Pichou
  8. pichou

    task file weight

    Ok I know how to do it then. But that means I will have to load the files twice and I don't want to do that both for the servers and clients. Guess I will find another way! Thanks for your help @Deltakosh
  9. pichou

    task file weight

    When I go to my network console and look at the headers, there is always the Content-Length. Maybe there is a way to get the xhr of a task in the assetManager? This way I could calculate the weight I am looking for?
  10. pichou

    task file weight

    Hum I see! I found we could get the length with the xhr like this : ```parseInt(xhr.getResponseHeader("Content-Length"))``` if you already use it for the progress, I guess we can also have it somehow when the loading is finished? If some task/file doesn't have Content-Length indicated by the server it is ok because the result I want doesn't have to be exact.
  11. pichou

    task file weight

    Nope to be more specific, the exact thing I am looking for is to know the entire scene weight. Meaning what is the total of data in bytes that need to be loaded in order to render the scene. So after everything has been loaded and not during the progress. Maybe a way to reach the "Content-Length" header of each asset request?
  12. pichou

    task file weight

    Hello babylonjs community, Is there a way to have the file weight uploaded with the assetManager whatever the type of file? Cheerz, Pichou
  13. pichou

    WAZANA.IO

    Sorry @Deltakosh I haven't seen you asked for a screenshot. I even have a better stuff illustrating the game for you (hope this is not too late) :
  14. pichou

    issues with toEulerAngles

    Very nice simulation! Indeed it hasn't change much my computer performance eventually. I think this is more my curiosity which has pushed me to ask!
  15. pichou

    issues with toEulerAngles

    I have another question link to quaternion calculation. I am sure there is not a straight answer but how hard will rotationQuaternion be on CPU/GPU compare to basic rotation? I feel like maybe my last changes with quaternions made my computer less happy!