Why does it not work ?

starboardstarboard Posts: 452
edited December 1969 in Carrara Discussion

HI,
I have the need for a waving flag. It should be simply. I have Phil's lesson on Soft Body/flag simulation. Ok I follow step by step and I get a fabric nightmare. Have repeated it numerous times looking for some slider or button -no effect. The flag instead of hanging limply drops into this jagged cloth nightmare. So what's up Doc ?

1. I create vertex grid of about 30 on a side and move it appropriately next to the pole.
2.Using Soft Body attach, select the Pole.
3. Atttach 4 to 5 vertexes to the pole
4. Run simulation...Flag drops into elegant fabric folds.....NO it drops into a tangle nightmare.

I can't understand why the obvious and basic gives me so much trouble. Thanks

Starboardtack

Nightmare.jpg
709 x 570 - 55K
Grid.jpg
1115 x 552 - 65K
Settings.jpg
704 x 573 - 55K
«1

Comments

  • DUDUDUDU Posts: 1,945
    edited March 2015

    The first thing to be tested is to put the sliders “Stiffness” and “Bending” at 50% in the beginning.
    The material of the flag must be also important, rubber is well for a flag.
    Sometimes, it's necessary to mislead simulation by modifying terrestrial gravity.
    … and you must add a force, at least to simulate the wind.
    One more thing, your physic engine must be on "Bullet" to work !

    Post edited by DUDU on
  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi,

    I'm going by your screen shots - not the tutorial you're following - but I think you could first try increasing Stiffness to about 30%.

    If that helps the cloth to look more realistic and if nothing else in the scene is going to be affected, you could try going to the Physics tab of the Scene settings.

    There may be a bug here but if you leave the 'Use Default Gravity' box ticked, you can enter different values for gravity and can get an effect like a directional wind. It's like having gravity pull to the sides as well as down.

    If you do play with those settings, be sure to have a note of the originals to return to!

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Having just posted, and seen DUDU's reply, please take his advice before mine!

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Having just posted, and seen DUDU's reply, please take his advice before mine!

    You're crazy, you are better than me !

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Not in my opinion, DUDU !!

    I don't know about directional forces and only tried making a similar flag once - just 10 minutes ago for this problem :-) - and my results weren't too great.

    I do wonder if the OP is having an 'explosion' of vertices - but I'm not sure where the margin setting may be wrong.

  • starboardstarboard Posts: 452
    edited December 1969

    Thanks guys,
    The stiffness works. At least I have it staying in the neighborhood. It will take some tweaking get what I want. It is odd that Phill advised keeping these at zero in the tutorials.


    Starboardtack

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi Msteaka,

    Glad you got this working.

    I tried a bit more (including an excursion into 3d painting to give the flag some colour) and got results which are not really much use but which show gravity pulling in two directions.

    I didn't make a flagpole and the 30*30 flag is quite small in the scene. I placed a standard cube primitive right beside it to show how small.

    FlagGif.gif
    640 x 480 - 3M
  • DUDUDUDU Posts: 1,945
    edited December 1969

    The explosions of vertices arrive with extreme adjustments and especially when the self collision is enabled.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited March 2015

    Explosions of vertices are generally due to having self collision checked AND a collision distance or margin setting that is too large.

    What happens is that the simulation tries to push adjacent vertices apart until they are greater than the collision distance you set. So if, for example, the vertices in your mesh are 1 inch apart, and the collision distance setting is 2 inches, as soon as the simulation starts it will try to push the vertices apart so they are at least 2 inches apart. This causes the mesh to "explode".

    I don't see how stiffness or bending would cause the mesh to explode or get all nasty. Those are just spring settings, and affect how easily the mesh bends and stretches. And I always suggest not setting any simulation settings at 0, because it might cause some instability in the simulation. That worry I have may be unfounded with Carrara's Bullet, but after many years of experience with lots of different software it has become standard practice for me.

    Also, be careful of the other physics settings. It's best, when you're starting, to crank Simulation Accuracy up to a high value so that the simulation will be as accurate as possible. It takes longer, but you can crank it down later as you do the final tweaks of your settings.

    Post edited by JoeMamma2000 on
  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Are the surface parameters, such as bounce, friction, etc. the same for Bullet as they are for the standard, rigid body physics engine? Meaning, are the settings you set in the Physics tab for an object used by both engines, or does switching to Bullet bring up a different control panel/dialogue to set the surface properties?

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi Joe,

    Thanks for the info which is useful to know.

    My only reason for mentioning the possibility of an exploding effect was from looking at the image provided. The flag seemed to have raised itself above the height of the flagpole and it made me wonder if the whole thing had exploded outwards and upwards.

    (BTW, my playing with gravity settings arises from lack of knowledge of forces in Carrara. I only started with soft cloth and don't even know whether forces are Bullet or Standard - or something of their own. Something I should look into, I suppose.:roll: - along with a hundred other things.)

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Here's a simple mesh plane, with a subdivision of 3 (Bullet seems to like subdivided meshes, since they are very clean and uniform). It has a 4 ft/sec directional force acting as wind, a 100% stiffness (nylon flags generally aren't very stretchy), 20% bending, self collision at 10%, and sim accuracy at 100%.

    http://youtu.be/Kjd6vK7A3Ys

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi Evilproducer,

    I hope it's not frustrating to hear me say that I stand to be corrected... but here is my best shot.

    If I select an object, I can go to the Effects tab of its properties and see sliders for Density, Bounce and Friction.

    This is the same whether I'm using Standard or Bullet physics.

    The Soft Body Modifier, when applied to an object, gives sliders for Springs (Stiffness, Bending); Air (Drag, Lift); Volume (Pressure); Collision (Self Collision - a tick-box, Margin); Smoothing and Quality.

    However, in another thread, Joemamma2000 explained that not all sliders and settings actually worked (which ones and whether only for Bullet, I can't remember (sorry Joe :bug:).

    So, I think Density, Bounce and Friction may apply to both types of Physics but I could be wrong. For cloth, Stiffness and Bending settings can each make drastic changes to how 'soft' the cloth is.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Hi Joe, Thanks for the video link.

    That is indeed a nice flag. With the gravity method I played with, the flag would surely settle over time whereas a flag with a wind force will keep flying.

    Good to know.

    I only played with flags for the first time this evening. At one point I gave the starting-point of the mesh a set of waves to help it along - something I would try again for, say, a very long flag maybe used in a medieval jousting scene or something similar.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969


    However, in another thread, Joemamma2000 explained that not all sliders and settings actually worked (which ones and whether only for Bullet, I can't remember (sorry Joe :bug:).

    I believe that Density does nothing, and is not connected at this time. Bounce is for rigid body sims only, as is Geometric Fidelity.

  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Cheers, Joe for supplying that info here again.

    Next time I use your full forum name I'll try to get the capital letters right!

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Oh, and out of curiosity, to confirm whether settings of "0" are a problem with Bullet, here's an image of the exact same scene as the video I posted, the only change being that I set stiffness and bending for the flag both at "0".

    Never set "0" on simulation settings... :) :)

    Flag.jpg
    1200 x 1086 - 60K
  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    At this point in the UK its well into the night and I must be gone soon. I can't argue, Joe, against your years of working with different implementations of physics or with the image you posted (I got a similar result when I tried with my own flag).

    I must admit though that I always begin a cloth simulation by bringing Stiffness to about 25-30 % and Bending to zero. I leave everything else at zero.

    After that, in no particular order, I'll adjust the settings for Stiffness and Bending only (Self-collision is usually on).

    Then I may subdivide the mesh (as a last resort if necessary) and start over.

    I think for cloth and clothing at least, the Air and Volume settings don't really seem to matter (unless it was a deflating hot-air balloon or something similar.

    Anyway, not a dispute, I'm only mentioning what I've been doing and will bear in mind what you said if I can muster up the resolve to try getting into soft body clothing in Carrara again.

    Regards to All

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited March 2015

    I think for cloth and clothing at least, the Air and Volume settings don't really seem to matter (unless it was a deflating hot-air balloon or something similar.

    Oh yeah, I forgot....Volume, last I checked, is also not connected and does nothing. It's supposed to simulate internal pressure in an enclosed object (like a beach ball), but it doesn't do nothin' right now. But it's been a while...

    And yeah, you're right...not setting sliders at "0" is just a rule of thumb I use, and isn't ALWAYS the case. Just something to be wary of if things are going goofy. Like I believe Air Drag in the present implementation of Carrara Bullet needs to be at "0" because the effect is far too strong even at 5%. At least I recall that's the case...

    Post edited by JoeMamma2000 on
  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Just to add. I can see a good reason also for your advice. If the physics simulation involves multiplication at any time by zero, then, results could send the computer into a spin, I guess, unless the calculation handled that.

    But now I need to turn in for everyone's sake, I think!

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Just to add. I can see a good reason also for your advice. If the physics simulation involves multiplication at any time by zero, then, results could send the computer into a spin, I guess, unless the calculation handled that.

    But now I need to turn in for everyone's sake, I think!

    I *think* it's the "divide by zero" that's too often the problem. I think that the developers need to make sure you don't divide by zero because the code can't handle it.

  • starboardstarboard Posts: 452
    edited December 1969

    Gentlemen,
    I did not realize what a contentious post I had launched.

    The reason I was having trouble was that I was following Phil's tutorial on flags. As you can see he has the settings for stiffness and bending at zero. Phil says " For cloth you probably want to set the stiffness and bending at zero" Could it be that there is a difference between Carrara 8 and 8.5. As you can see Phil is using what I assume is 8 and there is a difference in the arrangement of the sliders between the two. In Phil's tutorial the flag works well. So what is missing that I cannot get the same result ? I am just puzzled why it does not work for me at zero as Phil suggested ?

    Starbpardtack

    Phils_flag.jpg
    686 x 469 - 65K
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited March 2015

    I have no clue when Phil's tutorial was produced, but there have been a number of betas and changes to the Bullet cloth in Carrara. At one point even the cloth collision with moving objects worked great, but now it's dead. And I recall at one point he was even recommending using Density, even though at the time it was disconnected.

    That being said, I'm not sure why he would have suggested setting both at "0". In all the years I've used Bullet in Carrara I've always found non-zero settings for stiffness and bending to be the best. So I guess you'll have to ask Phil about it. Just keep in mind that with something as complicated as a cloth sim, where so many factors are interconnected and affect one another, it's very hard/impossible to recommend specific numerical settings with any success. For example, what works for one mesh density might be completely wrong for another.

    EDIT: Also, I would caution believing ANYTHING that ANYONE, including me, says about Bullet in Carrara. It's been in beta forever, many features are disconnected or not fully implemented, and there has never been any documentation from DAZ about how it works. So all of us are guessing based on experience or reading about Bullet implementations in other software.

    Post edited by JoeMamma2000 on
  • MythmakerMythmaker Posts: 606
    edited March 2015

    I have compilied some notes on Carrara specific Bullet Soft behaviors from 2 weeks of intense Bullet "clothing" testing for Genesis. My purpose was to replicate iClone's fast and efficient soft cloth workflow in Carrara.

    Among my more conclusive notes re Carrara Bullet Soft: (apology, as some actually contradict existing theories)

    Scene: Physics Engine: all three settings matter. Simulation accuracy at least 100%. Geometry Fidelity preferably 100%. Collision Distance 1%.

    All three Effects: Physics settings matter in Bullet soft body sim.

    Vertices explosion (and spiking) are impacted by multiple factors. Stiffness and Bending are among the chief contributors.

    For most cloth type -Stiffness is best at 80% - 90%. Bending is best around 15%, under 20%. This means, for most purposes, the 100/20 default settings are actually "correct".

    "Stiffness" is somewhat misleading, as higher setting = softer, more foldable *without breaking*. The more intuitive term is perhaps stretchable, however that is also another loaded word. It is also quite common for settings to be named their exact opposite meaning, endemic in CG or any other softwares.

    The rest of my Bullet soft body notes has more to do with *simulating cloth for clothing*, a different area from simulating flags/ planar objects. So I will just digress a little...

    Carrara Bullet Soft Body definitely works - even Volume. It is efficient enough for flags curtains blankets and simple wind force based cloth simulation.

    It has also been proven by a few forum experts to be use-able for rigged character clothing involving few limbs. But my testing result is, for full body clothings (can be done for either V4 or Genesis) Carrara Bullet Soft is too tedious and inefficient compared to Poser or iClone.

    I have some ideas how Carrara Bullet Soft can be improved for clothing sim without major renovation. But I'm in the process of testing Sparrowhawke's Cloth Deformer plugin which I only discovered a few days ago. After that I will share my Bullet soft body/ cloth deformer notes with others possibly in a fresh new topic.

    Cheers and happy soft cloth testing..

    Post edited by Mythmaker on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Just another word of caution...

    Cloth and soft body simulations are a PERFECT way to be absolutely certain you've figured out correct settings, when in fact you are completely mistaken. It's like having a black box in front of you with a bunch of lights and knobs, and trying to figure out what the box is doing merely by constantly playing with the lights and knobs.

    The reason you never know is that most of the settings are connected with, and are affected by other settings and parameters.

    For example, I guarantee that the effects of stiffness and bending settings are highly dependent upon how dense your mesh is. As well as the Quality and Simulation Accuracy settings. And the type of mesh you have (clean, nasty, whatever). As well as other parameters. So you can play with the sim for weeks, or months, or even years, and still not come up with settings that 'work'. But it's guaranteed you'll be convinced you've figured it out.... :) :) :)

    Unless and until you really understand what's going on inside the box, what's connected and what's not connected, what's not fully implemented, and a host of other things, you won't really know. We had people early on in the Bullet cloth implementation recommending to use settings that were not connected, but they were CERTAIN they helped the results.

    Anyway, that's my words of caution. For what it's worth... :) :)

  • MythmakerMythmaker Posts: 606
    edited March 2015

    Joemamma2000 you're right that

    1. all variables have to be taken into account before we conclude if a setting works or not. And if it does, how it works with the other dozens of variables.
    2. soft body sim, cloth sim, clothing sims all interact differently with the physics engine. This alone is worth its own topic.

    I can also confirm your absolute guarantee that mesh density matters, not that a guarantee requires confirmation. ;)

    When I first arrived here I was overwhelmed by the sheer amount of conflicting info on the forum, so went for the easier path: keep it simpler, test them myself.

    Good thing is because Carrara Bullet soft body physics is relatively old and primitive, it is quite simple for non-complicated use. Like in the case of the OP, a flag - uncomplicated stiffness/bending settings.

    All the OP needed was the default settings of stiffness/bending 100/20. And decides if self-collision is required in his/her case.

    Me, I'm a silly one who learned the simplest thing the hard way - messing with rumored-to-be broken/unimplemented settings before my tests shown that they actually all work.

    Note to self: approach the tools without prejudice and noise - and unworkable things may actually work! :)

    Post edited by Mythmaker on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited March 2015

    As another example of the complexity and inter-relations of the cloth settings and parameters....

    Keep in mind the basic model being used my many/most cloth simulators:

    Take your cloth mesh and replace each vertex with a metal ball. And replace each edge with a spring. Now you have a physical model that is used to simulate your cloth...a mesh of weights tied together with springs. And the Density setting tells the software how heavy the heavy metal balls are. And the Stiffness setting tells you how springy or stiff the springs are.

    And now connect more springs that span multiple vertices, not just adjacent vertices. And the springy-ness or stiffness of those springs define how easy or difficult it is to fold the cloth, also known ans the Bending setting.

    So now just imagine your mesh of vertices and edges and faces is actually a big sheet of weights and springs. That's how it is modelled in the software.

    And if you understand that, you suddenly can understand how a more dense mesh means you have a lot more springs for the same size mesh. And suddenly the exact same Stiffness setting results in a much stretchier cloth SOLELY due to a more dense mesh. Try it sometime, BTW. Connect a few identical springs together, and you'll see that the result is a springier spring that with just one spring. :) :) :)

    But a springier spring also APPEARS like the metal balls are heavier, since they cause a more stretchy fabric. So are you certain that the increased stretch is due to a Stiffness setting, or a Bending setting, or a Density setting?

    And you can also suddenly see that since there are springs between adjacent vertices, AS WELL as springs spanning multiple vertices, the settings for Stiffness and Bending affect each other. So a Stiffness setting that works for one mesh might not work well at all for a different mesh, especially if it also has a different Bending setting.

    Post edited by JoeMamma2000 on
  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    I just did a quick check, and it seems like the Volume/Pressure slider is indeed still disconnected as I suspected. I can't see any difference whatsoever as you vary the slider from 0-100%.

    With low Stiffness and Bending settings, and a 100% Pressure setting, a sphere just crumples into a flat pancake.

    Of course, I may be missing something, but I've never seen this setting to have any effect.

  • JoeMamma2000JoeMamma2000 Posts: 2,615
    edited December 1969

    Oh, and Density still appears to be disconnected. No effect whatsoever.

    Here's a simple animation to show the mass-spring model used in cloth sims. It's missing the Bending springs which span multiple vertices, but you get the idea.

    Doc2000.gif.GIF
    640 x 360 - 3M
  • Hermit CrabHermit Crab Posts: 841
    edited December 1969

    Well, after a night in the crypt and some morning coffee, I thought I'd look in again - and there are lots of new comments!

    Don't worry, Msteaka about contention here, talking about Carrara's soft body seems to get hold of some of us - heaven knows why! Unfortunately, I can't help with the question you are asking - Joe has more knowledge of it than I have.

    Joe, yep, I should have been thinking of divide by zero - but who knows if the physics calculation ever does such a thing? That's one more example of where I should go and do something more worthwhile instead of trying to figure all this out.

    A quick experiment before posting showed me (in 8.5 Pro 64 bit) that Volume does seem to do nothing. At least for a sphere falling onto a slab. Stiffness and Bending do affect how flat it becomes and how much it bounces back into shape.

    Speaking of the Carrara versions. Until a few weeks ago I was using the 32 bit version and needed to get a new computer - much to my financial regret. Now I'm using Windows 8 and Carrara 8.5 pro 64 bit, I've had problems rendering some physics simulations. I think PhilW put in a bug report for something similar.

    @Mythmaker, it's good to hear of your work on these issues. The more the merrier! I too, started from finding how easily physics worked in Iclone (version 5) and I tried to see if I could do the same in Carrara. It's been fun but ultimately somewhat frustrating...

    Joe, that illustration with springs and the explanations helps a lot also.

    I hope it isn't rude to post and then disappear, but I must be gone. (As in begone vile spirit !!!:-))

Sign In or Register to comment.