Giter VIP home page Giter VIP logo

Comments (8)

mtamis-NV avatar mtamis-NV commented on August 19, 2024

The short answer is that NvCloth doesn't support more than 500 collision triangles.
It would be too slow in most use cases anyway.
Maybe you can get around it by passing collision triangles more selectively (doing a broad phase check to skip triangles away from the cloth).

The long answer:
If you want to use more triangles in the cuda solver you need to change the code to not use shared memory. This is not easy to do, and will require quite some code changes.
The cpu solver will do more than 500 triangles, but as expected this is very slow. (The other solvers will also not be very quick with >500 triangles either).
I don't remember if the DX11 solver already uses shared memory. You can try disabling the range clamp in cloth::DxCloth::clampTriangleCount and see how many triangles it can deal with.

from nvcloth.

zhangchihut avatar zhangchihut commented on August 19, 2024

Do you known how to increase the shared memory? we are using Titan XP which 12G memory.
I was thinking the easiest solution is to increase the shared memory.

We already tried to using different clamp numbers other than 500, it seems NvCloth can handle about 600 triangles without causing core crash.

from nvcloth.

a908778387 avatar a908778387 commented on August 19, 2024

Every CUDA's SM has a fixed number of shared memory, it's a hardware limitation, although you have 12G "Global Memory" you can't increase it. You can modify the code in CuSolverKernel.cu, try not to use shared memory, it will be much slower. Broad phase culling maybe easier.

from nvcloth.

mtamis-NV avatar mtamis-NV commented on August 19, 2024

a908778387 is correct. Not much else you can do about it.

from nvcloth.

zhangchihut avatar zhangchihut commented on August 19, 2024

Thank you very much @mtamis-NV @a908778387!
Appreciate your guys help.

from nvcloth.

Dzhange avatar Dzhange commented on August 19, 2024

Thank you very much @mtamis-NV @a908778387!
Appreciate your guys help.

I have encountered the same problem, did you manage to increase the num of triangles?

from nvcloth.

Dzhange avatar Dzhange commented on August 19, 2024

Every CUDA's SM has a fixed number of shared memory, it's a hardware limitation, although you have 12G "Global Memory" you can't increase it. You can modify the code in CuSolverKernel.cu, try not to use shared memory, it will be much slower. Broad phase culling maybe easier.

I'm not very familiar with CUDA, can you tell me how to modify the code? thank you.

from nvcloth.

mtamis-NV avatar mtamis-NV commented on August 19, 2024

I've looked at this before, but it is a non-trivial task, and we don't plan on doing this.
If you really want to get into this then you should start by looking at:
CuCollision::collideTriangles in \src\cuda\CuCollision.h, CuCloth::getSharedMemorySize() in \src\cuda\CuCloth.cpp, and probably some other places.

You might also want to check out flex, which also simulates cloth, and has some other features for collision with environment.

from nvcloth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.