Tuesday 16 June 2009

Animated Level Crossing

I was thinking recently about how to create an animating level crossing. Currently the codebase will need extending to get the crossing barriers to activate with an approaching train.

Here is my dirty hack (solution).



This is an entirely art based solution using LOD functionality. As we all know, the LOD code will swap geometry depending on distance to camera. So I've created a level crossing, where the gates are closed in the nearest LOD and open in the distant LOD. Currently, the gates pop between the open and closed positions, but many more LODs could be inserted between these two current LODs to make the gates move more smoothly.

Thinking along these lines, there could be many other uses for the LOD functionality:

- Static people, who start waving as the train or camera gets near
- Grazing cows, who look up as the camera or train gets near

I'm sure there are other uses than simply using LODs to swap different resolutions of geometry.

2 comments:

  1. You could use LOD to show a car inching towards a crossing and then stopping.

    ReplyDelete
  2. Actually, Signalling in RailWorks already has functions purely related to trigging when trains approach and pass > OnConsistPass

    It is entirely down to being able to stop road traffic in conjunction with the level crossing that they have not been officially included yet.

    The gates themselves could simply be setup the same as semaphore signalling and just not include any of the signal specific functions like occupation.

    ReplyDelete