Create MoutePoints for weapons in Blender
by DreamPharaoh · 03/14/2008 (10:10 am) · 4 comments
Creating a mountable weapon in Blender
This is my first blog so feel welcome to ask questions to areas that I will probably overlook. Second this assumes that you have already created the weapon mesh; in other words its focus is simply how to add mount points (markers). I am using Blender 2.45 and Exporter 0.952.
The markers are used to tell the Torque Engine where to mount the image to the player, emit particle effects, and emit projectiles. Many programs use nodes as the points for this such as Milkshape. The exporter for Blender uses empties for many of the exporting nodes. In this case using empties for the mounting points will not work. Instead you will need to create separate armatures. Each armature will be named and an animation must be attached to the armature and named the same as well.
.
Add an armature by putting your cursor over the 3D window, make sure Blender is in object mode.
1). Deselect everything with the A button. Hit A until nothing is highlighted (pink color).
2). Then place the cursor-point (use left mouse-button) to where you want the mount point to be (where the weapon will be held). Use the numeric pad (especially 3 and 7) to make sure the cursor-point is center.
3). Hit the spacebar: select Add to get the dropdown, and then select Armature.
4). The Armature(bone) will probably be quite big - just hit G button and move the mouse until the size looks good (size does not matter), and hit enter. Name this mount0.
5). Mount0 should be still highlighted (Hit A button if not) and hold down the shift button while right-clicking on the mesh, both should be highlighted. Then Hit Control + P and select "Make Parent".
6). Hit the A button until all object are not selected. Get back into object mode (very important before adding each marker), and repeat these steps for markers 2 and 3 listed below...
Marker 1: called Mount0 (or up to Mount32 I believe... not 100% on that).
Note: Put this marker at the place where the weapon will be held.
Marker 2: called ejectpoint.
Note: Put this marker where you want a particle effect to emit or empty shells to eject.
Marker 3: called muzzlepoint.
Note: Put this marker where the projectile will basically emit.
Now you must attach an animation to each armature. Select the first armature mount0, and make sure you are in object mode.
1). Change the type of your second window into Action Editor from the dropdown in the bottom left corner (the icon looks like a stick figure).
2). Add an action. At the bottom of the Action Editor Window you see a Bake button, to the left of this is a dropdown. Click the dropdown and select "Add New". Name this as mount0.
3). Deselect all objects in object mode by hitting the A button, and repeat these steps for the next two markers(Armatures).
4). Save this as a separate file name, just in case mistakes are made.
Exporting
Initiate the Torque Exporter: under the Armatures Tab, select the bones and click on the Blend button for each, and then export.
Make a new folder under shapes for your weapon and put the DTS file along with its texture into it.
Quick Test
I have used a preexisting weapon and changed its DTS path to my weapons DTS instead. This will quickly determine if the weapon mounts in the engine. The Rocket Launcher Weapon cs worked great for me since I already had it armed on my avatar. Adjustments will need to be made to make it look right in first and second perspective. You may need to turn the weapon in Blender and re-export it as well to get it to fit right.
Hope this helps. Happy Blending.
This is my first blog so feel welcome to ask questions to areas that I will probably overlook. Second this assumes that you have already created the weapon mesh; in other words its focus is simply how to add mount points (markers). I am using Blender 2.45 and Exporter 0.952.
The markers are used to tell the Torque Engine where to mount the image to the player, emit particle effects, and emit projectiles. Many programs use nodes as the points for this such as Milkshape. The exporter for Blender uses empties for many of the exporting nodes. In this case using empties for the mounting points will not work. Instead you will need to create separate armatures. Each armature will be named and an animation must be attached to the armature and named the same as well.
.
Add an armature by putting your cursor over the 3D window, make sure Blender is in object mode.
1). Deselect everything with the A button. Hit A until nothing is highlighted (pink color).
2). Then place the cursor-point (use left mouse-button) to where you want the mount point to be (where the weapon will be held). Use the numeric pad (especially 3 and 7) to make sure the cursor-point is center.
3). Hit the spacebar: select Add to get the dropdown, and then select Armature.
4). The Armature(bone) will probably be quite big - just hit G button and move the mouse until the size looks good (size does not matter), and hit enter. Name this mount0.
5). Mount0 should be still highlighted (Hit A button if not) and hold down the shift button while right-clicking on the mesh, both should be highlighted. Then Hit Control + P and select "Make Parent".
6). Hit the A button until all object are not selected. Get back into object mode (very important before adding each marker), and repeat these steps for markers 2 and 3 listed below...
Marker 1: called Mount0 (or up to Mount32 I believe... not 100% on that).
Note: Put this marker at the place where the weapon will be held.
Marker 2: called ejectpoint.
Note: Put this marker where you want a particle effect to emit or empty shells to eject.
Marker 3: called muzzlepoint.
Note: Put this marker where the projectile will basically emit.
Now you must attach an animation to each armature. Select the first armature mount0, and make sure you are in object mode.
1). Change the type of your second window into Action Editor from the dropdown in the bottom left corner (the icon looks like a stick figure).
2). Add an action. At the bottom of the Action Editor Window you see a Bake button, to the left of this is a dropdown. Click the dropdown and select "Add New". Name this as mount0.
3). Deselect all objects in object mode by hitting the A button, and repeat these steps for the next two markers(Armatures).
4). Save this as a separate file name, just in case mistakes are made.
Exporting
Initiate the Torque Exporter: under the Armatures Tab, select the bones and click on the Blend button for each, and then export.
Make a new folder under shapes for your weapon and put the DTS file along with its texture into it.
Quick Test
I have used a preexisting weapon and changed its DTS path to my weapons DTS instead. This will quickly determine if the weapon mounts in the engine. The Rocket Launcher Weapon cs worked great for me since I already had it armed on my avatar. Adjustments will need to be made to make it look right in first and second perspective. You may need to turn the weapon in Blender and re-export it as well to get it to fit right.
Hope this helps. Happy Blending.
About the author
If you want to learn more, please go to my website. GodsandNemesis.com.
#2
why use seperate armatures for each node? why not use bones?
if it's important to use armatures instead of bones, what should be renamed, the bone or the armature? what should the parent order be?
07/14/2008 (8:33 pm)
why would i need to attach an animation to each armature?why use seperate armatures for each node? why not use bones?
if it's important to use armatures instead of bones, what should be renamed, the bone or the armature? what should the parent order be?
#3
Not having much luck, though. It's just not mounting on my mount0. I am inexperienced with Blender armatures, though. The armature should be the child, correct?
Also, when I add an armature, I get a bone, basically. Does it need to be oriented any particular way?
07/23/2008 (10:00 pm)
Dreampharoah, thanks for posting this. I am a Milkshape refugee, currently.Not having much luck, though. It's just not mounting on my mount0. I am inexperienced with Blender armatures, though. The armature should be the child, correct?
Also, when I add an armature, I get a bone, basically. Does it need to be oriented any particular way?
#4
a little update 9 years later :)
I had to call the armature 'mountPoint'. 'mount0' is the node for hand of the player model.
The shapeditor in torque3d is very useful for testing.
If you scale/rotate the mesh, don't forget to apply the object's transformation to its data in blender (ctrl-a -> apply rotation & scale). Otherwise the animation in the shapeditor will look different than the animation in the world.
Happy blending!
02/05/2017 (11:24 am)
Hello,a little update 9 years later :)
I had to call the armature 'mountPoint'. 'mount0' is the node for hand of the player model.
The shapeditor in torque3d is very useful for testing.
If you scale/rotate the mesh, don't forget to apply the object's transformation to its data in blender (ctrl-a -> apply rotation & scale). Otherwise the animation in the shapeditor will look different than the animation in the world.
Happy blending!

Fyreus Maccoy