New Feature: MSTS Shape Parser

Go down

New Feature: MSTS Shape Parser

Post by leezer3 on Wed May 16, 2018 2:02 pm

https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2018-05-16.zip

Today's build of openBVE introduces a major new feature: A parser for MSTS models in the .S format.

Both compressed binary and uncompressed textual models are supported.

Limitations:

  • Animations are not supported.
  • Lighting is not supported.
  • Luminance / reflection is not supported.
  • RouteViewer is not supported, only Object Viewer and the main simulation.
  • Minimal error checking!


A couple of screenshots next, both from the default content:




Whilst this represents a massive opportunity, please be considerate and respect the rights of those who have created models for MSTS-
This *will* be being enforced by the moderating team.

Thanks Smile

leezer3

Posts : 1189
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by SP1900 on Wed May 16, 2018 6:56 pm

Wow. Thank you so much. I think this could really help a lot
avatar
SP1900

Posts : 144
Join date : 2017-12-08
Location : Cambridge, England

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by ecreek on Fri May 18, 2018 5:25 am

I got this error message in the object viewer on a fresh install of MSTS -

An unexpected error occured (Could not load file or assembly 'Formats.Msts, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.) while attempting to load the file H:\Program Files (x86)\Microsoft Games\Train Simulator\TRAINS\TRAINSET\ACELA\acela.s

ecreek

Posts : 49
Join date : 2011-08-23

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by leezer3 on Fri May 18, 2018 11:36 am

No idea why these things always work locally, but not in the automatically built copies Razz

https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2018-05-18.zip


Tested and working on a clean machine Smile
(Note: Testing the acela.s file, I think the rotation on the windscreen wipers may be glitched, but that's likely related to the lack of animations. Pantograph is also permanently down)

leezer3

Posts : 1189
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by ecreek on Fri May 18, 2018 12:18 pm

Thanks Chris. Working now.

ecreek

Posts : 49
Join date : 2011-08-23

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by HijauKuda on Tue Jun 05, 2018 4:56 am

Sir Chris
I did try use of a microsoft train with the S file for a lokomotif
though I am having problem with object backwards on the track
and the rotateyfunction not allowed the turning to correct direction.  How do I use the s shape and rotateyfunction?

Good day and night for you
Hijau

HijauKuda

Posts : 83
Join date : 2012-01-18

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by leezer3 on Tue Jun 05, 2018 10:18 am

Use the following in extensions.cfg:
Code:
Reversed=true

leezer3

Posts : 1189
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by HijauKuda on Tue Jun 05, 2018 11:02 am

Sir Chris
In making the lokomotif have the head lamps working b3d with animated
to the animated combination file with the shape s that is backwards
I must think again how to do this?

Good day and night for you
Hijau

HijauKuda

Posts : 83
Join date : 2012-01-18

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by Delsin on Thu Jul 26, 2018 2:07 am

Checked it out and looks promising. Oddly though, animated pantographs are raised while other animated parts (doors, mirrors etc) remains in "stowed" positions.
Will the animations be supported later?
avatar
Delsin

Posts : 106
Join date : 2016-08-20

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by leezer3 on Thu Jul 26, 2018 11:57 am

Don't know Razz

To be more specific:

MSTS animations are based upon a set of keyframes defined by quaternions. Our first problem is that the internal animation system isn't written around keyframes, but rather straight linear interpolation between values.
This isn't insurmountable in and of itself, just a pain in the neck I haven't thought about yet.

However, if we get the function itself working, most of the useful animation targets aren't something we currently support; For example, openBVE has no internal concept of a wheel or it's rotation position per-se, you've instead got to manually work out the wheel position / offsets yourself from the supplied data. (Animating the valve gear on the Manor, I ended up writing an entire set of plugin functions to do this)

All in all, there may be some of the more generic ones at some stage, but nothing promised quickly.

leezer3

Posts : 1189
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New Feature: MSTS Shape Parser

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum