Stridor's Bones, Groans & Psychic Moans Tutorial

Please post here for questions and discussion about unit modeling and general game modding. You can also post your new units and modifications here.

Moderator: EagleMountainDK

Post Reply
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Stridor »

It is expected that the reader of this tutorial has read and understood the concepts in 3D modelling which were introduced in my map making tutorials. The first of which can be found here http://www.matrixgames.com/forums/tm.asp?m=1788093 Specifically some familiarity with the Milkshape 3D (MS3D) editor will be assumed.

As there has been some interest in making new buildings for PCK, I thought I would put together a little tutorial on how to do this.

Map placeable objects for PCK come in two different types. Objects which can't be mounted by infantry (eg trees, fences, bridges, wood piles, farm yard animals, etc) and those that can be mounted (eg houses, churches, foxholes, trenches, etc). The main difference between the two you need to know when modelling them in MS3D is that mountable structures require the definition of "mount" points within the model. Previously this could only be done with expensive professional grade modelling and export software. However a recent development has enabled users of MS3D to achieve the same end result. This tutorial will explain in some detail how to attach these mount points to your building model so they can be used by infantry within the game.

Before we get to that, let's consider how PCK sees buildings. In PCK any mesh can be a building. The map.bmp pixels underlying this mesh are normally painted pure red RGB(255,0,0). This signifies a map obstruction so buildings can obstruct LOS. In the scenedit program (see addendum pdf manual documentation which is nominally installed to C:\Matrix Games\Panzer Command Kharkov\Manuals\Map Editing Addendum.pdf) a mesh can be defined as a building via the buildingtype attribute. There are several different "types" of buildings available, so please take your time to examine the different types in the editor. The maximum number of squads which can deploy in a building is 2 and the minimum is 1. When you design your building in MS3D you will need to think about how many squads would be able to fit inside it appropriately. Remember that the average squad size ~ 10 men, but this will be abstracted to just 3 men / squad for modelling purposes.

What this means is that if you wanted to place two squads in your building you will need to define 6 mount points (3 / squad * 2 = 6), one squad only 3 points. Mount points can be placed anywhere you like including on different stories, so it is a good idea to also model some floors for upper story structures if you want to place squads up there, lest they will float in mid air when they come to mount the building in the game. Another point I should make at this stage is that squads mount in the order in which the mount points are defined. This is worth noteing. Consider a church with a bell tower from which excellent battlefield visibility can be achieved. If you want the player to mount his men from the bell tower down, then remember to order the mount points as such, otherwise you are setting the scene for some major player frustration! Also it is a good idea to place your mount points at logical places in the mesh (eg looking out windows, rather than hiding in attics) so that all appears sensible to the player. The game engine doesn't distinguish between a squad hidden away in the bowels of a building which would have no hope of firing outside said building, from one which is looking out the window. The player however, will.

Ok we will start with a small building. This is a little number I knocked up in Google Sketchup (SU) in just a few minutes and then imported into MS3D. The building itself is not too important however, it is just being used as a prop for further exposition. Notice how the little house is appropriately scaled for the game (recall 1 MS3D unit = 2.54 meters in game), its base sits flat on the Y plane and is pretty well centered on the origin.

Image
Attachments
ss36.jpg
ss36.jpg (238.96 KiB) Viewed 396 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Stridor »

Now what we need to do is to define a base frame reference point. Don't worry too much about the technical jargon just do a I say and it will all be cool.

In the tools panel ensure the Model tab is selected and then press the Joint Button. Next left click roughly over the origin point in the top down view. You will notice a big red circle with cross appears. This is a "joint" (we call it a base frame).



Image
Attachments
ss37.jpg
ss37.jpg (198.59 KiB) Viewed 394 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Stridor »

Next click on the "Joints" tab on the tools pane. Here you will see a list of the defined joints. At the moment there should only be the one you just made called "joint1". Double Click on this to select it then type the following name in the rename box "Frame_Mesh" (without the quotes). It is important to get this just right! Then click on the rename button and your joint will be called Frame_Mesh. Good our house mesh now has a root bone/joint/frame called Frame_Mesh.



Image
Attachments
ss38.jpg
ss38.jpg (215.88 KiB) Viewed 394 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Stridor »

Now it is time to define our first infantry position. Because this little house will have only one squad inside it I will need to define three positions 1-3.

Lets start.

Please go back to the model tab (Joint should still be selected). From the Menu select Edit->Select None (Ctrl+Shift+A) to deselect your "Frame_Mesh" joint, and then click on the top view where you would like your new joint (our first man position) to be located. It is very important that you deselect any selected joints before making a new one otherwise MS3D will attempt to link the joints together and we don't want that. When you place a joint which represents an infantry position within the mesh, it will correspond to the right foot of the soldier. So by placing the joint on the floor the solider will be standing *on* the floor. Now that you have placed the position of the first soldier you now need to place a facing direction joint. To do this once again deselect all joints (Ctrl+Shift+A) and then click in the direction you want your digital guy to face. Notice in the SS below I have placed my guy to be close to the left window and looking out. I have maximized the "Top View" for a closer inspection.



Image
Attachments
ss39.jpg
ss39.jpg (191.9 KiB) Viewed 394 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Stridor »

Now I want you to go back into the Joint tab and rename (exactly as you did with the Frame_Mesh joint) the two new joints as follows:

Frame_bone_position01 (for the position joint which probably is called joint2 by MS3D at this point)
Frame_bone_position01_dir (for the direction joint)

Remember to double click on each joint in the joint list to select them prior to renaming them.

Note well: The naming must be exact, don't fool with this, this is what took me many hours to figure out!

Image
Attachments
ss40.jpg
ss40.jpg (205.8 KiB) Viewed 394 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Stridor »

Now you just need to define where the other two guys will go in exactly the same way. I put my second guy near the other window and because there wasn't a third window, I just stuck the last guy down the back near the chimney [;)] I then went and renamed all the joints appropriately. If you wanted a second squad in the building you would have to go up to position 6.

It is also probably worth mentioning at this point that you can use the standard MS3D move tools to move joints around as you need too (ie. move them up to a second story level).

And that is it, you are done, all you need do now is export your work as a direct X file.

Image
Attachments
ss41.jpg
ss41.jpg (250.51 KiB) Viewed 394 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Stridor »

To export your work from the menu select File->Export->Direct X (JT)...

Select a place and filename to save. I selected "myhouse.x" and I placed it in my Colo_River directory. Ensure you fill out the export dialog exactly as is shown in the following screen shot. Be especially careful of "Position Scaling" as the exporter defaults this to 0.1 (and you want it to be 1.0). Press Ok and your new model is ready for insertion into a map. Remember that you will need to reference the house mesh and any house textures you used in the media.xml file (see http://www.matrixgames.com/forums/tm.asp?m=1794377). Note you can call your Root Frame Name anything you like or just leave it as the recommended default which will incorporate the filename you entered.



Image
Attachments
ss42.jpg
ss42.jpg (230.6 KiB) Viewed 394 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Stridor »

If you did everything right it should look like this in the game ...

It is worthwhile checking your mount points by mounting infantry in the game to ensure they behave as you expect them too. Common problems are mount points too close to walls such that guns and feet clip through the walls. Mount points not set on floors, so infantry seem to float on air.

You will also note at this stage what a waste of time it was to define facing direction joints as you can set the squad facing as you choose at game time with the face squad command [:@]. However if you don't include the direction joints the whole thing will fail (either crash PCK or cause the squad to mount at map 0,0,0 - not pretty), so you best include them.

That brings us to the end of this tutorial.

Enjoy

S.

Image
Attachments
ss43.jpg
ss43.jpg (104.63 KiB) Viewed 394 times
User avatar
Biffa
Posts: 119
Joined: Tue Apr 15, 2008 9:49 pm
Location: Wiltshire
Contact:

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by Biffa »

I know we're not suppose to reply to your tutorials but~
 
[&o]
benpark
Posts: 3033
Joined: Mon Aug 12, 2002 1:48 pm

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by benpark »

Stridor, how did you import the Sketchup model into MS3d?

"Fear is a darkroom where the devil develops his negatives" Gary Busey
User avatar
RyanCrierie
Posts: 1321
Joined: Fri Oct 14, 2005 7:15 am
Contact:

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by RyanCrierie »

Trying this in Milkshape for my Foxholes, BUT, I cannot see the joints at all on my screen

EDIT:

Stupid milkshake has joint size 0.0 as default. [:-]
User avatar
RyanCrierie
Posts: 1321
Joined: Fri Oct 14, 2005 7:15 am
Contact:

RE: Stridor's Bones, Groans & Psychic Moans Tutorial

Post by RyanCrierie »

I'm sorry, but Milkshape is horribly unintuitive, and I can't get the joints to go where I want them. I click over the foxhole position, and the bone is created on 0,0,0 [:@], NOT over the click point. [:@]

EDIT: Stupid Snap to Grid option, NOW it works. [:D]
Post Reply

Return to “Maps, Models and Mods”