
- [WJ-R]: 1980s object removal (Castlethorpe/Hanslope area)
- [XCS]: Pending
- [UkTrainSys]: v0.3.2.0 released
- [Object Library]: Preparing...
- [Website]: Fifth version of website launched

Blog and Progress Updates
May 24, 2009
openBVE v1.0.6.0, Cross-City South v1.4 Updates
Posted by admin on May 24, 2009 at 11:50 pmNew openBVE release–v1.0.6.0
A new version of openBVE is now available, version 1.0.6.0; head over to the » openBVE homepage « to download the latest stable release. One of the three most noticeable improvements in this version (the other two being time acceleration and the ability to mute sound, more below) concerns the Smooth Transparency feature, which has been dramatically improved. If you’ve enabled this option in openBVE previously, you might have noticed that while the quality of the rendered scenes was much better with Smooth transparency enabled, occasionally, unsightly fringes appeared around some transparent textures, where translucent pixels were rendered. This was problem was also more pronounced on Cross-City South v1.4 due to the frequency with which texture transparency is used in the new scenery. This issue concerning texture transparency and the z-buffer is a complex topic which I gather not all OpenGL developers adequately address, however Michelle has found a way of solving the problem, and while the performance is a little lower than with the previous implementation (especially on routes where a very high number of polygons use texture colour transparency), the visual quality is far better, as the following comparison screenshots demonstrate (along with the new X-City South v1.4 screenshots below).
On the left, we have the » ATS-Sn/P Test route « in openBVE v1.0.5.0; click the thumbnail and note the fringes around the catenary gantry texture. On the right, we have v1.0.6.0–no such issue can be observed, and the end result is superb:
|
Similarly, here we have the » Chashinai Railway «:
|
For a detailed explanation about this solution, please see michelle’s » Developer’s Blog «
![]() |
Other welcome enhancements and changes in v1.0.6.0 include:
- A time acceleration feature (Ctrl+J, switches between x1 and x5 speed);
- The ability to mute the sound (Ctrl+M — now you can listen to music via your media player while in-game, which is quite a lot of fun when used with the time acceleration feature! 🙂 );
- A consistent look is now achieved where fog and background images are concerned, regardless of viewing distance;
- And more… Please see the » changelog « on the openBVE site for details.
If you’re still using openBVE v1.0.3 or 1.0.4, then after updating to the latest release, you’ll also benefit from changes which were introduced with v1.0.5, including amongst other things, a bug fix relating to odd behaviour where unwanted roll was initially applied to the external camera view, enhanced AI driver behaviour where cruising is concerned, and additions to the Doors parameter of the .Sta command.
![]() |
Cross-City South v1.4 scenery improvements
Firstly, apologies for the lack of project updates recently… Unfortunately I’ve not done quite as much as I’d hoped to in the past month. Nevertheless, I’ve been working on updating the scenery objects for Cross-City South v1.4, and this is proceeding quite well now. It’s proving to be quite time consuming, and the bulk of the work involves replacing a fair number of the previously 2D trees and bushes with more realistic partially 3D versions, allowing the scenery to look good even when the camera is panned to the side, such as when looking out of the windows, while also enabling the camera to be moved a little further away from the train in the external view without the scenery looking unrealistic. Hedgerows have also been improved, not just the trees.
I’m currently adding pretty highly detailed vegetation just to test performance and visual quality, but once I’m finished I’ll likely perform a batch search and replace operation on all the scenery files to reduce the number of surfaces to improve framerates a little. I’m relatively happy with how the scenery is turning out, but I have to say, it’s just a little tedious; I’ll be glad when this task is over and I can get back to the animated objects!
Here are some screenshots to show the progress so far; the scenery, lighting and shading isn’t finalised yet, but the images give a general impression of the end result I want to achieve. The trees and hedges still look a little too repetetive to me–I’ll try and improve upon this if I have time… All screenshots depict the route at 1280×1024 resolution with 8x antialiasing, 16x anisotropic filtering, and with openBVE v1.0.6.0’s smooth transparency enabled. A fast graphics card will likely be needed for higher framerates with the latter feature in use, at least with openBVE 1’s renderer:
![]() ![]() ![]() |
![]() |
I’m also experimenting with mixing both 2D and 3D trees to achieve a balance between visual quality and performance; 3D trees are placed near to the lineside, while 2D trees are placed behind these, and the overall effect looks reasonable to me; I hope you agree. It should work well, provided the player doesn’t move the camera beyond the effective scenery edge boundary which the 2D tree surfaces create–openBVE is still primarily a cab view simulator, after all. Here are some examples of the scenery testing location at Longbridge:
![]() ![]() |
![]() |
I’ve also added shadows beneath the trees and OHLE masts (another feature brought in from Watford Junction to Rugby), as well as beneath hedgerows to improve the appearance of the scenery. The shadows are simply very low resolution textures, which in the interests of performance, don’t use alpha channels, just ordinary texture transparency. The low resolution of the textures provides the necessary blurring:
![]() ![]() ![]() ![]() |
![]() |
Lastly, I’m also updating the pointwork so it’ll be up to the standard of Watford Junction to Rugby:
![]() ![]() |
![]() |
openBVE Help Guide updated
Just in case anyone hasn’t read through the comments on my last blog entry or otherwise noticed, I updated my openBVE Help and Information Guide recently, to include instructions explaining how openBVE can be installed and used by Ubuntu Linux users, either via the Add/Remove option, or by installing and running the program via Wine (which allows BVE 4 plugin DLL equipped trains to be used in Linux). I update the guide regularly as well, so if you need any assistance with openBVE which isn’t covered elsewhere, please visit the updated guide for more information: openBVE Help and Information.
Incidentally, since I replaced the X-City South executable installer with the .7z archive, downloads have been just as frequent as before, and I’ve had no more requests for help with installing the route than usual (and I don’t get many requests for help usually); indeed someone who was a newcomer to train simulation kindly informed me that they’d managed to install openBVE, BVE4, and Cross-City South with help from the guides I’ve prepared. So I’m assuming that most of you are managing fine with the installation process. 🙂
Tags: Artwork, Cross-City South, openBVE, Screenshots, Site News, Trackwork
Posted in openBVE | 8 Comments »
April 25, 2009
April 19, 2009
Cross-City South 7-Zip trial
Posted by admin on April 19, 2009 at 7:55 amIn what may or may not prove to be a popular move, I’ve replaced my beloved NSIS executable installer within which the Cross-City South route was previously distributed, with a 7-Zip archive instead (and the other Cross-City add-ons have also been repackaged). I’m doing this as a trial to see how users cope with installing the route using a compressed archive manager instead of an installation program. I’m not willing to package the route using the more popular but less effective .zip format, as the resulting filesize is much larger than the .7z equivalent–the Cross-City South .zip version comes to a massive 32 MiB, while the 7-Zip archive comes in at 13.5 MiB, which is a little smaller than the installer it replaces (which figures, as both were compressed using the same LZMA compression method). All archives by default, have either the ‘Railway’ or ‘Train’ folder as the root folder within the archives, so you can always choose the same destination path when extracting the contents, and so there’s little doubt as to which folder the contents are supposed to be extracted to.
Okay, so I’ll miss using NSIS to package my add-ons as it was a very flexible installer creation tool, but more seriously, openBVE is intended as a cross-platform program, and executable (.exe) installers only work natively on Windows and not on other operating systems, which is unfair to non-Windows users wanting to use the route, or indeed those who have their add-ons installed in a non-default location. openBVE’s developer has also stated that add-ons released in installers aren’t considered to be openBVE content at all (and I can’t be happy if X-City isn’t considered to be openBVE content), so one way or another, distribution via compressed archive is the way of the future for openBVE, and I hope you’ll all be able to adjust to this change. If absolutely necessary I may reintroduce the executable installer alongside the .7z archive, but I’d prefer not to if possible.
There are no changes to the route itself (with v1.4 on it’s way, updating the old version isn’t really a good use of my time), however to prepare yourself for Cross-City South v1.4 and other openBVE add-ons in future, you can head over to the » Cross-City South download page « and try out the compressed archive installation method instead. I’ve also added new content to the » openBVE Help and Information « section of the site, which includes a couple of screenshots of what we can all look forward to with openBVE in the near future, along with step-by-step instructions to help with the downloading and installation of the Cross-City South .7z package for use with openBVE, along with recommended settings, and so-on. I’ve also slightly updated the » BVE 4 Help Section «, and you can also view an updated version of the » Cross-City South/Class 323 Tutorial « tailored for openBVE.
|
Edit: I’ve made a couple of amendments to the openBVE Help page and the Cross-City South download page, as they contained some unclear instructions and mistakes–sorry! I’ll continue to update them if necessary.
If you have problems installing the Cross-City South via the compressed archive method instead, I’d really like to hear about your installation experiences. Please feel free to add comments to this blog entry if you have any problems (no registration required, just click the ‘x Comments’ link below), or e-mail me. If there’s no feedback, I’ll assume you’re all managing just fine. 🙂
Tags: Cross-City South, openBVE, Site News
Posted in openBVE, Site News | 8 Comments »
openBVE v1.0.3.0, homepage relocation, and Train Editor
Posted by admin on April 19, 2009 at 7:50 amA new version of openBVE, v1.0.3.0, was released a few days ago; head over to the » official openBVE homepage « to download the latest stable release. Several changes have been made since v1.0.0.0, including:
- Cross-City South users will find that the 323’s door indicator and guard’s buzzer now work when the cab is entered at Redditch (and similar issues with the LU Northern Line and Tokyo Metro Ginza Line are resolved as well).
- The external views now have their last used position remembered, which is especially useful in the F2 view, for example if you want to ride inside a carriage as a passenger. The F3/F4 external view camera is positioned relative to the track rather than your train, which means the camera will stay in the position on the route where it was last used. The F4 drive-by camera position, when reset, is also intelligently placed further ahead of your train as it’s speed increases, or nearer as the speed decreases.
Tip: If you want to position the F3 camera back at your train’s location again, just press the Numpad 5 key, and similarly, do this to reposition the camera ahead of your train when in the F4 drive-by view. - A default set of Points of Interest is automatically created at station stopping points on routes which lack this openBVE feature already. Press the Numpad 7 and 1 keys to switch between these POIs.
- Users (but preferably not developers 😉 ) can now also disable the warning and error messages that appear when add-ons containing errors are loaded.
- Some BVE 1 trains perviously accelerated too slowly at high speeds, leading to reduced maximum speeds; this is now corrected.
- Various other changes have also been made, see the » Changelog « for more details.
After ongoing problems with previous hosts, the openBVE homepage has also been relocated, and now shares a home with » Trainsimcentral «. This server should provide much greater reliability. The new URL is http://openbve.trainsimcentral.co.uk.
Also, a new Train Editor tool has been released, which makes editing train.dat files suitable for openBVE trains much easier; e.g. configuring train characteristics, previewing acceleration curves, editing motor sound curves, and setting openBVE specific options. You can download the tool here: » here «.
Tags: openBVE
Posted in openBVE | No Comments »
Platform Generator utility released
Posted by admin on April 19, 2009 at 7:45 amAlan Wheeler’s new Platform Generator (Plat Gen) tool was released recently; head over to » eezypeazy.co.uk « to download this handy utility. The program creates a variety of photo-realistic customised platform segments, allowing route developers to choose the surface and side textures, create platform ramps, curved platform lengths at various radii, and more. The generated objects are placed via the .Freeobj command rather than the .Form commands. Here’s a screenshot of one of the resulting platforms at University station on the Cross-City South v1.4 route:
![]() openBVE / Cross-City South v1.4 plus 323 screenshot |
Tags: Cross-City South, openBVE, openBVE Community, Screenshots, Software
Posted in openBVE | 2 Comments »
March 24, 2009
openBVE v1.0 is here!
Posted by admin on March 24, 2009 at 12:26 amAfter 347 days of development, openBVE version 1.0 has now been released! Personally I think this is an incredible achievement–not only that openBVE has been created in the first place, but that it’s been created in such a short space of time, considering the complexity and difficulties inherent in undertaking such a project, some of which I’ve become familiar with while following the development of the program and helping to understand some aspects of BVE Trainsim’s behaviour. Congratulations michelle.
Head over to the » official openBVE homepage « to download the latest in the stable branch of openBVE releases. Whether you’re a developer or a user, if you only use BVE Trainsim at the moment, now would be a good time to enter the world of openBVE.
michelle has also added some additional documentation to help you find your way around the program, which you can read here: » Using openBVE «. For BVE Trainsim, I found myself having to create help pages to guide newcomers through the installation and use of BVE, so hopefully I won’t need to go to such lengths any more, as these are very comprehensive, step-by-step instructions. However, if any of you still have problems installing openBVE, or using the Cross-City South with the program, let me know and I’ll see if I can assist. Depending on feedback over the coming weeks, I’ll see if I still need to work on the “openBVE Help” section of this site with regard to add-on installation, although I’ll certainly update my Driver’s Guide and Class 323 Tutorial soon.
Tags: openBVE, Screenshots
Posted in openBVE | No Comments »
openBVE v1.0: Are we nearing the end of the journey, or has it only just begun?
Posted by admin on March 24, 2009 at 12:24 amWell, that’s partly up to us. michelle has published an in depth article in which she sets out her vision for how openBVE could evolve in future, along with various ideas and plans which could pave the way to v2.0, which you can read here: » The potential future of openBVE «. But without our input, discussion about future direction, or sufficient interest expressed in these ideas, some of these developments may never happen… It’s possible to see what an incredibly flexible solution could be created in future, allowing for far more than is currently possible if an extensible, modular design and plugin based architecture is developed; e.g. detailed simulation of any safety system without having to rely on built-in approximations, plugins which can load different file formats, or customisable physics plugins allowing better support for more diverse applications such as maglev or even bus simulation, and much more, while still supporting legacy BVE add-ons.
To summarise, openBVE version 2 could (and remember this is all speculative at the moment) bring some much sought after functionality, such as true support for passing trains, parallel traffic and so-on, enabled by having more than one functional track (although this wouldn’t be a network of tracks which can be switched to and from at runtime, at this stage–this is something for the distant dream of version 3). Driving back and forth along a track could be better than in v1.0 as signalling could be functional in the reverse direction as well. 3D cabs with interactive controls, perhaps manipulated via the mouse, could be implemented. Weather plays an enormously important role on the real railway, and version 2 could bring us rain, snow and thunder, without having to “cheat” with pre-defined sound samples or creating scenery objects to create such effects, as I’ve done thus far. Wind simulation could result in altered performance characteristics of trains as well, making driving more challenging. Better Sun and Moon simulation could be provided as well, with realtime day/night transitions occuring, showing off openBVE’s illuminated object capabilities, especially at twilight. Then there are improvements to how add-ons are obtained and managed; currently this is messy where BVE is concerned and intimidating to the beginner, and all this could change with version 2, where a directory of add-ons and download locations could be referenced from within openBVE, with add-ons perhaps installed automatically via the user interface. A Level of Detail (LOD) system could be implemented, which might be enormously helpful on more geometrically complex routes, like Watford Junction to Rugby, or with more detailed exterior car objects perhaps.
Sounds fantastic doesn’t it? However, no feature is guaranteed to be implemented; indeed openBVE version 2 itself is not guaranteed to be developed–it depends on our level of interest, and our willingness to help.
This vision of the future is only likely to materialise with our support, so if we want any of this to happen, we–developers or users–need to make sure that we make known our interest in openBVE’s future direction and talk about it, express our intent to use these new features if we want them, and then experiment with new functionality as it emerges; in other words, take part in the project. This way, michelle knows what the community actually wants, she doesn’t waste her time implementing functionality which isn’t going to be used, and problems and pitfalls can be discussed or resolved before too much work is done. If you have any thoughts about this path to version 2, then you can post your thoughts in » this forum thread «; don’t post a wishlist though, consider the options already outlined in the article, and decide which are important and worth pursuing, and then, these can be prioritised and discussed. I’ll add my own thoughts later as well. Drop any comments on this blog too if you like, as I’m also interested in what you think is important or worthwhile.
Lets not miss out on a potentially wonderful opportunity here–we have someone in our midst who not only has a vision which could benefit us all, but also the ability and willingness to implement that vision, and it would be highly regrettable if our community lost this opportunity while it’s available to us. My concern is that if we don’t look to the future now, we may end up settling for what we’ve got in openBVE v1.0 (or even BVE 5 when it’s released), and then in a few years we’ll wish we had something better, only to find that it’s too late and michelle has moved on to other fields where I’ve no doubt her talents would be appreciated, or we may find that mackoy no longer works on BVE Trainsim either, in which case we’ll wish we could have done more to keep michelle motivated. Alternatively, we can actively create and shape the future of our hobby together, and demonstrate that it’s worth michelle’s while in continuing the project onwards towards version 2, or even beyond.
Of course I know that there aren’t many of us developers around, but surely between the relatively few of us (along with an increasingly enthusiastic user base), we can contribute enough to enable openBVE development to continue and evolve into a free trainsim we could only have dreamt of a few years ago, and as the program gains functionality, hopefully pick up new developers and programmers along the way?
Tags: openBVE
Posted in openBVE | 8 Comments »
Cross-City South v1.4 Progress
Posted by admin on March 24, 2009 at 12:22 amI am sorry for the lack of updates during the past few weeks. This is partly because more of my time has been taken up by non-railsim related stuff during the past month, but also because I’ve completed most of the experimentation as far as XCS v1.4’s animated objects are concerned now (I have to stop somewhere otherwise I’ll never finish it), and what remains to be done isn’t especially newsworthy in comparison–mainly adding what I’ve already shown throughout the route. I also can’t imagine that any of you would be particularly interested in reading about that sub-folder I renamed two days ago, those trees I added to a set of ground objects, or that exciting search through my archives to find a photo of a class 323’s seating?! However, the project is going well, and I should have some more news soon.
Tags: Cross-City South, openBVE
Posted in openBVE | 4 Comments »
February 27, 2009
Updated Functions
Posted by admin on February 27, 2009 at 10:00 pmThanks to a certain mathematically adept someone, I’ve now updated some of the code examples in my last blog entry, namely the function used for wheelset rotation which is now better in terms of performance and ease of use, and also the code which “plugs” the doors into the bodyside when they’re closed, making the visual effect better as the doors don’t “jump” into position any more. The updated functions are now highlighted in yellow in my 26th February entry…
Tags: Animated Objects, Functions, openBVE
Posted in openBVE | No Comments »
February 26, 2009
Animated Exterior Car Objects
Posted by admin on February 26, 2009 at 10:00 pmAs most of you will likely know already, » openBVE « now enables developers to use animated exterior car objects. I was pleasantly surprised by all the positive feedback and comments regarding my last video which I uploaded to YouTube (thank you!), but one criticism which was pointed out several times was the disparity between the quality of the scenic visuals, and the rather simplistic objects used to represent the class 323 EMU–the objects were fine for BVE’s passing trains, but less so when you can move the camera up close and look at the details, or lack thereof. I didn’t think it was worth spending much time on this latter aspect until animation could be applied to the exterior car objects, but now this is possible, I’ve been working on some far better 3D models for the class 323. I had hoped to get this task finished sooner, but it’s taken longer than I originally expected unfortunately–the main difficulty was getting the rounded cab looking right, and texturing it correctly. However, I’m now happy with the appearance, and so I present the work-in-progress fully 3D exterior car objects for openBVE and Cross-City South v1.4. Incidentally, as with all my openBVE/BVE objects, these models are entirely hand coded, with no “help” from 3D modelling software.
Currently the objects are rather more complex than I originally intended (so far, the entire three coach EMU contains around 8200 vertices/4900 faces), and there is a performance penalty that comes with using them; on a fairly typical BVE route, framerates should be okay, but when paired with a very highly detailed and intensively animated route such as Cross-City South v1.4, a fast PC will likely be required to enjoy both extensively detailed animated scenery and detailed external car objects with reasonable framerates. What I intend to do, for those of you with slower hardware, is release alternative versions of the exterior car objects with lower polygon counts, and because of the way I’ve created the textures, the end result should still look good despite less complex geometry. Even these lower detail versions will be rather better than the previous objects though. So ultimately, if framerates are a problem, you can simply choose either richly detailed scenery, or richly detailed train objects, depending on which is more important to you.
Currently, the models include the following standard animated features:
- Rotating wheelsets including wheelslip effects (with provision for animated suspension, and bogie rotation should such functionality be possible in future)
- Bi-parting, sliding plug doors (some issues with door open/close sound synchronisation–see below)
- Moving window reflections (twin-layered with transparency, to create a parallax effect)
The models also include the following animated features linked to plugin (UKMUt.dll) variables:
- Windscreen wipers (left/right sweep, plus arc motion; the wipers aren’t perfect–see below)
- Head and tail lights (both ends of train)
- Interior lights (on or off via pantograph up/down button)
- LED destination display with flicker (on or off via pantograph up/down button)
- Working pantograph (all illuminated features also extinguish when pantograph is lowered)
I’ve also prepared another video to show these features. Please note, the 3D objects aren’t finished yet; some textures need updating, and I’ve yet to add interior fittings. Developers might want to continue reading on, as I’ll explain how some of these animations have been implemented, and share some sample code from the .ANIMATED objects.
![]() Video: Demonstration of class 323 animated exterior car objects (work-in-progress) » Link to YouTube page (HD – best quality) « |
I also thought you might like to see a high resolution image of Cross-City South v1.4 and the new high detail class 323; in this screenshot, I’m running openBVE fullscreen at a resolution of 1280×1024, with 8x anti-aliasing and 16x anisotropic filtering enabled (on a Radeon HD 2600 Pro graphics card). Bilinear interpolation was enabled in openBVE’s settings, with the Transparency mode set to Sharp. I was getting around 16-19 fps at the time; the framerates in the next version of openBVE will hopefully be a little higher due to performance optimisations where animated object normals are concerned, although this gain may be offset by the addition of more animated scenery objects to the route:
![]() openBVE / Cross-City South v1.4 plus 323 screenshot–click to enlarge |
![]() Rotating Wheelsets ![]() ![]() |
The first things I tried to animate were the wheelsets. Initially I had difficulty getting this to work as anticipated, and observed unexpected results while using the Speedometer variable, i.e. the resulting wheelset rotation appeared as though it were based upon acceleration rate rather than an actual velocity value (and » Ron « found the same when he first tried to animate wheelsets, it would seem). I usually like to try and figure out solutions to such problems myself, but sadly I’m not the reincarnation of Pierre de Fermat, and as such, my mathematical knowledge was insufficient. Fortunately, a way forward could be found over at the » openBVE Japanese « site, which includes some helpful material covering animated objects and functions. The following function can be used to rotate each wheelset:
Incidentally, 2.765 is the circumference of the wheel. The above formula works perfectly, but initially I wondered if it was more complicated than it needed to be, so I attempted to find a more simple alternative, and somehow arrived at the following formula, where the value 0.05949986086344 results from (pi / 0.88) / 60, where 0.88 is the diameter of the wheel:

Initially this seemed to work well, but on closer examination, the end result wasn’t as good as the more complex formula because the rate of rotation varies with the framerate, and I observed no difference in performance between the two anyway.
Update
Thanks to a certain mathematically adept someone, I now have a new formula which is better in terms of performance and ease of use:
![]() |
![]() |
![]() Animated Doors ![]() ![]() |
The bi-parting sliding plug doors are comprised of a pair of 3D door objects, which slide forwards and backwards via a translation along the Z axis, with values supplied via the left/rightdoors[i] variables, e.g:
[Object]
Position = 0.002, 0, -5.552
States = Class323_Door_2_R_Dark.csv, Class323_Door_2_R.csv
TranslateZFunction = rightdoors[0] + 0.864
TranslateXFunction = min[power[10 * (rightdoors[0] – 0.1), 3] + 1, 1] * 0.05
StateFunction = pluginstate[31]
[Object]
Position = 0.002, 0, -6.417
States = Class323_Door_2a_R_Dark.csv, Class323_Door_2a_R.csv
TranslateZFunction = -rightdoors[0] + 0.864
TranslateXFunction = min[power[10 * (rightdoors[0] – 0.1), 3] + 1, 1] * 0.05
StateFunction = pluginstate[31]
Left door animation:
[Object]
Position = -0.002, 0, -5.552
States = Class323_Door_2_L_Dark.csv, Class323_Door_2_L.csv
TranslateZFunction = leftdoors[0] + 0.864
TranslateXFunction = -min[power[10 * (leftdoors[0] – 0.1), 3] + 1, 1] * 0.05
StateFunction = pluginstate[31]
[Object]
Position = -0.002, 0, -6.417
States = Class323_Door_2a_L_Dark.csv, Class323_Door_2a_L.csv
TranslateZFunction = -leftdoors[0] + 0.864
TranslateXFunction = -min[power[10 * (leftdoors[0] – 0.1), 3] + 1, 1] * 0.05
StateFunction = pluginstate[31]
The StateFunction command is there to switch between illuminated and non-illuminated versions of the door objects, and pluginstate[31] is equivalent to the ats31 subject in the class 323’s panel2.cfg file (when used with Simon Gathercole’s UKMUt.dll), i.e. the Line Light indicator (so the lights appear to go out when the pantograph is lowered). The objects are also translated along the X axis so they “plug” into the bodyside when fully closed. Unfortunately the door open and close sounds aren’t fully synchronised with the door motion; with UK trains, warning beeps are heard before the doors actually start to close, but the beeps are contained within the door closing audio file, and of course the visible doors start to close as soon as the beeping starts. The duration of the door opening motion is also shorter than the duration of the door opening audio files. I haven’t tried having door animation controlled via plugin variables yet; when I have time I’ll look into this further.
![]() Animated Window Reflections ![]() ![]() |
The window reflections are made from two semi-transparent surfaces, which have texture shifting functions applied, based upon the current speed of the train, e.g:
[Object]
Position = 0, 0, 0
States = ..\Class323_DMSO_1_WindowReflections.csv
TextureShiftXFunction = value + speed * 0.001
[Object]
Position = 0, 0, 0
States = ..\Class323_DMSO_1_WindowReflections_bg.csv
TextureShiftXFunction = value + speed * 0.0001
There’s a foreground reflection texture with transparency, showing near-track bushes, and there’s also a background reflection texture, showing a low resolution version of the backdrop (ground and sky) texture, and this surface’s texture is shifted more slowly than the foreground texture, creating a rather nice parallax effect when the train is in motion. The overall effect looks rather good in my opinion, but of course, if the reflection textures depict a Summer scene, but the train is used on a Winter route with snow, it looks a little silly…
![]() Interior Illumination ![]() ![]() |
Interior lighting strips, along with interior fittings and additional semi-transparent yellow surfaces to lighten the windows when viewed from outside at night (allowing adequate night-lighting effects while still being able to have daytime window reflections), are displayed when the pantograph is raised, and swapped for non-emissive versions when the pan is lowered, so it’s possible to turn the carriage lights on and off. When the pantograph is lowered, all exterior lights are also state-changed or translated so they appear to extinguish, and won’t illuminate until the pantograph is raised again. This is achieved using if[pluginstate[31] ... ] commands, as demonstrated in the next section.
![]() Animated Pantograph ![]() ![]() |
The pantograph itself can be visibly raised and lowered, with the head having a Y axis translation applied, and the upper and lower arms having X axis rotation, along with Y and Z axis translation applied. The pantograph animation is conditional upon the state of the value of plugin variable 31, or the ats31 subject in the class 323’s panel2.cfg. The code I’ve written which enables this is as follows (since updated on the 5th July 2009, thanks to a post by michelle herself):
[Object]
Position = 0, 4.24, 9.071
States = ..\Pantograph_BWHS_Head.csv
TranslateYFunction = if[pluginstate[31] == 0, if[value > -0.97, value – delta * 0.49, -0.97], if[value < 0, value + delta * 0.49, 0]]
[Object]
Position = 0, 4.24, 9.071
States = ..\Pantograph_BWHS_UpperArm.csv
TranslateYFunction = if[pluginstate[31] == 0, if[value > -0.45, value – delta * 0.225, -0.45], if[value < 0, value + delta * 0.225, 0]]
RotateXFunction = if[pluginstate[31] == 0, if[value > -0.29, value – delta * 0.145, -0.29], if[value < 0, value + delta * 0.145, 0]]
TranslateZFunction = if[pluginstate[31] == 0, if[value < 0.06, value + delta * 0.03, 0.06], if[value > 0, value – delta * 0.03, 0]]
[Object]
Position = 0, 4.24, 9.071
States = ..\Pantograph_BWHS_LowerArm.csv
TranslateYFunction = if[pluginstate[31] == 0, if[value > -0.45, value – delta * 0.225, -0.45], if[value < 0, value + delta * 0.225, 0]]
RotateXFunction = if[pluginstate[31] == 0, if[value < 0.27, value + delta * 0.135, 0.27], if[value > 0, value – delta * 0.135, 0]]
TranslateZFunction = if[pluginstate[31] == 0, if[value < 0.06, value + delta * 0.03, 0.06], if[value > 0, value – delta * 0.03, 0]]
![]() Animated Wipers and Working Headlights ![]() ![]() |
The windscreen wipers aren’t as good as I’d like them to be yet; when the if[pluginstate[i] ... ] conditions are satisfied and the truevalue formulae are executed, the wipers can jump to a position mid-sweep rather than starting to move from their currently held position. The same problem can happen when switching the wipers off as well, although the way I’ve implemented it, the wipers will stop in whatever position they are in when the wipers are turned off. More work needed here… Each wiper is comprised of two arms, and a wiper blade. The code so far, is as follows:
[Object]
States = ..\Class323_DMSO_Wiper_L_1.csv
Position = -0.56, 2.27, 0
RotateZFunction = if[pluginstate[198] > 0, power[1 – abs[cos[time]], 0.5] * 1.3, value]
[Object]
States = ..\Class323_DMSO_Wiper_L_1a.csv
Position = -0.5, 2.27, 0
RotateZFunction = if[pluginstate[198] > 0, power[1 – abs[cos[time]], 0.5] * 1.3, value]
[Object]
States = ..\Class323_DMSO_Wiper_L_1b.csv
Position = -0.55, 2.28, 0
TranslateXFunction = if[pluginstate[198] > 0, -power[1 – abs[cos[time]], 0.5] * 0.73, value]
TranslateYFunction = if[pluginstate[198] > 0, power[sin[time * 2], 2] * 0.13, value]
The last TranslateYFunction command moves the wiper blade up and down at the correct speed, which when combined with the X axis translation, creates the overall effect of an arc movement rather than a simple left-right motion.
![]() |
The head (and tail) lights are linked to the proving lights in the cab (the ats20 and ats21 subjects in the class 323’s panel2.cfg). Each headlight configuration has it’s own csv object. The headlights will only be illuminated when the pantograph is also raised (dependent on the state of plugin variable 31, or the ats31 subject in panel2.cfg). When the tail lights at one end of the train are on, they automatically turn off at the other end of the train. For the rear of the train, the headlights can only illuminate if the tail lights are also off. The code which enables all of this is as follows (please note, I’m presenting two alternative ways of implementing the lights on the leading vehicle, the reason why can be found below):
Class323_DMSO_1.animated (lead vehicle) OPTION 1
[Object]
States = ..\null.csv, ..\Class323_Headlights_0.csv, ..\Class323_Headlights_1.csv, ..\Class323_Headlights_2.csv
Position = 0, 0, 0
RotateYFunction = 3.1416
StateFunction = if[pluginstate[31] == 1, pluginstate[20], 0]
[Object]
States = ..\null.csv, ..\Class323_Taillights_1.csv
Position = 0, 0, 0
RotateYFunction = 3.1416
StateFunction = if[pluginstate[31] == 1, pluginstate[21], 0]
Class323_DMSO_1.animated (lead vehicle) OPTION 2
[Object]
States = ..\Class323_Headlights_0.csv
Position = 0, 0, 0
RotateYFunction = 3.1416
TranslateYFunction = if[pluginstate[31] == 1, if[pluginstate[20] == 1, 0, -600], -600]
[Object]
States = ..\Class323_Headlights_1.csv
Position = 0, 0, 0
RotateYFunction = 3.1416
TranslateYFunction = if[pluginstate[31] == 1, if[pluginstate[20] == 2, 0, -600], -600]
[Object]
States = ..\Class323_Headlights_2.csv
Position = 0, 0, 0
RotateYFunction = 3.1416
TranslateYFunction = if[pluginstate[31] == 1, if[pluginstate[20] == 3, 0, -600], -600]
[Object] States = ..\Class323_Taillights_1.csv
Position = 0, 0, 0
RotateYFunction = 3.1416
TranslateYFunction = if[pluginstate[31] == 1, if[pluginstate[21] == 1, 0, -600], -600]
Class323_DMSO_3.animated (rear vehicle)
[Object]
States = ..\null.csv, ..\Class323_Headlights_0.csv, ..\Class323_Headlights_1.csv, ..\Class323_Headlights_2.csv
Position = 0, 0, 0
StateFunction = if[pluginstate[31] == 1, if[pluginstate[21] == 1, pluginstate[20], 0], 0]
[Object]
States = ..\Class323_Taillights_1.csv, ..\null.csv
Position = 0, 0, 0
StateFunction = if[pluginstate[31] == 1, if[pluginstate[31] == 1, pluginstate[21], 0], 1]
In Option 1 above, the lead vehicle’s headlights are changed using StateFunction commands alone. This method works fine, but the first time each state is changed to, you’ll see the object’s texture isn’t loaded until a fraction of a second after the object is displayed, leading to a flash of colour which is a little distracting. Using Option 2 gets around this issue however, because the headlight objects and textures are always loaded upon swtiching to an external view, and are displayed by translating the relevant object along the Y axis instead, conditional upon the value read via the pluginstate[i] variable. As these textures are always loaded in an external view, StateFunction commands alone can be used in the rear vehicle.
Incidentally, the RotateYFunction = 3.1416 lines simply rotate the relevant objects 180° around the Y axis (the value is in radians, rather than degrees).
What I need to do next, is add interior fittings such as seats, luggage racks, LCD TV screens, and so-on. I might make some more progress with the route itself instead though, as to be honest I could do with a break from modelling the minutiae of train objects for a while.
Tags: Animated Objects, Artwork, Cross-City South, Functions, openBVE, Screenshots, Videos
Posted in openBVE | 58 Comments »