Jump to content

Chassis creation walk-through


ClaytoniousRex

Recommended Posts

Poesel asked for some help getting his new Apollo-N chassis into the game. This post lays out the process that I followed to make it a working unit, so this might be helpful to those of you creating new objects.

Poesel had already figured many things out:

</font>

  • Modelling the new chassis and turret in a 3D modeller and exporting them to the OBJ format (I think he used Sketchup and Blender). As you can see in this example, he still needs to texture his new models (they are just solid colors representing armor values at the moment). For help with texturing with Blender, you can start with Toby's post in this thread. Some tips on OBJ export are in threads like this one. General help on creating models for a new unit are on the wiki. DropTeam aside, creating realtime 3D models with textures is a substantial skill set that takes time to develop. Teamwork is a good idea here. smile.gif</font>
  • The basics of creating a .physicalobjectgroup file for his new unit (specifying that his new models for the chassis and turret be used, etc.) Search this forum and see the wiki for a start on this.</font>

The main things he was having a problem with were:

</font>

  • Contacts (see this thread and this one )</font>
  • Collision Elements (see this thread and this thread and the wiki.</font>
  • Object origins and positioning</font>
  • Armor mapping</font>

This walk-through shows the process I used to address these remaining issues with the Apollo-N (but I haven't done armor mapping yet - will do that shortly and post). This is only the way I do it - creative folks here will doubtless have better ways of doing some or all of this.

First, the contacts. For this, as for most things, I simply use the 3D modeller itself to lay these out visually and then read off their locations and type those into the XML for the .physicalobjectgroup. Here's how I layed out the contacts for the tracks on the Apollo N:

Apollon2.png

Those are simply small red cubes that I positioned with the 3D modeller (in this case, I was using Truespace but whatever package you're comfortable with is fine). Just use whatever your modeller's interface is for positioning objects and place them at the locations for the contacts for the tracks. Here's a tip: take advantage of symmetry to only position those for one of the tracks, then mirror them all to the other side.

Now that the contacts are visually laid out on the model, I simply select each one and read its coordinates, then type those into the XML file for each Contact tag.

Apollon3.png

Now that the tracks are finished, we can do the rest of the contacts (for the remainder of the chassis). We do the rest of these together because there's nothing special about them. The LeftTrack and RightTrack contacts actually had meaning but the rest of these are simply points on the chassis. We lay them out and type them in just as we did with the tracks, but this time we use "Hull" as the names of the contacts.

Apollon4.png

That takes care of the contacts. Now we need to create CollisionBoxes. Again, we just use the 3D modeller itself. Create some cubes and scale them into a configuration that covers the volume of the chassis, like so:

Apollon5.png

The goal is to use as few boxes as possible but still cover a good approximate shape of the underyling object. Here's another view with the chassis itself removed so you can see just the boxes:

Apollon6.png

Notice that it's OK for the boxes to be a rough approximation of the underlying shape. The more detailed collision triangles will be used for accurate collisions when needed.

Also, notice that the left and right tracks each have their own collision boxes. This is is required for tracked vehicles, as explained in the thread linked to above.

Continued in next post...

Link to comment
Share on other sites

Now we have contacts and collision boxes. The last step was to position the turret and gun to form a complete vehicle. The turret that Poesel originally created looked like this:

Apollon8.png

Notice that it is floating up in the air above the x-y plane. This is because Poesel had saved the turret model already in position for where it should be mounted on the ApolloN's chassis. This is a bad plan! All models should be positioned at their own origin. So for the ApolloN's turret, I moved the turret down onto the x-y plane and centered what should be its rotation point at the world origin, like this:

Apollon9.png

This needs to be done because each object exists in the world as its own entity with its own position. If the turret were already hanging up in the air, what would it mean if you tried to position it at a certain point in the world? Or to look at it another way, consider what would happen when you mount this turret on a completely different chassis? Would it make sense for it to somehow have to already be in the correct position for both the ApolloN and for that other new chassis?

Now that the turret is sitting at its origin, we again use the 3D modeller to position it. We load up the ApolloN chassis along with the turret and then visually place the turret where it belongs:

Apollon11.png

Again, we simply read this position from the modelling program and type it into the Origin and Anchor tags for the turret in the XML file.

Then we do the same thing for the gun:

Apollon12.png

And with that, we now have everything we need to go for a spin:

ApollonDrive.jpg

Soon, I'll hookup the collision triangles and armor mappings and post that here, too.

[ December 11, 2006, 12:15 AM: Message edited by: ClaytoniousRex ]

Link to comment
Share on other sites

Excellent, thanks Clay! I appreciate the time taken for this!

If there is anything special about wheeled or hovercraft vehicles, I think we'd all love to hear about that also, so we can get a proper how-to for it all. Thanks!

[ December 11, 2006, 08:36 AM: Message edited by: Hawkslayer ]

Link to comment
Share on other sites

×
×
  • Create New...