Cloth Simulation Using Distance Constraint - Three.js & Cannon-es Tutorial

Поділитися
Вставка
  • Опубліковано 2 лис 2024

КОМЕНТАРІ • 26

  • @ahmedfarooq7253
    @ahmedfarooq7253 2 роки тому

    Wael Yasmina You Are Thee Great. Your content worth $$$$$$. Dont Skip Keep Posting

  • @creativeplanet2820
    @creativeplanet2820 2 роки тому

    Thank you very much, for taking time and creating these in-depth videos, we're in your debt. Thanks!

  • @AndersonMancini
    @AndersonMancini 2 роки тому +1

    Amazing work man. Your videos are always great to learn theejs. Congrats 🤩 👏🏻

  • @alvarobyrne
    @alvarobyrne 2 роки тому

    As always: high quality content

  • @berkakgun7160
    @berkakgun7160 Рік тому

    Keep it up! Great job

  • @precisionchoker
    @precisionchoker 2 роки тому

    Hey there, thanks for your great work
    keep up 💪🏽

  • @nik0294
    @nik0294 Рік тому

    the ball stands still and passes through the cloth. Is it works now?

  • @HumbleHustle101
    @HumbleHustle101 Рік тому

    Nice video, Can you make a video on how to show cloth physics on animated 3d character in threejs?

  • @bilaluddin2345
    @bilaluddin2345 2 роки тому

    Is there a way to implement real world physics to model something in the world. For instance, expanding on the solar system video you made, is it possible for the planets to orbit in a way that it takes in account mass and many other masses around it

    • @WaelYasmina
      @WaelYasmina  2 роки тому

      Although I haven't tried but yes you should be able to do that. Physics libraries are made to imitate real-world physics after all.

  • @karol7349
    @karol7349 Рік тому

    Cool example ! Is there a good way to put this kind of particle mesh on a 3d object (not a 2d cloth)? calculating connections is much harder in that case

  • @dt123-js
    @dt123-js 2 роки тому

    Is there any way to rotate the cloth?
    I tried to use quaternion, but it didn't work. I'm fairly new at cannon so I couldn't figure out how to do it. By the way keep up the good content :)

    • @WaelYasmina
      @WaelYasmina  2 роки тому +1

      Yes it doesn't because if you think about it. The positions of the mesh's vertices are being set from the physics bodies (the particles). Therefore rotating the mesh won't work.
      What you should do instead is reset the position of the bodies (the particles).
      So if you want to set the rotation initially you can do that by changing this line: position: new CANNON.Vec3((i - Nx * 0.5) * dist, (j - Ny * 0.5) * dist, 0),
      Or you can change it later by calling: position.set()

    • @dt123-js
      @dt123-js 2 роки тому

      @@WaelYasmina Thank you so much! ❤️

  • @MuhammadUmer-pm1ot
    @MuhammadUmer-pm1ot 2 роки тому

    Is it possible to apply a 2D garment design onto a 3D model with three.js?

    • @WaelYasmina
      @WaelYasmina  2 роки тому

      I haven't done something like this before so... I'd say maybe, but it's gonna require a lot of work.
      Try to ask in their official forum or Discord server. You'll probably get directions from people with high expertise and maybe the devs behind the library themselves.

    • @MuhammadUmer-pm1ot
      @MuhammadUmer-pm1ot 2 роки тому

      @@WaelYasmina Okay thanks..! Can you share discord server link?

  • @kobibr9362
    @kobibr9362 Рік тому

    I have been trying to do this with react-three-cannon for the past week. I am about to give up.

    • @rindtier7287
      @rindtier7287 Рік тому +1

      Going to do this soon

    • @otto6861
      @otto6861 6 місяців тому

      @@rindtier7287 did you end up doing it?

  • @tonychen3174
    @tonychen3174 9 днів тому

    What happened? The project files looks way more complicated than the file in the video

  • @ebenezer1635
    @ebenezer1635 2 роки тому

    Getting this error when trying to update vertices. Any help please? THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.

    • @WaelYasmina
      @WaelYasmina  2 роки тому

      Here's the project files so you can see if you did some mistakes: github.com/WaelYasmina/clothsimulation

    • @ebenezer1635
      @ebenezer1635 2 роки тому

      @@WaelYasmina Awesome. You're a life saver. Thanks man. 🙏😇.