Comments (8)
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.
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.
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.
a908778387 is correct. Not much else you can do about it.
from nvcloth.
Thank you very much @mtamis-NV @a908778387!
Appreciate your guys help.
from nvcloth.
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.
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.
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)
- what is the right way to do cloth-body animation? HOT 11
- DX solver function accelerateParticles looks wrong HOT 1
- Compiler error when disabling USE_SELF_COLLISION_SORT in DX solver
- [Feature Request] Add CMake arguments to disable CUDA and DX solver for the samples
- No CmakeGenerateAll.bat HOT 6
- [Question] PhysX and NvCloth interaction HOT 2
- Compiling 32 bit
- Compiling 32 bit
- Manually-specified variables were not used by the project
- Cmake Build system for windows is broken and project files cannot build properly due to custom rule for CuSolverKernel.cu is missing
- Licensing questions HOT 3
- A question about spheres CCD
- Would NvCloth support Visual Studio 16 2019? HOT 1
- Strange problem of simulation result HOT 1
- sse2/SwCollisionHelpers.h->x86intrin.h does not compile on mac arch x86_64 HOT 3
- There is a gap in the skirt, how to solve it? HOT 2
- Automation script MAC, Win compilation failed
- DX solver doesn't invalidate mClothDatas after sorting cloth instances
- Would NvCloth support DirectX12 in future?
- Installation fails with 403 from cloudfront HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvcloth.