Ragdoll models that aren't people

Got problems with your models? Struggling with textures? Get help with your custom assets.

Ragdoll models that aren't people

Postby Black_Stormy on Sun Nov 28, 2010 1:26 pm

I'm making a model of a pot overhanging a fire on a tripod of sticks. I have skinned it and fiddled with the bones for ages until I could finally get them working in hlmv. After adjusting the max rotation values I recompiled and nothing appeared broken. I put my model in hammer and when I started up my game the pot would not swing when shot.

I have it as a prop_dynamic in hammer, I am hoping that there is some sort of entity that I should have it as instead, or some value that I just have to activate. The image shows the bone mesh in hlmv, hopefully you can see what I am trying to do here. Here's my .qc:

Code: Select all
$modelname props/potandstand/potandstand
$cdmaterials models/props/potandstand
$body studio "potandstand.smd"
$surfaceprop "solidmetal"

$collisionjoints ragdoll {

   $mass 1.0
   $inertia 1.00
   $damping 0.00
   $rotdamping 0.00
   $rootbone "root"

   $jointconstrain "highhook" x limit -5.00 5.00 0.00
   $jointconstrain "highhook" y limit -20.00 20.00 0.00
   $jointconstrain "highhook" z limit -20.00 20.00 0.00

   $jointconstrain "lowhook" x limit -3.00 4.00 0.00
   $jointconstrain "lowhook" y limit -25.00 25.00 0.00
   $jointconstrain "lowhook" z limit -25.00 25.00 0.00

   $jointconstrain "pot" x limit -3.00 4.00 0.00
   $jointconstrain "pot" y limit -20.00 20.00 0.00
   $jointconstrain "pot" z limit -20.00 20.00 0.00
}
$sequence ragdoll       "ragdoll"       FPS 30


I can't find any tutorials on this stuff beyond capricious references to various parts of the .qc, and unanswered posts on forums. Any help at all would be greatly appreciated.
Attachments
pot.jpg
(14.29 KiB) Downloaded 190 times
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Ragdoll models that aren't people

Postby Kosire on Sun Nov 28, 2010 2:27 pm

I would strongly recommend to make 2 seperate models and use the entity phys_hinge/phys_ballsocket in hammer editor.

http://developer.valvesoftware.com/wiki/Phys_hinge
http://developer.valvesoftware.com/wiki/Phys_ballsocket
Last edited by Kosire on Sun Nov 28, 2010 6:17 pm, edited 2 times in total.
User avatar
Kosire
1337 p0st3r
1337 p0st3r
 
Joined: Sat Mar 07, 2009 7:25 pm
Location: Denmark

Re: Ragdoll models that aren't people

Postby nub on Sun Nov 28, 2010 5:54 pm

I'd have to agree with Kosire. While making a ragdolled model would be more "clean," having the tripods as a separate model and then just phys_ballsocketing the pot in place would be much easier to do. Phys_hinge would work but only in two directions.
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: Ragdoll models that aren't people

Postby Black_Stormy on Sun Nov 28, 2010 10:16 pm

Well that sounds a whole lot easier, although I am trying to use this to learn how to compile ragdolls. The fellows on facepunch were kind enough to point out various faults that eventually led to fixing it, now the problem I have is that studiomdl is creating its own phys model that shrinkwraps the entire model so I can't shoot at the pot itself, and $concave isn't working.

Image

studiomdl output:
Code: Select all
C:\Documents and Settings\Administrator>"d:\steam\steamapps\a_brookes\sourcesdk/
bin/orangebox/bin/studiomdl" "D:\Blendfiles\Models\Source\village scene\pot and
stand\ragdollplease\potandstand.qc"
WARNING: AppFramework : Unable to load module p4lib.dll!
qdir:    "d:\blendfiles\models\source\village scene\pot and stand\ragdollplease\
"
gamedir: "d:\steam\steamapps\a_brookes\half-life 2 episode two\ep2\"
g_path:  "D:\Blendfiles\Models\Source\village scene\pot and stand\ragdollplease\
potandstand.qc"
Building binary model files...
Working on "potandstand.qc"
SMD MODEL potandstand.smd
SMD MODEL ragdoll.smd
Processing jointed collision model
root                     ( 80 verts, 1 convex elements) volume: 211233.38
highhook                 ( 20 verts, 1 convex elements) volume: 43.94
lowhook                  ( 20 verts, 1 convex elements) volume: 20.00
pot                      ( 45 verts, 1 convex elements) volume: 2465.19
Collision model completed.
---------------------
writing d:\steam\steamapps\a_brookes\half-life 2 episode two\ep2\models/aura/pro
ps/potandstand/potandstand.mdl:
bones         1816 bytes (4)
animations     120 bytes (1 anims) (1 frames) [0:00]
sequences      232 bytes (1 seq)
ik/pose        164 bytes
eyeballs         0 bytes (0 eyeballs)
flexes           0 bytes (0 flexes)
textures        72 bytes
keyvalues        0 bytes
bone transforms      608 bytes
Collision model volume 213762.50 in^3
collision        0 bytes
total         3244
---------------------
writing d:\steam\steamapps\a_brookes\half-life 2 episode two\ep2\models/aura/pro
ps/potandstand/potandstand.vvd:
vertices     29520 bytes (615 vertices)
tangents      9840 bytes (615 vertices)
total        39424 bytes
---------------------
Generating optimized mesh "d:\steam\steamapps\a_brookes\half-life 2 episode two\
ep2\models/aura/props/potandstand/potandstand.sw.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:             9 bytes
strip groups:      25 bytes
strips:            27 bytes
verts:           5535 bytes
indices:         4662 bytes
bone changes:       8 bytes
everything:     10330 bytes
---------------------
Generating optimized mesh "d:\steam\steamapps\a_brookes\half-life 2 episode two\
ep2\models/aura/props/potandstand/potandstand.dx80.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:             9 bytes
strip groups:      25 bytes
strips:            27 bytes
verts:           5535 bytes
indices:         4662 bytes
bone changes:      40 bytes
everything:     10362 bytes
---------------------
Generating optimized mesh "d:\steam\steamapps\a_brookes\half-life 2 episode two\
ep2\models/aura/props/potandstand/potandstand.dx90.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:             9 bytes
strip groups:      25 bytes
strips:            27 bytes
verts:           5535 bytes
indices:         4662 bytes
bone changes:      40 bytes
everything:     10362 bytes

Completed "potandstand.qc"

C:\Documents and Settings\Administrator>pause
Press any key to continue . . .

Any thoughts?
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Ragdoll models that aren't people

Postby Black_Stormy on Mon Nov 29, 2010 12:52 am

Well, I just did a nasty work around, and it kind of works. I left it as the first compile with the bones only on the pot and chain and hung it in the air with a phys_constraint. Here's a .gif of it working in game, if anyone is interested.

http://www.milkshakezombie.com/images/dungeon_test0007.gif (4mb)
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Ragdoll models that aren't people

Postby crazycarl on Mon Nov 29, 2010 3:46 am

I believe you can only have one convex hull per bone, so your three sticks are getting shrink-wrapped. You might be able to get around that by assigning each stick to a bone and constraining them so they can't move. However, I think what you have is the best solution. Looks good, by the way.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Ragdoll models that aren't people

Postby Black_Stormy on Tue Nov 30, 2010 9:01 am

Spot on you are crazycarl. I made a seperate bone for each leg and I can now shoot through it. Problem is the legs now wobble all over the place when you shoot it and nothing stays quite in the right spot. Good enough for me though. I have learned how to make ragdoll props and it feels good.
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users

cron