Clothes/hair physics

neozero

Newbie
Joined
Oct 26, 2003
Messages
160
Reaction score
0
Will the physics engine work for clothes/hair?

I.E. long flowing dresses, scarves, ponytails, etc.

Just wondering, I think I might have seen this done before, so it's not an entirely new concept, I;m curious as to what extent it is theorized to be able to be implemented.
 
neozero said:
Will the physics engine work for clothes/hair?

I.E. long flowing dresses, scarves, ponytails, etc.

Just wondering, I think I might have seen this done before, so it's not an entirely new concept, I;m curious as to what extent it is theorized to be able to be implemented.

No, remember that this is rendered real time. Fine details like that would probably lower the framerate of even the best video cards.

However, if you were to say throw a ponytail with bones on the back of the head of a model, and animate it's idle pose to wave back and forth and whatnot, then yes, it could be faked. But that high-level of detail will not be found in HL2.

Sorry, no taking off Alyx's clothes.
 
However, if you were to say throw a ponytail with bones on the back of the head of a model, and animate it's idle pose to wave back and forth and whatnot, then yes, it could be faked. But that high-level of detail will not be found in HL2.

I think the engine CAN handle an physically correct ponytail or a long scarf in real time (hey they have havoc and Max Payne 2 does that with Paynes lower jacket end without problem). And if it can do that, calculating a whole dress in a person (eg. a "hollow" dynamic dress model "worn" by a playermodel) is just one step further down the processor-power-road... So I say "Yes, it can be done" with the addition "but only with relatively small parts of a model" because you do not have the required processor speed, but hey, just give it a try when HL2 is out... somebody has to measure its limits :)

Edit: And the next thing we'll see is a mod where you have damage textures combined with a clothes-damage-system whitch results in pervs trying to shoot away girl's clothes :)
 
Konfuzzyus said:
(hey they have havoc and Max Payne 2 does that with Paynes lower jacket end without problem).
That is still an animation if I remember correctly.

At any rate, yes its probably perfectly possible. Hair has been done in TR, both clothes and hair has been done in NWN, and hair is in KOTOR, lots of stuff are realtime in Hitman/Hitman2, and there are probably more games I've forgotten. And mind you that is all without a physics engine...
The problem is how well it works. For example, Hitman 2 has neat curtains you can move through that look and move very real, but they can freak out from time to time and have very twitchy movement (or jump around). How would it then be if you had that running all the time on a player? Even REALLY hardcore clothes physics (for instance robe physics in SW: Episode 2) can freak out or go through models, if you watch how they made the movie :)
 
Splinter Cell has good soft body physics, i thought they would take a lot of power to create but i can happily run back and fourth through them on my shitty system with no slow down :)

As for HL2, seeing as it is Havok powered i think it should be possible as its possible in this demo (off the Havok website):

http://www.farbflash.de/curtain/
 
Ive been talking to Gabe about this. This can be done, but you need to loose some details on the rest, but you can do it.

I will use it in my mod, since the scenery will be basic in its form (Zelda: Wind Waker-ish).
 
They even had this motion stuff in Hitman.. I remember one mission where you could run into the cloths hung up and they would move realistically..
 
Jhahn2k4 said:
They even had this motion stuff in Hitman.. I remember one mission where you could run into the cloths hung up and they would move realistically..

You can do it in a lot of engines these days... but you cant have a huge map with 60 players with 348748624387 polys and so on... you need to think about what you need and what you dont need in the mod.
 
I agree with MajesticXII - think about what you need and don't need. The clothing and hair effects would be cool and certainly get your mod fair publicity, but if you want the rest of your mod to look as good, if you want detail, it's inefficient.
 
I'll certainly be putting it in mine, need some cool effects like that for some of the characters as they have long robes, then there's flags and such, and other stuff I'm not giving anything away on ;) If it can be done well it'll be in mine... I hope :D

ooh 2,900 posts before midnight, heh
 
It can be done, and has been done in the Source engine even. See Vampire:The Masquerade, it will feature moving clothing (like capes/robes). It is definately possible, and has even been done in this engine, as well as in the upcoming MMORPG Everquest 2.
 
Well the reason I asked, is I was looking at a lot of player mods, and saw that the clothes were built right on the mesh.

This was alright normally, but when the model would bend, the clothes didn't scrunch like they should, behaving like rubber really.

The real question is could you make a model that is completely surrounded in physically simulated clothing. So when they would bens, the fabric would scrunch instead of deforming like it was pliable.

When you think about it, this would be harder for thicker clothes that are tight. Like a leather jumpsuit, versus a loos skirt.

Just wondering, I'm probably gonna have a character of mine where a scarf and be done with it, but I'm really just putting an Idea out there.
 
neozero said:
Well the reason I asked, is I was looking at a lot of player mods, and saw that the clothes were built right on the mesh.

This was alright normally, but when the model would bend, the clothes didn't scrunch like they should, behaving like rubber really.

The real question is could you make a model that is completely surrounded in physically simulated clothing. So when they would bens, the fabric would scrunch instead of deforming like it was pliable.

When you think about it, this would be harder for thicker clothes that are tight. Like a leather jumpsuit, versus a loos skirt.

Just wondering, I'm probably gonna have a character of mine where a scarf and be done with it, but I'm really just putting an Idea out there.
I think that could be done but the object would have to be very high poly to bend properly
 
Who knows, maybe they implemented some code that can move vertices to the place where the bend is required. Saving poly's, and using a little CPU power instead.
Who knows, the interesting thing to me will be making the actual clothing. Will you make a mesh and put it around the model, and apply a special modifier or something, or maybe you make a seperate file and assign some sort of wierd weighting to all the vertices.
 
babywax said:
Who knows, maybe they implemented some code that can move vertices to the place where the bend is required. Saving poly's, and using a little CPU power instead.
I'm a bit confused at this. Are you referring to IK animating, FD animations, ragdoll, keyframe? Moving vertices to the place where the bend is required... Yeah, this isn't ringing any bells with me :p

babywax said:
Who knows, the interesting thing to me will be making the actual clothing. Will you make a mesh and put it around the model, and apply a special modifier or something, or maybe you make a seperate file and assign some sort of wierd weighting to all the vertices.
I think it would be as simple as making the clothing a ragdoll body. Of course there would be a lot of "bones" involved in order to make it look good, but that could be changed with detail settings. Maybe for a cape/cloak, have ten columns of bones along it and fifteen rows of bones, and snap groups of vertices to each bone. Which would equate to... 150 bones. Hmm.

Well considering that, that would be the "high detail" setting, and wouldn't need to be server-side physics as the cape would provide little to no physics interaction. Perhaps only if it catches to a can or something, but that as well is a client-side physics object. And if your CPU can't handle the high detail setting, then you could lower the amount of bones in the cape. It would look crappier but run smoother.

Still, I'm not 100% sure that what I said is possible or would even do what I want it to do. So... Yeah. Comments?
 
As a rule: For SP-mods - You can use it rather expensive in coded scenes and with singular characters or objects.
For MP-mods - Sacrifice a little of the detail since it's better to have a ugly-looking fun game than a good-looking one that can't even be played.
 
I'm a bit confused at this. Are you referring to IK animating, FD animations, ragdoll, keyframe? Moving vertices to the place where the bend is required... Yeah, this isn't ringing any bells with me
To have ragdoll look good with a "smooth body" (I.E. something rounded, or something that will bend) you need to have a lot of polygons on it. Polygons slow down r speeds, so what I'm saying is instead of have a 1000 polygon cape, just make like 200 polygons for the cape, and whenever the cape bends in a specific spot, it re-arranges the polygons on the cape so that it will still look smooth. However this might be far more taxing than just having high polygon clothing.
 
I thought the Vampire Bloodlines mod (whatever it is) had to add their own clothes code to source.


edit: ...and particle system too, if I remember correctly.
 
They did, I just said that to show it was possible to program it into the Source engine, without making it too taxing on hardware.
 
Yeah, it's possible, but it implies that the source engine can't do it out of the box.
 
The Source engine wouldn't need to do it out of the box unless a scene involves Alyx stripping to distract some guards.
 
Nooo! The Source engine must be able to do everything, regardless of necessity!
 
your guys are funny. i love this community, even though i dont post much i consider this a home of some sort.

anyway, i can imagine a scene in city17 where your looking at alyx or some soldiers with a clam wind. their hair reacts as it should and their cloths move softly in the warm wind. a feeling of comradery will be very apparent, as you are preparing to fight, having a moment of comfertable silence.

maybe its a little out of the blue but as u can see my expectations are pretty high pertaining to the maturity and emotion attachment in the game.
 
I don't it's wrong to expect games to be expressive.
That's ine of the things I'd shoot for.

Why I suggested this topic in the first place.
 
HAven't read all of the posts, but the way I see it. If Half-Life2 can handle the water and ragdoll dynamics, I don't see why it couldn't handle cloth physics. Whether or not it'll be included in the released Half-Life2, I don't know, but I'm sure it's programmable.
 
CrazyTalk said:
HAven't read all of the posts, but the way I see it. If Half-Life2 can handle the water and ragdoll dynamics, I don't see why it couldn't handle cloth physics. Whether or not it'll be included in the released Half-Life2, I don't know, but I'm sure it's programmable.

As i said :)
 
hey guys, i just thought id re-open this thread, as it seems a logical place to start :p

the leader of Hell Blaze ( the mod i work for ) has asked me about 'real-time clothing', as he calls it. yes, i do know real time clothing can be done, but what he wants is a bit different.

1) he wants to have a person 'dress' themselves while the player runs around them and the room.
2) he wants someone to rip off their sleeve, to use it as a tourniquet.

instantly i suggested having a cut scene ( as its Single-Player ), or have a separate animation for it and just have a switch to turn it on. im not very experienced in game design at all, so i was kinda hoping you guys could help.

cheers
 
random.hero said:
hey guys, i just thought id re-open this thread, as it seems a logical place to start :p

the leader of Hell Blaze ( the mod i work for ) has asked me about 'real-time clothing', as he calls it. yes, i do know real time clothing can be done, but what he wants is a bit different.

1) he wants to have a person 'dress' themselves while the player runs around them and the room.
2) he wants someone to rip off their sleeve, to use it as a tourniquet.

instantly i suggested having a cut scene ( as its Single-Player ), or have a separate animation for it and just have a switch to turn it on. im not very experienced in game design at all, so i was kinda hoping you guys could help.

cheers
Yes you'd probably need to script it or setup a specific animation for it to happen. the physics "might" take care of some of it, though in all honesty it would be easer/better to do it by hand, that way you've got more control. It's not as difficult as it seems, its just another animation sequence with start and end sequences sandwitching it between.
 
somehow, i thought you might reply Fen, as you see to be so pro on everything :)

cheers Fen, i thought a separate animation would be the way to go. maybe a cutscene would be even better ?
 
Now that I think about it, doing hair or clothes would be really easy. Even tomb raider 2 had decent hair! I don't see any problem with having a jacket or something built out of individual pieces that ruffle like cloth. Check out the matress in the tech vid. Same principle, just make it thinner and pin it on the character.
 
This can be done EASILY and FINE on the source. Don't kid yourselves people. They show off this EXACT technology on the XSI videos. (Remember the octopus with the 8 dynamic legs?) People, don't underestimate the power of modern technology. :)
 
He was asking about a scene with someone putting on the clothes, not regular phyisics during the game. Think about that for a moment. You would need to model a high detail piece of clothing and ensure that at every point the physics don't screw up and get confused, cause when they do it can easily cause a crash. It's a regular occurance in pre-rendered dynamics so a realtime engine is going to be even more sensitive.

You'd be wasting extra CPU calculations doing an effect with realtime physics which in itself is just a one off, which can be done by hand and use no physics and hence not be a CPU hog.

Physics are good but some of you are expecting it to accomplish miracles, which it can't. And when you really look into the complexities of actually putting on a piece of CG clothing onto a character you'll see why people who do that can earn quite a nice living.

--

random.hero. Check out some MAYA tutorials and papers on soft body dynamics and how it works. A similar method could be used for doing what your wanting.

On the other hand if your wanting this to definately be a physics effect, then well I wouldn't recommened the amount of work involved to be honest. I'd fake it because its a scripted event and there's less room for error doing it manually and you'll be sure to get it looking how you want it to look. Physics are fine, but sometimes their not the best solution to a problem.
 
Ah, I didn't notice that part. I thought they were talking about simple in game physics (ie, a matress. :) )
 
Top Secret said:
Ah, I didn't notice that part. I thought they were talking about simple in game physics (ie, a matress. :) )
heh yep. Admittedly it would be cool if someone did model 100% physics clothing, but I can only see that happening in some tech demo. As in game it would be OTT. Though the odd trenchcoat or cape is quite possible.
 
Where in this thread does neozero ask about npcs dynamically putting on separate physically simulated articles of clothing?
 
Sgt. FictiousWill got it right. Vampires: Bloodlines has real-time physics for cloth and hair.

They also updated the lighting system to react with their new particle system :)


A really good coder, skilled with physics could code it into Source though. BTW, it seems that more and more, people are making some things closed-source. Sure you could make it premier in your mod, but in the end it will only help all of our playing experiences :)

I think that some mods that put in new tech into the engine (that is, if it doesn't involve crucial code that could be reverse-engineered to make cheats/hacks) and include it with their mods, source files that is. Heck, think of all the cool things everyone could do :) Just ask that they credit you for the mod.

Anyways those are just my suggestions and the likes.



For the scene, I would expect doing some scripting or really good animation.
 
Back
Top