Page 1 of 2

Simple GPU Cloth Sim

PostPosted: Thu Nov 18, 2010 7:28 am
by vinz99

Still having fun doing sims with GLSL shaders, this time it's cloth from the Stupid OpenGL Shader tricks NVIDIA paper. Rewind to first frame to properly init the sim.

Little demo on vimeo :


Note Added By Derivatve: More up-to-date version for 099 available later in the comments.

Re: Simple GPU Cloth Sim

PostPosted: Thu Nov 18, 2010 12:04 pm
by archo-p

This is great! I was eying the vimeo last week. You are really cranking these GLSL gems out! I've been very interested in porting more of these kinds of things, but really still don't have a full grasp on the methods. These GLSL physics networks of yours are extremely useful for learning this stuff! Thanks for sharing!


Re: Simple GPU Cloth Sim

PostPosted: Thu Nov 18, 2010 1:21 pm
by Achim
thx so much for sharing all these!

Re: Simple GPU Cloth Sim

PostPosted: Thu Nov 18, 2010 5:38 pm
by rodberry

this is wonderful. you are really steaming thru the GPU stuff!

the more examples we have in touch the better.code still makes me dizzy, so it's great to have lots of existing stuff that actually works.

I think the touch community is starting to reach a critical mass where lots of cools stuff will happen more easily. I look forward to seeing (and making!) more of it.


Re: Simple GPU Cloth Sim

PostPosted: Tue Nov 23, 2010 9:00 am
by vinz99
Thanks for the nice words, glad you enjoyed it!
It's been some time since I wanted to try gpu sims, but all the code needed for setting up and swapping textures and feeding parameters always put me off, so touch is great for that :)

Re: Simple GPU Cloth Sim

PostPosted: Sat Oct 19, 2013 7:22 pm
by oliverellmers
Hi Guys,

Having a little trouble getting this file to draw anything.. It seems there are no compiling errors with the shaders etc, and everything seems to be running... just no cloth! Wanting to get an understanding of how it works as a base for an up coming project.

I know my problem explanation is a little vague :oops: but any help would be much appreciated!

Ollie :D

Re: Simple GPU Cloth Sim

PostPosted: Thu Oct 31, 2013 12:13 pm
by vinz99
Hi Oliver,

Just had a look at the file in Touch088 10780, fix was easier than I thought, you just need to put active on for the cache2 top and rewind.
Then the physics2GLSL complains about infinite recursion, which it didn't in Touch077, but it works!


Re: Simple GPU Cloth Sim

PostPosted: Wed Apr 06, 2016 6:19 pm
by matthewwachter
Just started playing with this again. I'm trying to turn it into a multi-touch example.

Is there any way to get touch to stop complaining about the recursion loop? Maybe the cache system could be replaced with feedback TOPs? The error is causing weird things to happen in the latest version of Touch.

Re: Simple GPU Cloth Sim

PostPosted: Thu Apr 21, 2016 3:47 pm
by vinz99
Hi Matthew,

I'll have a look, I remember seeing that recursion loop error, but can't remember if I could fix it.

Unfortunately the cloth uses a verlet sim that requires position at the last frame and the frame before that instead of storing velocities, hence the cache TOPs. Feedback TOP will only give you the last frame.

I wish in general there was easier/more control about TOPs feedbacks, though it's probably not easy to implement in a node based tool.

Re: Simple GPU Cloth Sim

PostPosted: Wed Jun 20, 2018 1:57 pm
by greenpattern
How do you guys get this to appear in render?

Everything seems to work except the render in td99, it appears in geo and camera alright

Anyway I can fix that? this in insanely beautiful!