tank track vertex shader

This is a discussion on tank track vertex shader within the Game Programming forums, part of the General Programming Boards category; hey all, Has anyone had any success procedurally animating tank tracks with a vertex shader? The animator i'm working with ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    50

    tank track vertex shader

    hey all,

    Has anyone had any success procedurally animating tank tracks with a vertex shader?

    The animator i'm working with is another hobbyist - he dosn't normally do much animation (more involved in modelling/skinning) and he tells me that tank tracks are not the easiest thing to animate in 3d design packages. I want to help him out if I can.

    I thought maybe i could try to use an equation for an ellipse and try to doctor it somehow to make it a bit more boxy, but i can't really see how to make it a 'boxy' ellipse without the shader really slowing down.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Use a stencil buffer. You can overlay images on top of the ground texture. However stencil buffers are very expensive and if the z depth is not done correctly your tank tracks will flicker on and off with the ground texture.

  3. #3
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    i wouldn't use stencil buffer for this unless there was no better method. you can do texture animations so that it looks like the treads are moving when the tank is moving.

    http://www.gametutorials.com/Tutoria...OpenGL_Pg2.htm

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Why not just use decals? That seems like it'd work pretty good. Whenever you draw the decals just turn off depth testing so it'll always render over the ground.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  5. #5
    Registered User
    Join Date
    Oct 2003
    Posts
    50
    Thanks guys. I'll give all 3 a go and maybe come back with demos for them (assuming i can get them working properly). People can compare and contrast then.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fluid Mechanics program help
    By Hajjo in forum C Programming
    Replies: 15
    Last Post: 03-10-2008, 03:09 PM
  2. Simple (?) problem rendering a vertex buffer
    By Dark_Phoenix in forum Game Programming
    Replies: 4
    Last Post: 08-11-2007, 08:32 PM
  3. error help making no sense
    By tunerfreak in forum C++ Programming
    Replies: 5
    Last Post: 04-17-2007, 08:55 PM
  4. Replies: 6
    Last Post: 11-12-2005, 11:57 AM
  5. Pixel Shaders.
    By Cheeze-It in forum Game Programming
    Replies: 1
    Last Post: 05-21-2002, 02:16 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21