Frayed Wallpaper Peeling Using nCloth, help

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

REPLY TO THREAD
 
Thread Tools Search this Thread Display Modes
Old 03 March 2013   #31
Hell YES!

__________________

.

Reel - 3DInk.com
Filmography -IMDB
R&D - VIMEO

*please read- cyanbsl.blogspot.com/*
 
Old 08 August 2013   #32
Bumpin to stay alive... great hack!
__________________

.

Reel - 3DInk.com
Filmography -IMDB
R&D - VIMEO

*please read- cyanbsl.blogspot.com/*
 
Old 08 August 2013   #33
Bumpin to stay alive... great hack!

Got an email saying you had posted on this thread, and thought whats going on!? ><
I need to get back on this forum more for some effects madness!
 
Old 12 December 2013   #34
So, Master Duncan!

What are the chances we can somehow use this edge tear tech to add constrained nHairs to the edges, to maybe do things like fibrous elastic gooey bits between the separated polys or something like that?

__________________

.

Reel - 3DInk.com
Filmography -IMDB
R&D - VIMEO

*please read- cyanbsl.blogspot.com/*
 
Old 12 December 2013   #35
Originally Posted by HowardM: What are the chances we can somehow use this edge tear tech to add constrained nHairs to the edges, to maybe do things like fibrous elastic gooey bits between the separated polys or something like that?


Hmm... might be difficult using the toon intersection, as this adds topology changing geometry as the cloth rips. An cloth (and hair) do not currently handle changing topology.

Perhaps one could use a very high resolution cloth mesh and use the restitution tension to allow the cloth to stretch (like taffy) where it is under stress. One could select just the edges one wanted to be tearable before creating the tearable constraint, either avoiding the bits you wanted to stretch out or painting the glue strength. However a lot of long stringy bits would require a very high resolution mesh and very high simulation quality settings.

Instead you could try the following, but I'm not sure of an automatic workflow without some mel scripting:
1. create some poly planes for the stringy bits... one plane per stringy bit. The number of divisions should be relatively large in the direction you want the plane to stretch out in, and perhaps just 1 in the other direction( but could be larger if you want the stringy bits to form tapered shapes).
2. do a poly combine (with history on) of all the poly planes and make it nCloth
3. create a component to component constraints between the verts on the plane and the torn edges you wish to attach them to... for ease of selection you may wish to first run your cloth and have it fully torn. Disable the mergeVertex node so the topology of the out mesh matches the in mesh... one can then select edges to constrain on the output mesh(normally after make tearable you need to select the input mesh for constraints, because of the merge vertex node) It is important to select edges on the mesh and verts on the planes... one could have multiple stringy bits attached to a single torn edge and the width of the stringy bit can be smaller than the torn edge width. On the constraint make it a weld type to avoid gaps.
4. rewind to the start frame
5. selecting the original plane transforms in the outliner and scale and position each plane so it is collapsed to a flat line and its position is snapped to the edge it is constrained to.
6. Playback and adjust restitution tension, stretch resistance, and stretch damp to get the best effect.


A totally different approach that might be easier would be to emit nParticles at discreet points along the torn edges... the pfx to poly toon border lines might work for particle emission. Turning randomize ON on the emitter may help make the emission points discreet, or perhaps one could texture map the line width on the toon to just get little short spans. Then for the emitted particles connect them by creating a max distance constraint for the particle system, adjusting the max distance to a value that just hold stringy bits together. Then mesh the resulting particle system.

I've attached a scene that implements this simpler idea, but it currently is a bit like spraying silly string out of the tear region. It might be nice to also include the cloth in the max distance constraint on the particles somehow so that it pulls on the forming strings. Also the simulation speed needs to be very slow so that one gets strings of particles that are not too far apart. One could instead cache the simulation on substeps, for a faster moving tear.

The original idea I had is harder to setup, but likely would produce better results.
Attached Files
File Type: zip stringyTear.zip (4.6 KB, 44 views)

Last edited by Duncan : 12 December 2013 at 08:16 PM.
 
Old 12 December 2013   #36
I love you man!

Cheers for the prompt verbose reply!

I will take a look at trying out the complicated version.

The simple scene does not seem to work correctly as the particles are at the origin?
__________________

.

Reel - 3DInk.com
Filmography -IMDB
R&D - VIMEO

*please read- cyanbsl.blogspot.com/*
 
Old 12 December 2013   #37
There seems to be a problem in that scene with the DG dirty of the outputCloth.worldMatrix[0] passed to the toon node(when loading the scene). If you simply type dgdirty -a after loading the scene (or just move the plane a little) it will play back correctly.

I added an expression to do "dgdirty -a" on the first frame to the scene to workaround this problem( not sure why it is happening though). I replaced the old scene in my last post with this one.

Last edited by Duncan : 12 December 2013 at 08:18 PM.
 
Old 12 December 2013   #38
Here is a simple version of that first method I described. To make it easier I just started with a cloth plane with a tear down the middle, then created a bunch of planar strips, poly combined, made nCloth then did point to surface constraints of the strip end verts to the surface As long as I don't scale the length of the strips totally to zero the verts attach to the correct side of the tear. I also found I needed a max distance constraint between all strip verts, with glue strength. This keeps them from stretching at all till the plane hits.

Duncan
Attached Files
File Type: zip tearGoop.zip (10.7 KB, 41 views)
 
Old 12 December 2013   #39
Cheers as always!
__________________

.

Reel - 3DInk.com
Filmography -IMDB
R&D - VIMEO

*please read- cyanbsl.blogspot.com/*
 
Old 12 December 2013   #40
Back to the idea of spawned nhairs... how would you go about creating nhairs between 2 particles on the fly?

We could emit particles from the torn edge through ToonFX and then make tearing hairs using your methods, correct?
__________________

.

Reel - 3DInk.com
Filmography -IMDB
R&D - VIMEO

*please read- cyanbsl.blogspot.com/*
 
Old 12 December 2013   #41
NHair cannot simulate on a changing topology (i.e the number of hairs or hair vertices changing during the simulation), so it is unlikely you could use nHair. The only scenario that could work using nhair is to have a bunch of hairs already created at the start then animate their contraints and positions on the fly. It would be a bit like the cloth workflow I suggested, only instead of cloth strips you would use hairs scaled to zero length.

However particles can link together on the fly using max distance constraints, and can also link to nCloth (this is basically the first example file I posted). One can fake a viscoelastic substance with nParticles and maxDistance constraints, which I think is sort of what you are aiming for. The problem would be perhaps simulating at a fine enough timestep and having enough particles. The first simulation might be better if you added the cloth mesh borders to max distance constraint. To do this you would need to create an nComponent node by hand(set to all border edges) and connect it to the cloth and nConstraint.
 
Old 12 December 2013   #42
Cheers for all this!

Was hoping it could all be done on the fly but good to know a work around.

Is it possible to code something like this into the future nucleus?
__________________

.

Reel - 3DInk.com
Filmography -IMDB
R&D - VIMEO

*please read- cyanbsl.blogspot.com/*
 
Old 12 December 2013   #43
It would be difficult, but everything is possible... whether it would happen is another matter.
 
Old 12 December 2013   #44
you know we love you so much Duncan for sharing great ideas with us.
 
Old 12 December 2013   #45
Originally Posted by Duncan: ....
Another approach is to lock the cloth using inputAttract and then animate the inputAttract per vertex. This is a little tricky to do, but the following works:

1. Create a volumeAxis field affecting the cloth

2. Set inputAttract to 1.5 and set inputAttractMapType to Per-Vertex

3. Create a custom array attribute on the cloth (lets call it inputA):

addAttr -ln "inputA" -dt doubleArray nClothShape1;
setAttr -e-keyable true nClothShape1.inputA;

4. Set up a particle creation and runtime expression for the nCloth

dynExpression -s "inputA = 1;" -c nClothShape1;
dynExpression -s "if( inputForce[0] != 0 ){\n\tinputA = 0;\n}" -rbd nClothShape1;

One can use particle expressions in a limited fashion with nCloth, because it is derived from the particle class. These expressions set inputA to 1 at the start frame and zero when the field strength is not zero.

5. With a regular non-particle expression copy the array inputA to the inputAttractPerVertex array. We do this by connecting and disconnecting the attributes. We can't simply leave it connected or directly set the per vertex array inside the particle expression, as this leads to a dependency graph loop that blocks evaluation of the cloth.

expression -s "connectAttr nClothShape1.inputA nClothShape1.inputAttractPerVertex;\ndisconnectAtt r nClothShape1.inputA nClothShape1.inputAttractPerVertex;" -o pSphere1 -ae 1 -uc all ;


How would one go about using this type of setup for nConstaints? Is it possible?
__________________

.

Reel - 3DInk.com
Filmography -IMDB
R&D - VIMEO

*please read- cyanbsl.blogspot.com/*
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:24 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.