Cable

cable
Download cable.zip

This model is a length of cable for detailing maps. Having a model of the cable offers two advantages over using brushes: it has smoothing which disguises the low-poly nature of the model, and it allows for animation of the cable. The model is well suited to base maps but also includes a “rope” texture for use in medieval maps.

Skins

  1. Rope
  2. Black wire
  3. Hazard stripe wire
  4. Red wire
  5. Blue wire

It is fairly easy to create new skins for this model, but do note how the hazard stripes and rope plaits work. The central portion of the skin is mapped on a slant, with an offset of exactly 8 pixels from the top edge to the bottom. This means that striped patterns which repeat every eight pixels will match up between the top and bottom edges. 

Frames

The model comes with a selection of frames and animations to use.

  • poses: 12 frames with no corresponding animations, each in a different pose, some hanging down tight, others looping back or connecting to walls with perpendicular facings.
  • med_frames: A sequence of 12 frames where the rope hangs horizontally at a medium length, and swings from side to side. The frames are ungrouped, and so can be used individually as static poses or manually animated.
  • med_anim: The above sequence grouped to animate automatically at 10fps.
  • tall_frames: A sequence of 12 frames where the rope hangs from uneven heights and swings from side to side. The frames are ungrouped, and so can be used individually as static poses or manually animated.
  • tall_anim: The above sequence grouped to animate automatically at 10fps.
  • long_frames: A sequence of 8 frames where the rope is stretched taut and bounces up and down. The frames are ungrouped, and so can be used individually as static poses or manually animated.
  • long_anim: The above sequence grouped to animate automatically at 10fps.
  • hang_frames: A sequence of 20 frames where the rope hangs vertically, and the untethered end swings back and forth. The frames are ungrouped, and so can be used individually as static poses or manually animated.
  • hang_anim: The above sequence grouped to animate automatically at 10fps.
  • straight: A single frame of the rope at full stretch.

Orientation

In order to get the best model possible, the rope is not always oriented in the most natural way possible. Because the cable will mostly be hanging from the ceiling, above the light sources in the room, it is most natural for it to be lit from below. The skin is painted this way already. We can exploit the quirks of the traditional quake lighting system to get a stronger effect by rotating the mesh 180 degrees in editor (so that the surfaces we want lit strongest face up) then reversing the rotation when placing the model. Read the vertex normal article for details.

So for the majority of the frames you should apply an “angles” key of ‘180 y 0’ where y is the desired yaw of the model to get a model that hangs down naturally.

The exception is for the hanging sequences. These should instead be given angles of ‘0 y 90’ where y is the yaw that you desire the rope to swing along.

Bonus material

The zip file contains the gmax file for this model. This is in preparation for a future article when I explain how you can separate out animation sequences for ease of looping, adjusting, etc, and still have a single object to export. For now you might want to have a poke around and look at what the different coloured meshes are doing. You can also use this file if you need to create a cable with a very specific shape – find a line which is controlling a suitable cable mesh, adjust the shape as desired and export the model again.

The qmdl compile script is also included. Most of the script is standard importing skins and naming/grouping frames stuff, but do also note that the model is scaled 3 times from the size in gmax. It was easier to do this in script than in GMAX due to the changing position of the origin in editor.

Advertisements

4 thoughts on “Cable

  1. Hi preach

    thanks again for that effort from you, i really appreciate your work.
    One question i have, how do set another skin for the model?
    i´m using the mapobject_custom entity, which argument sets the skin?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s