Elvas Tower: Bell animation - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 5 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

Bell animation Rate Topic: -----

#21 User is offline   mrmosky 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 648
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 21 May 2019 - 11:39 PM

View PostErickC, on 21 May 2019 - 03:35 PM, said:

Anything between the air valve and the clacker itself can affect the time between strokes, so the rate at which a bell rings will vary greatly - and it's often uneven. What you're saying only really applies to steam locomotives, where the entire bell moved.





This animation that Carlo has added only applies to locomotives where the entire bell moves, doesn't it?

For any other bell, like the ones where the clacker only moves, I would doubt that an animation is needed, since the clacker movement will be too small to matter.

These type of bells will be able to have any chosen ring rate required, since that will be controlled by the sound file and not an animation. Or am I wrong?

Geoff

#22 User is offline   jared2982 

  • Superintendant
  • Group: Status: First Class
  • Posts: 1,187
  • Joined: 01-January 10
  • Gender:Male
  • Location:Louisiana
  • Simulator:MSTS, TS2017, OR
  • Country:

Posted 22 May 2019 - 06:42 AM

Nothing prevents the animation of the clapper in other bells if the clacker is appropriately named. Som engines, especially those with bells mounted on the front of the firebox, this animation would be noticeable.

#23 User is offline   wacampbell 

  • Member since Nov. 2003
  • Group: Fan: Traction Nuts
  • Posts: 2,345
  • Joined: 22-November 03
  • Gender:Male
  • Location:British Columbia, Canada
  • Country:

Posted 22 May 2019 - 07:13 AM

These sorts of animations add a lot of realism to our models. One day we will want brake linkages to animate, and reverser linkages on steam locos and there are an endless number of possibilities.

Rather than create an endless number of these reserved names with special canned animation behavior, I had in mind originally to use a loadable .DLL for a locomotive or wagon to override the default MSTS behavior. A .wag or .eng file could specify to load a .dll which would contain custom functionality. In fact I envisioned such a .dll to override even the default physics behavior, keyboard bindings etc. Its very hard to make a general purpose physics model that can be configured for every type of locomotive made. Eventually the advanced builder will want to customize the code to better suit his prototype. Its the same for animated parts, cab control bindings to locomotive behaviors etc.

The .dll would be a simple c# ( or other .net language ) script, JIT compiled by the OR loader thread. It overrides the MSTSWagon or MSTSEngine class providing new functionality. I am not sure of remnants of this are still present in the source code. I know at one time I had a sample locomotive with a custom engine .dll that animated the bell. But I think its a good direction to go.


Wayne

#24 User is offline   ErickC 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,001
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 22 May 2019 - 01:33 PM

The only problem I can see with that is the fact that not a lot of us content developers are particularly fluent in c#, so most of us would need to have other people build the modules for us. That's why I suggested maybe basing some kind of rudimentary scripting off the SMS code, because most of us understand that. The code would specify the name, the triggers, whether it plays one shot or loops, and so on.

#25 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,998
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 23 May 2019 - 12:35 AM

Every solution has advantages and disadvantages, and it's difficult to determine what's best.
C# scripts are of course the most powerful solution. C# scripts may already be used in OR for train control systems and brake control, however as far as I know only gpz in Hungary and Serana in France have developed scripts for their national trains. ErickC's concern about few content developers having the needed programming knowledge is therefore a justified one. This does not mean that a support for further scripting has not to be made available; however only few people will make use of it.
I think also that for some general functionality it makes sense to have a built-in solution, and the bell is one of them. Another could be ventilation, but implementing it requires also intervention in the loco physics if one does not want to do only eye (and ear) candy.
Generating intermediate solutions like a simple language is also a solution, but it requires significant programming effort and could probably not become general enough.
Re Jared's request to make available the possibility of setting the bell oscillation frequency in the .eng file, I see its rationale, but from an architectural point of view I don't like that parameter in the .eng file; therefore I'd prefer to read a word of James about this. Implementing it would be simple, because the parameter already exists in the code, where it is hardcoded; when the parameter in the .eng file would be absent, a default value would apply. Adding the management of .eng parameter can also be developed in a second phase.

#26 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 23 May 2019 - 05:16 AM

Hi Folks,

Well - putting this to good use - rigged up one of my models last night - won't be able to test until the weekend...

Thanks Carlo...

Regards,
Scott

#27 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,998
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 24 May 2019 - 07:19 AM

One way to at least partially meet Jared's concern could be to modify the code so as to play 32 instead of 8 animation steps per second. This would allow for a finer graduation of oscillations per second, and would allow also for faster oscillations if desired. Comments?

#28 User is offline   mrmosky 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 648
  • Joined: 02-October 16
  • Gender:Male
  • Location:Chasetown
  • Simulator:Openrails
  • Country:

Posted 24 May 2019 - 08:53 AM

If a swinging period of 2 seconds is wanted (which is typical for steam engine with a swinging bell), then the bell would need to have 64 animation steps. This is not practical, I think.

Geoff

#29 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 24 May 2019 - 09:20 AM

Hi Folks,

Would that mean I'd have to create 32 or 64 key frames per animation in my modeling software - hmm - yeah - I'm at 16 now - I wouldn't be too keen on increasing that - especially for something as simple as a bell swing... I haven't been able to test this feature yet - so my feedback is of limited worth...

Regards,
Scott

#30 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,998
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 24 May 2019 - 10:23 AM

You don't need to create 64 animation steps. Geoff, I took your .s file, multiplied by 4 the first parameter of the various linear_key and tcb_key lines, and the bell worked as before.

  • 5 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users