BVEStation

Author Topic: Changeable Scrolling flipdots and LCDs? Yup!  (Read 4403 times)

Offline [CT1660]

  • Dispatcher
  • ****
  • Posts: 575
  • Gender: Male
  • openBVE Developer, OMSI Repainter & Engine Modder
    • View Profile
    • Enter The Lair
Changeable Scrolling flipdots and LCDs? Yup!
« on: October 05, 2012, 06:24:45 pm »
Scrolling Flipdots Possible on OpenBVE? YES!

OpenBVE: R46 animated changable LCD signs!

After playing with my LCD/LED sign code that i implemented on the R46, i have managed to create working scrolling flipdots...that you can also change! (though the transition from each destination object is still not possible due to openBVE's limitations)

This uses ONE object, and relies on textureshift commands, same as the LCD/LED sign code, as opposed to several objects. That means each sign is one long texture with all the readings of that specific sign (for example in this case made it say LEFFERTS BLVD - SHUTTLE)

How it works:

Texture:


Object Coding:
Code: [Select]
;R44-R46 LCD Side Signs

;Interior Left


[MeshBuilder]

Vertex -1.304, 2.824, 5.622

Vertex -1.287, 3.014, 4.376

Vertex -1.304, 2.824, 4.376

Vertex -1.287, 3.014, 5.622

Face2 0, 2, 1, 3

[Texture]

Load AFlipdot.png

Coordinates 0, 1.0, 0.0079

Coordinates 1, 0.0, 0.00

Coordinates 2, 0.0, 0.0079

Coordinates 3, 1.0, 0.00
Transparent 255, 255, 255

;Interior Right



[MeshBuilder]

Vertex 1.281, 3.011, -5.302

Vertex 1.298, 2.821, -6.548

Vertex 1.281, 3.011, -6.548

Vertex 1.298, 2.821, -5.302

Face2 0, 2, 1, 3

[Texture]

Load AFlipdot.png

Coordinates 0, 0.0, 0.00

Coordinates 1, 0.999, 0.0079

Coordinates 2, 1.0, 0.00

Coordinates 3, 0.001, 0.0079
Transparent 255, 255, 255

;Exterior Left


[MeshBuilder]

Vertex 1.412, 2.76, -5.313

Vertex 1.392, 2.979, -5.313

Vertex 1.412, 2.76, -6.386

Vertex 1.392, 2.979, -6.386

Face2 1, 3, 2, 0

[Texture]

Load AFlipdot.png

Coordinates 0, 1.0, 0.0079

Coordinates 1, 1.0, 0.0

Coordinates 2, -0.0, 0.0079

Coordinates 3, -0.0, 0.0
Transparent 255, 255, 255

;Exterior Right



[MeshBuilder]

Vertex -1.397, 2.974, 5.486

Vertex -1.417, 2.755, 5.486

Vertex -1.397, 2.974, 4.413

Vertex -1.417, 2.755, 4.413

Face2 1, 3, 2, 0

[Texture]

Load AFlipdot.png

Coordinates 0, 0.0, -0.0

Coordinates 1, 0.0, 0.0079

Coordinates 2, 1.0, -0.0

Coordinates 3, 1.0, 0.0079
Transparent 255, 255, 255

And the code in the .animated file:

Code: [Select]
[object]
Position = 0, 0, 0
states = ...\cars\LCD\A flipdot.b3d
Statefunction = Mod[value+delta*pluginstate[99], 1]
TextureShiftYFunction = 0.015873 * floor[mod[Time * 15.999, 64]]

for changeable LCD's it works the same way, except you alter the timing and framerate and the quantity to shift:

here, i'm using 4 readings

texture:


b3d file:
Code: [Select]
;R44-R46 LCD Side Signs

;Interior Left


[MeshBuilder]

Vertex -1.304, 2.824, 5.622

Vertex -1.287, 3.014, 4.376

Vertex -1.304, 2.824, 4.376

Vertex -1.287, 3.014, 5.622

Face2 0, 2, 1, 3

[Texture]

Load afarrock.png

Coordinates 0, 1.0, 0.249

Coordinates 1, 0.0, 0.00

Coordinates 2, 0.0, 0.249

Coordinates 3, 1.0, 0.00
Transparent 255, 255, 255

;Interior Right



[MeshBuilder]

Vertex 1.281, 3.011, -5.302

Vertex 1.298, 2.821, -6.548

Vertex 1.281, 3.011, -6.548

Vertex 1.298, 2.821, -5.302

Face2 0, 2, 1, 3

[Texture]

Load afarrock.png

Coordinates 0, 0.0, 0.00

Coordinates 1, 0.999, 0.249

Coordinates 2, 1.0, 0.00

Coordinates 3, 0.001, 0.249
Transparent 255, 255, 255

;Exterior Left


[MeshBuilder]

Vertex 1.412, 2.76, -5.313

Vertex 1.392, 2.979, -5.313

Vertex 1.412, 2.76, -6.386

Vertex 1.392, 2.979, -6.386

Face2 1, 3, 2, 0

[Texture]

Load Afarrock.png

Coordinates 0, 1.0, 0.249

Coordinates 1, 1.0, 0.0

Coordinates 2, -0.0, 0.249

Coordinates 3, -0.0, 0.0
Transparent 255, 255, 255

;Exterior Right



[MeshBuilder]

Vertex -1.397, 2.974, 5.486

Vertex -1.417, 2.755, 5.486

Vertex -1.397, 2.974, 4.413

Vertex -1.417, 2.755, 4.413

Face2 1, 3, 2, 0

[Texture]

Load Afarrock.png

Coordinates 0, 0.0, -0.0

Coordinates 1, 0.0, 0.249

Coordinates 2, 1.0, -0.0

Coordinates 3, 1.0, 0.249
Transparent 255, 255, 255




.animated file:

Code: [Select]
[object]
Position = 0, 0, 0
states = ...\cars\LCD\A207.b3d, ...\cars\LCD\ALef.b3d, ...\cars\LCD\AFarRock.b3d, ...\cars\LCD\BBr.b3d,  ...\cars\LCD\B145.b3d,  ...\cars\LCD\BBed.b3d, ...\cars\LCD\CLefferts.b3d, ...\cars\LCD\CEuclid.b3d, ...\cars\LCD\C168.b3d, ...\cars\LCD\D205.b3d, ...\cars\LCD\DCI.b3d, ...\cars\LCD\EUnion.b3d, ...\cars\LCD\E179.b3d, ...\cars\LCD\EJC.b3d, ...\cars\LCD\EWTC.b3d, ...\cars\LCD\EFR.b3d, ...\cars\LCD\F179.b3d, ...\cars\LCD\FEuclid.b3d, ...\cars\LCD\FCIEXP.b3d , ...\cars\LCD\FCILCL.b3d, ...\cars\LCD\GLIC.b3d, ...\cars\LCD\GS9.b3d, ...\cars\LCD\GChurch.b3d, ...\cars\LCD\G18.b3d, ...\cars\LCD\HEuclid.b3d, ...\cars\LCD\HBroad.b3d, ...\cars\LCD\HRockpk.b3d, ...\cars\LCD\JJC.b3d, ...\cars\LCD\JCham.b3d, ...\cars\LCD\JBroad.b3d, ...\cars\LCD\K168.b3d, ...\cars\LCD\KWTC.b3d, ...\cars\LCD\L8AV.b3d, ...\cars\LCD\LCan.b3d, ...\cars\LCD\MMetro.b3d, ...\cars\LCD\MCham.b3d, ...\cars\LCD\MBay.b3d, ...\cars\LCD\NDitmarsExp.b3d, ...\cars\LCD\NDitmarsLcl.b3d, ...\cars\LCD\NCIExpLcl.b3d, ...\cars\LCD\NCIExpExp.b3d, ...\cars\LCD\NCILclExp.b3d, ...\cars\LCD\NCILclLcl.b3d, ...\cars\LCD\Queensbridge.b3d, ...\cars\LCD\QDitmars.b3d, ...\cars\LCD\QCI.b3d, ...\cars\LCD\RJC.b3d, ...\cars\LCD\RForest.b3d, ...\cars\LCD\RBay.b3d, ...\cars\LCD\R36Shut.b3d, ...\cars\LCD\RBayShut.b3d, ...\cars\LCD\SBroad.b3d, ...\cars\LCD\SRockPk.b3d, ...\cars\LCD\SFrank.b3d, ...\cars\LCD\SPros.b3d, ...\cars\LCD\VForest.b3d, ...\cars\LCD\V2A.b3d, ...\cars\LCD\VCI.b3d, ...\cars\LCD\WDitmars.b3d, ...\cars\LCD\WWhite.b3d, ...\cars\LCD\WCI.b3d, ...\cars\LCD\ZJC.b3d, ...\cars\LCD\ZCham.b3d, ...\cars\LCD\ZBroad.b3d, ...\cars\LCD\NIS.b3d, ...\cars\LCD\SPCL.b3d, ...\cars\LCD\Shuttle.b3d, ...\cars\LCD\YES.b3d, ...\cars\LCD\FungWah.b3d
Statefunction = Mod[value+delta*pluginstate[99], 71]
TextureShiftYFunction = 0.25 * floor[mod[Time * 0.3, 4]]

I will update as much as possible, but for now, this info should suffice on how this works.

Offline ErrorMacro11

  • Operator
  • ***
  • Posts: 421
  • Gender: Male
  • FreeLance Developer
    • View Profile
Re: Changeable Scrolling flipdots and LCDs? Yup!
« Reply #1 on: October 05, 2012, 06:59:32 pm »
chris could you help me- im having problems trying to make those animated changing Leds
whenever i try only 2 of the 4 readings are visible, they skip the third one and im having trouble with the plugin states
i dont know how to apply them

Offline Brighton Express

  • Operator
  • ***
  • Posts: 311
  • Gender: Male
  • Progress Updater for the NYC Transit Forums
    • View Profile
Re: Changeable Scrolling flipdots and LCDs? Yup!
« Reply #2 on: October 07, 2012, 03:19:31 pm »
Nice work Chris.

Offline ceelboogie1

  • New Recruit
  • *
  • Posts: 36
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Changeable Scrolling flipdots and LCDs? Yup!
« Reply #3 on: November 14, 2012, 08:59:43 pm »
I swear guys, keep doing your thing! I hope this will be available when the fictional routes are completed.
ceelboogie1- crown heights 24/7/366