PDA

View Full Version : HardFX + ClothFX


Dirk
10-30-2008, 07:49 AM
Enjoy!

http://www.youtube.com/watch?v=SA221laaaG0

(watch in high quality)

Mrjack
10-30-2008, 08:04 AM
Awsome.........
and thnx a lot for showing to lightwave comunity how powerfull lightwave is

WilliamVaughan
10-30-2008, 05:34 PM
impressive!

Ztreem
10-30-2008, 05:37 PM
Simple but effective, very nice!

Mr Rid
10-30-2008, 06:05 PM
What is the scale? It appears slo-mo as cloth FX tends to insist on.

Cageman
10-30-2008, 06:14 PM
Haha... that was really neat actually!

You surely have come to understand those tools very well.

:thumbsup:

Dirk
10-30-2008, 06:41 PM
Thank You all :)


What is the scale? It appears slo-mo as cloth FX tends to insist on.

Playback speed is 100%, but the balls are falling in slo-mo, too. I tend to make it that way, maybe because I want to see everything :D

Mr Rid
10-30-2008, 06:57 PM
Thank You all :)




Playback speed is 100%, but the balls are falling in slo-mo, too. I tend to make it that way, maybe because I want to see everything :D

Then are you altering gravity or weight to deliberately slow down the balls, or is the scene at a larger scale than it seems?

Dirk
10-30-2008, 07:27 PM
It's big, the wooden framework is about 35 meters high.

SaturnX
10-31-2008, 01:45 AM
Man, very nice work.
hmm, for the cloth though.. did you use subpatched or frozen geometry?
The collision stuff going on there is working spot on. Good stuff.

Surrealist.
10-31-2008, 03:08 AM
That is a great scene man. Well done! :thumbsup:

Cageman
10-31-2008, 03:22 AM
Dirk,

I've been playing with a similar setup, but I still can't get the HardFX to interact with the Cloth the same way you've done. I can get HardFX to respect the deformation of cloth, but HardFX will not create any ripples onto the ClothFX upon impact.

If I would use particles instead, I can get similar results as in your video. Would be cool if you could elaborate on how you did it with HardFX. :)

Dirk
10-31-2008, 06:33 AM
Man, very nice work.
hmm, for the cloth though.. did you use subpatched or frozen geometry?
The collision stuff going on there is working spot on. Good stuff.

It's polygons for the simulation, but what You see are metalinked subpatches. They are just too cool.


Dirk,

I've been playing with a similar setup, but I still can't get the HardFX to interact with the Cloth the same way you've done. I can get HardFX to respect the deformation of cloth, but HardFX will not create any ripples onto the ClothFX upon impact.

If I would use particles instead, I can get similar results as in your video. Would be cool if you could elaborate on how you did it with HardFX. :)

Never thought about particles - could be interesting...

For the cloth and the hardFX to react to each other, both need a collision object. The Level setting is of extreme importance here: if, for example, the cloth collision obj has a level of 5 mm, and the hardfx collision obj has a level of 10 mm, the hardfx collision obj rulez over the cloth - and vice versa.

I wonder if this would be possible with Borg Software No.2. A friend of mine made a quick test with Borg cloth, and he said no....

JeffrySG
10-31-2008, 12:19 PM
I saw this video on your youtube page and though it was great!

:thumbsup::thumbsup:

wildr3d
10-31-2008, 12:44 PM
Wow, nice work!

Glad to see someone really give Cloth and Hard FX a real
workout.

Newtek should add a section on advanced dynamics in their
documentation presented by Dirk!

Keep it up :thumbsup:

jay3d
10-31-2008, 01:00 PM
wow awesome dude! :thumbsup:

then why u made me tired while writing the plugin? hehe :D

good job!

Dirk
10-31-2008, 01:55 PM
Wow, nice work!

Glad to see someone really give Cloth and Hard FX a real
workout.

Newtek should add a section on advanced dynamics in their
documentation presented by Dirk!

Keep it up :thumbsup:

Wow, thanks :D

Actually, I wouldn't mind if Newtek asked me, I'm a starving artist right now :D

Cageman
10-31-2008, 02:14 PM
It's polygons for the simulation, but what You see are metalinked subpatches. They are just too cool.




Never thought about particles - could be interesting...

For the cloth and the hardFX to react to each other, both need a collision object. The Level setting is of extreme importance here: if, for example, the cloth collision obj has a level of 5 mm, and the hardfx collision obj has a level of 10 mm, the hardfx collision obj rulez over the cloth - and vice versa.

Ahh... Thanks for the tips. I'll have another stint at it! :)

Larry_g1s
10-31-2008, 05:27 PM
Nice work Dirk. Seems like you've been having fun with good results with the tests you've been doing.

alqadi
10-31-2008, 06:12 PM
nice work!

Stooch
10-31-2008, 09:40 PM
hey peeps this looks nice and all but i think you are missing the point. its not that dirk is pushing lw to do advanced things. he stated it himself, the scene is HUGE.

the problem with current dynamics is a lack of precision and sub frame sampling... and SPEED.

why is this important? because generally your characters are not 35 meters tall, so precision and sub frame sampling is whats needed for normal scales.

of course you could just work in super huge mode but then everything looks slow. so then you have to go into it ala maya where units are arbitrary, the scale is irrelevant.

to be honest this is a simple example. however if you could dirk, lets see a more life scale setup with normal speeds and energies. im curious how well it would hold up then. and maybe up the complexity to something thats more production scale :)

it would look more impressive on your reel btw.

Mr Rid
10-31-2008, 10:59 PM
I have to second Stooch's sentiment. I dont see this example as saying anything much about LW dynamics. It's very basic for any dynamics app to handle without blinking. And as I keep pointing out around the forum, it is easy to make playful little demos with balls/cubes and simple tests while it is an entirely different animal in production when you have to meet specific shot requirements, perhaps integrate with live action movement, and have a great deal of control to handle client changes. This is where LW dynamics start to look like a nifty toy instead of a competitive tool.

It is like how it is easy to take an interesting journey when there is not a particular destination or limit on time. 'Hey, look where I wound up' is not the same as when you are given specific directions to follow within a schedule in stages, have to coordinate with a team and pipeline, and you are expected to alter and refine the process for weeks or months.

Open, intuitive control is the name of the game.

Am not belittling Dirk's work in the least. It's neat! But simple demos have a way of disguising the real issues. A chief complaint I have about most every dynamics sim I see is that they are in slow motion (every amazing demo on Ron Fedkiw's site is in slomo for some reason). I can get HardFX to work fairly well, but ClothFX has this annoying tendency to run as if in slow-motion. And as mentioned, the lack of subframe calculation can become a major problem. And we REALLY need to be able to keyframe mesh changes in EditFX.

daforum
10-31-2008, 11:05 PM
Wow! Now that looks good :thumbsup:

RonGC
11-01-2008, 01:52 AM
Excellent animation, this looks very good to my eye.

Ron

Cageman
11-01-2008, 05:40 PM
to be honest this is a simple example.

Wether or not it is simple, I was surprised to see the interaction between ClothFX and HardFX. What about slowinig characters etc down to a slow speed, simulate things in slowmo, and then adjust the timing on the MDDs to fit with the original speed?

On the note of dynamics engines... Mayas Rigid Body is quite crap as well, sometimes even worse than HardFX (solved a sim at work in LW instead of Maya because I was in a hurry and Maya kept me in the dark...)

:)

Cageman
11-01-2008, 05:46 PM
I have to second Stooch's sentiment. I dont see this example as saying anything much about LW dynamics. It's very basic for any dynamics app to handle without blinking.

I was talking to some coworkers about the shot I solved in LW instead of Maya (mix between cloth and hard) and asked them if there was a way to get Maya to interact between Rigid Bodies and Dynamic haircurves, but the only solution was to use nCloth for ALL dynamics, which was something I would have done if I had the time to do proper RnD. Now, nCloth is cool, but before that, it seems, it wasn't just an eyeblink to setup and solve.

Surrealist.
11-01-2008, 09:15 PM
I have been rather inspired by your work Dirk. Looking forward to more. :)

So what is next? Or are yo just going to surprise us?

Mr Rid
11-01-2008, 11:33 PM
Wether or not it is simple, I was surprised to see the interaction between ClothFX and HardFX. What about slowinig characters etc down to a slow speed, simulate things in slowmo, and then adjust the timing on the MDDs to fit with the original speed?
:)

Have tried that as a yet another Lightworkaround for the lack of sub-frame calc in LW, but it became messy. It was difficult to know what values to apply in slow-mo in order to anticipate how it will look at normal speed. It didnt work to just change all the values by a certain percentage of the frame speed change. Each value responded differently and it completley altered other desirable behavior from how it appeared when setup at normal speed. I started to run a normal speed sim in the BG as a reference for the slomo version, but it just became a bit too ridiculous. NT really needs to improve basic tools. They just dont go far in production.

Dirk
11-02-2008, 07:52 AM
I have been rather inspired by your work Dirk. Looking forward to more. :)

So what is next? Or are yo just going to surprise us?

I'll try... :D

For the scale / slo mo discussion: my cloth test are real world scale, the leg is about 1,2 meters long:

http://www.youtube.com/watch?v=y-R7MNUrX_Q

It's a test sequence, the best results are at the end.

Stooch
11-03-2008, 01:13 AM
pant legs are easy. sleeves too. where it gets hard is the armpit and any places where cloth gets pinched between two colliders. or when you want a character to sit down. or to move in a fast, jerky motion, or if you want your cloth to slide along the body. say when your arms go up and the sleeves slide down the arms.

its cool that you are trying but i feel that you will hit the same walls i did when i played with lw dynamics. and believe me ive spent some serious time and pulled out some serious hair.
as far as i know lw dynamics havent really gotten much of an upgrade in terms of solvers, but id love to see you prove me wrong.

but its cool, i mean you are getting stuff for your reel. and tahts always good, id still expect a bit more complexity if i was reviewing it though. :)

Surrealist.
11-03-2008, 03:41 AM
I have experienced those pitfalls too. It is a problem when you get past one limb. But it is not that I have not found solutions for those things, it is just that for now I can't find one where I don't get a huge hit on calculation time. This had primarily to do with several things:

1: COLLISION The fact that the point on the cloth has to collide with the polygon of the collision object. This means that the edge between the two points colliding onto say a sloped set of polygons will pass through the polygons unless there are enough points on the cloth object to curve around the slope. The solution is a higher subdivided mesh and use an off set in the collision tab of the cloth object. So to get a realistic impression on a cloth object from a complex collision object the only real solution beyond the initial stages of tweaking is to up the subdivision level of the mesh and change the object collide type to object-subdiv. Hit calculate and go have coffee or in the case of the torso, go have dinner and a party.

Because this is a dynamic calculation the points of the cloth object and the polys on the collision object are in constant motion and with the cloth stretching, points can move into a position where the edges can pass through the polygons. The solution, an even subdivision of the cloth object. Again a hit on calculation time in the end.

So in a nutshell that is collision. I have not found any workarounds to get nice finished results with less calculation time on a larger dynamic object even as far as the upper torso. That is, to say collisions with the body underneath that look realistic and dynamic. And dynamic being the key here because with the modeling into the cloth and morph solutions I have tried, I was not able to see how to apply them dynamically.

2. STRESS: Because cloth is elastic it will stretch. What that means is in practical terms is that the points will move. And under stress they will only move so far. And there is little that the stress and other settings such as stretch limit will do on a lower poly mesh. This is because each point will only move so far before it breaks the collision plane.

This causes a problem in more complex movements because under stress such as legs (or even dynamic sphere objects) pressing against a dress or cloak will stretch the points further than they can go and they pass through the polygon. Once through the polygon they can collide with the other side of the leg or dress just as an example. Again, the solution I have only been able to find. More points = more calculation time.

POINT CALCULATION: And before I go on. It should be clear to note that cloth calculates points only. Yes that is obvious. But there is no pattern that is formed in the cloth or any collision that does not derive from anything other than the number of points in the object. In the case of setting subdivision level to First or After Bones, of course now the cloth object has more points that collide and stretch and therefore you get an immediate hit on calculation time but also the problem that triangles provide. But you do get a preview of what will happen more or less with a higher subdivided object. Setting the Subdivision Level to Last, calculates the base points on the mesh itself as it was created in modeler with no other subdivision occurring before the deformation. All subdivision, thus smoothing (triangles) occurs after. Cloth seems to work better deforming quads. So again you then have to replace the object with a higher subdivided object to the the same results. The reason I make this point is that using Metalink on a higher subdivided object does not solve the problem because still the original calculation is on the base points of the lower poly mesh. And you will have not solved any of the above issues unless you run the calculation itself on a higher subdivided object.

DYNAMIC DEFORMATION: Cloth is after all a deform plugin. The resolution of the result is dependent on the points in the object just as they are with any other deformer. So - moving away from cloth for a moment - if you wanted a cool complex pattern on a rock or terrain for example you'd use a procedural texture or image map and subdivide a mesh enough times to get a fine detailed pattern. And of curse the larger and more complex the rock or terrain the bigger hit yo get on render time and RAM usage.

The same is true for cloth only the hit is in simulation time. The complex fold patterns that can be formed in the cloth due to collision, friction and movement can only happen at the level of detail you have in points. Like a river, the cloth simulation will send ripples across the cloth object. But these ripples can only be "rendered" as fine and detailed as the level of point subdivision of the cloth object during the initial simulation. Again, MetaLink on a higher mesh object does not solve the fine detail. You can do other things such has model folds and pockets and so on. But there is no solution here that I have found for dynamic folds and wrinkles other than higher subdivision on the initial simulated object. Again the hit is in simulation time.

That is my assessment after about two weeks so far. Fueled by, inspired by and tips from many people here - mainly Dirk - or I would not have gotten this far.

So Dirk, anyone, if I have made errors in any of my observations from two weeks of testing please point them out.

I am now looking for some kind of workaround. I am not sure just yet what that will be. Too bad there is no way to feed the cloth simulation into a bump map. I thought about using the crumple texture. Maybe there is some way to animate that based on the movement of the surface in the node editor perhaps? I am not that familiar with nodes yet.

Anyway any further help tips, advice, would be appreciated. :)

zapper1998
11-03-2008, 03:52 AM
wow awesome info,, and video.
could you share the scene or make a quick tutorial ????

please

Surrealist.
11-03-2008, 03:56 AM
Yeah I'd like to see that too actually. If you go up to the thread he posted with the leg there are some great tips in that thread too.

The Dommo
11-03-2008, 09:32 AM
ace example - although Mr Rid does raise some good points about use in production. Though, he's lucky to have jobs and clients that want that!

Mr Rid
11-06-2008, 03:33 AM
pant legs are easy. sleeves too. where it gets hard is the armpit and any places where cloth gets pinched between two colliders. or when you want a character to sit down. or to move in a fast, jerky motion, or if you want your cloth to slide along the body. say when your arms go up and the sleeves slide down the arms.

its cool that you are trying but i feel that you will hit the same walls i did when i played with lw dynamics. and believe me ive spent some serious time and pulled out some serious hair.
as far as i know lw dynamics havent really gotten much of an upgrade in terms of solvers, but id love to see you prove me wrong.

but its cool, i mean you are getting stuff for your reel. and tahts always good, id still expect a bit more complexity if i was reviewing it though. :)

Agree all around... 'walls.' Experiments are how you learn, but have been doing this way too long to ever be too impressed by simple tests as examples of how 'amazing' software is suppose to be. The devil is always in the details as major gotchas suddenly appear in mid-deadline that somehow were never mentioned by vendors.

evolross
11-06-2008, 04:33 PM
I'm really digging all of your examples Dirk. I think you're doing stuff that's more innovative and complex than I've seen on this forum in a good while. Good stuff. I look forward to more. :thumbsup: