Creating worldmodels from viewmodels
ancient clothing and culture of india ohio diamond buyer wild woods lodge personal property law used furniture in houston tx and so it goes guitar tab soybean growth and development 3d desktop themes evil music valley stream station 14 celebrated french holiday july watching my wife being fucked neurology cme origin of dollar sign student led conferences forms essential functional skill examination of the eyes tax pro rise against music videos 16 black rims robert de lasalle small in ground pool studio theater dc marketing online affiliate promotion internet business underground storage tank regulation nasty young pussy art clip wings someone told me lyrics student software pocket pc msn premium software download orange county tattoo parlor weather for september 2005 red book carpets rights under the fair credit reporting anymous surfing asia hotel bangkok map london rail fares evangelical ministry new york toronto college and university jasmine st claire news dominica she sends action 9 news charlotte nc ph lab report laptop notebooks reviews the magicians tower adsl modem linux play free car racing game now west hartford ct restaurants ip table what is a postscript file lisas floral i heard em say lyrics add manufacturing off site url set designs admission last date asp news indianpolis star painter 9 brushes laptop intergrated wireless adapter xp audit income tax i wanna be your lover song tarte smooth aftermarket wheels for car tu madre tambien medical board examination pan american championships 2005 award medal teenage girls with red hair excel minimize qt kde windows introducing a dog to a cat home please please tell me now the carolinas usa autocrine paracrine art schools pennsylvania s african pop music jennifer burton pics lost embrace reviews live cameras in london exchange speed trap 1 card gb memory sandisk infection sign wound site builders free marshall fields and african american and chicago editor html palm used honda civic car insurance landslide photos of brad pitt and angelina jolie 2006 baseball odds liberty racing west advertising strategies of state bank of india mom fucks boy stage backdrop design 32 baby premature week exclusivity contract sample islamic photographs windows media player 10 pocket pc downloads paint colour charts australia world trade center path station This tutorial teaches you how to create a world model from a view model. It does not teach you how to do modeling or how to work with a model editor. Even though the screenshot shows 3ds max 7, the same can easily be done in all other model editors if you have sufficient knowledge of them.
Please note that even though this tutorial uses a view model for demonstration a world model should have a lot less polys and / or LOD_Models to ensure best performance in-game.
Setting up your model
If you just take your model and compile it as a prop_physics, the engine will not know where to put it onto the playermodel. The result can be somewhat hilarious but is most likely not what you are looking for.
To change this, load your view model (without hands) into your favorite model editor. It will be helpful (but is not necessary) to remove all bones that you needed for animating your view model, so you end up with one object/bone.
Place the hand bone
Now there are two ways to go. The first one is if you are doing a new model (not a replacement model) or if you don't have the model you want to replace decompiled:
Create a new bone with the name ValveBiped.Bip01_R_Hand
. Place it so that it is in the position you want the right hand of the playermodel to be. Now link
your model to the bone. (If you move ValveBiped.Bip01_R_Hand
now, the weapon moves with it.)
In case you have a decompiled model you want to replace, move your new model into the position of the old one, delete the old one and link
your model to the ValveBiped.Bip01_R_Hand
bone.

ValveBiped.Bip01_R_Hand
is part of the standard Valve rig. If you use a custom rig, you'll need to use the bone name of that one.
ValveBiped.Bip01_R_Hand
will not work as a bone name if using xsi instead you must create a bone called BIP01_R_Hand and parent it to the ValveBiped nodeExport and compile
Export your model (make sure to export unused bones if your exporter asks you). Compile it like any other physics prop (however without $staticprop because that would collapse your bones).
Just for reference here is the .qc that was used to compile the model seen in the screenshots:
$modelname "weapons/w_m4a1.mdl" $cdmaterials "models/weapons" $scale 1 $keyvalues { "prop_data" { "base" "metal.medium" } } $model w_m4a1 "w_m4a1.smd" $sequence idle "w_m4a1" loop fps 15 $collisionmodel "w_m4a1.smd" { $mass 3.0 // Mass in kilograms $concave }
Now start the model viewer and load a playermodel of your choice as well as your world model. Most likely your weapon will not be perfectly sitting in the hand, might range from some fingers going through the weapon to the weapon pointing in a completely wrong direction.
Go back to your model editor. The actual position of the weapon or of the bone doesn't matter at all! All that counts is the relative position towards each other. In some cases you need to rotate. I'd advise not to rotate the weapon model but the bone. Either unlink it and link it later again or edit it without affecting children bones (for max you can find this setting in the hierarchy tab).
In case you want to add attachment-bones, like for a muzzle flash, add a bone with an according name (e.g. ValeBiped.muzzle flash
) and link it to ValveBiped.Bip01_R_Hand
.
Technical explanation
If you want to have a little bit of extra knowledge that helps you to understand how this works, read on.
The engine merges the bone ValveBiped.Bip01_R_Hand
of your player model with the a bone of the same name in your world model (in case it's the root bone). All bones that are a child of this bone will naturally move with it, that's why we have linked the weapon and the muzzle flash to it. The skeleton of the player model and of your world model have become one! When you have loaded both in the model viewer and you activate Bones
in the render tab you can easily see it.
To make sure the you got this correctly, you can also look into your .smd file.
If everything is correct, it should start like this:
version 1 nodes 0 "ValveBiped.Bip01_R_Hand" -1 1 "m4a1" 0 end skeleton time 0 0 # # # # # # 1 # # # # # # end
As you can see, in nodes
the ValveBiped.Bip01_R_Hand
is defined as the root bone while the bone called m4a1 is a child of it. In the skeleton
part the position of both are defined.
If this is not the case, but you are sure that everything is set up correctly, check your exporter settings again.