Train-Sim.Com
MSTS Route Design

Message Areas - "Scenery and mountain questions, stuttering framerates."

Train-Sim.Com Message Areas

"Scenery and mountain questions, stuttering framerates."

Email this topic to a friend
Printer-friendly version of this topic
Bookmark this topic (Registered users only)
Previous Topic | Next Topic Conferences MSTS Route Design (Protected) Original message
sniper297 (236 posts)
Aug-20-01, 08:45 PM (EST) "Scenery and mountain questions, stuttering framerates." I have a whole bunch of questions about adding scenery and mountains to a new route that are slowing me down trying to figure them out myself, so I thought I'd post this and see if we could pool what we've learned so far. I've used some of Jim Steven's suggestions with some success, but I still have large gaps in what I know. First off, does ANYBODY anywhere have a single clue what causes the game to "stutter"? In other words you're going along at 50 to 60 FPS nice and smooth and suddenly it hits the video equivalent of a brick wall, drops to 14 FPS, and then smooths out again after a second or two. It's definitely in the routes structure, because when you start a new one and lay a bunch of track and test it it's not there, but after you've been adding objects and new track and scenery for a couple weeks, all of a sudden there it is. Is it tracing out the path on the tracks? Looking in the compass direction the train is facing to see what's next? Loading the objects in the next quad when it gets within a certain distance from the quad tile boundary? I'm normally an ace troubleshooter, I once had a job doing electro mechanical maintenance in a factory that made plastic bags, and when I started I didn't know diddly about extrusion or injection molding or anything else about it. Not a problem, cams and sprockets and relays are universal to all machines, and I usually had a "known good model" to go by - when I first started working there I would have the operator of the broken line take me over to one of the running machines and show me what his was supposed to do when it wasn't broken, and then I would go over to his and make it do what it was supposed to do. In this case I don't have a working model to compare it with, because all six of the original routes have it too, so I don't have a clue what I'm adding that makes it do that. If somebody from kuju would just post an explanation of exactly how the graphics engine loads and processes polygons, I'd at least have a starting point, and they could keep the CODE a secret, who needs it, I just want to know what to avoid doing when I'm making a route.
Somebody said he got a missing SMS error in the region of one stutter point (starter1, Port Ogden and Northern version 2, coming out of the new city crossing the trestle) and he thinks it's because one corner of a forest region is hanging over the tracks. Moved and even deleted all the trees in the quad with no effect, altho I did notice the number of trees per square klick had changed from whatever I typed in to some weird value like 24.6483 instead of the 1,111 or 2,222 that I had typed in there. It defaults to 50, but that's a pretty sparse forest, does anyone know if there's a max value? Maybe it don't like my numbers. The next point that's even worse is that long curved tunnel over the coal mine, going south, just before the tunnel exit. It's obviously not having a problem drawing what's in front of you THERE, because there's still nothing to see but tunnel walls, so maybe it's just going spastic thinking about all the triangles that are coming up in a few miles. Or maybe it has some kind of sonar and is trying to load all the track and objects in the coal mine you're passing over, in spite of the fact that you're in a tunneland can't see it, who knows. Some of the quads in Marias have 1200 or more objects in them - does anyone know what the max is? I'm nowhere near that yet, I think there's 469 or something in the biggest. How about all manual switches, does that have some effect? Flight simulator was easy, you could actually see all the detail that was slowing it down, but this thing has me stumped.
Another guy said he gets weird video snapping in an external view, didn't say where, but I did see something like what he's talking about in a new section I was working on, coming out of a tunnel onto a wye near a river. Is there something about that combination that's like the dynamic track thing that makes the water turn white?
I'd like to create something that everybody can enjoy without any problems, but until they either patch the main program or at least post a known bugs report, I'm working in the dark here. Mind you, I'm nowhere close to giving up, I'm a single father who's been raising an autistic child by myself for the last 11 years, so if the people responsible for this buggy editor think they're gonna drive ME off in hysterics, they better try it on someone else, because I am immune. What's maddening to most people is only a minor irritation to me, and the fact that all this is slowing me down and cramping my style is irritating, so I wonder how others are dealing with it. Hang in there,Jim "Sniper" Ward
By the S-curve
Chicago
Alert Edit | Reply | Reply With Quote | Top
Table of Contents

Subject Author Message Date ID RE: Scenery and mountain questions,... JMSteven_W98 Aug-20-01 1 RE: Scenery and mountain questions,... sniper297 Aug-20-01 2 RE: Scenery and mountain questions,... JMSteven_W98 Aug-20-01 3 RE: Scenery and mountain questions,... sniper297 Aug-21-01 4

Lobby | Topics | Previous Topic | Next Topic
Messages in this topic
JMSteven_W98 (327 posts)
Aug-20-01, 09:37 PM (EST) 1. "RE: Scenery and mountain questions, stuttering framerates." Hi Jim,I think one of the biggest contributors to the frame-rate issue you mention is the way the game handles the shapes.Picture the current camera view as being the center point in a circle. The circle's size being determined by the display settings for the distance you want displayed.When shapes display in the runtime mode, the shape references exist in the binary tile data. Those references are faster than reading a UNICODE file like the Route Editor does.As the train moves along a route, the center point moves and the area enclosed by the circle changes.As long as the shapes needed for an area are in RAM, the frame rate remains high. If the circle crosses into a tile that has shapes that are not currently in RAM, the program must check the "S" file to see if it uses a multi-texture "SD" file or has the "ESD" box settings.If there's only one shape texture, the process loads the ACE data into the tile buffers. If the shape has several textures, like Night, Snow or WinterSnow, the engine must check the current SIM environment to determine which ACE file to load.That processing takes some CPU time. If the tile images have transparencies, additional calculations must be done before that shape is ready to display.If you enable specular lighting to show light reflections - even for things like the flashing red lights in the back of the train, you add even more to the single shape load.In the meantime, the standard physics calculations still need CPU time to determine velocities.Unlike "UNREAL", this game's engine doesn't have thread priorities that can be changed. Events happen in preset orders, although it's not easy to determine those events.Having lots of system RAM available helps performance, but we don't have configuration options that allow us to select how that RAM is used by the game.Even something as old as Open GL supports user selectable RAM sizes. That change would help us all out.I haven't looked at TS source code for the Audio stuff, but I would imagine it to share the execution thread. (A thread is a unit of measure defining one piece of a task. A task is a section of a program. Running threads should allow you to execute video in parallel with audio.)I've seen scenarios where the Sound Region is out of synch with the video display. You hear the sound of the train crossing a bridge before it actually is on the bridge.Jim Steven, MCSE
Sr Microsoft Windows Application Developer Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (236 posts)
Aug-20-01, 09:54 PM (EST) 2. "RE: Scenery and mountain questions, stuttering framerates." Thanks, Jim, that helps a lot. One trick would be to hide a bunch of objects behind a hill to make it load them before it crosses the blue line. Lots of possibilities now that I know what it's looking for, and like flightsim the single biggest factor in determining framerate is most likely going to be the visibility slider. How about those forest regions tho - Is there a max on the number of trees in each one? Would it be better to use several overlapping ones with less trees per region? The thing I like is that with a whole lot of trees, it only adds one to the object count. And do the deciduous clumps work the same way, IE one shape instead of many to calculate viewing angles? I'm working on another logging area, and I'm using deciduous clumps inverted with the tops buried for tree stumps - looks KINDA realistic. Remove | Alert Edit | Reply | Reply With Quote | Top
JMSteven_W98 (327 posts)
Aug-20-01, 11:07 PM (EST) 3. "RE: Scenery and mountain questions, stuttering framerates." The Forest object seems to let you do anything you want with it. I'm working on a large route where the train is at a high elevation and there is space below to hold trees.I've used 8192 and 9000 but nothing larger.It depends on the size of the red rectangle you draw out and the four floating point numbers in the FORESTS.DAT file.Entries in FORESTS.DAT use this format: ("Description" "Shape ACE file" Area_Wd Area_Ht Wd Ht)
Wd and Ht can be obtained from an SD file or by converting the "S" file to text with the FFEDIT utility.Set WD and HT to match the object's real shape. Set Area_Wd and Area_Ht to include space between shapes.You can also use the forests in an interesting way. As long as you have an object that only uses a single ACE file texture, that shape can live in the "FORESTS.DAT" file:Message Areas - "Scenery and mountain questions, stuttering framerates." – image 1If you use combinations of houses like this and set those four numbers in the FORESTS.DAT file better than I did in this rushed message and you'll have other shapes to place in the distance.Jim Steven, MCSE
Sr Microsoft Windows Application Developer Remove | Alert Edit | Reply | Reply With Quote | Top
sniper297 (236 posts)
Aug-21-01, 07:08 PM (EST) 4. "RE: Scenery and mountain questions, stuttering framerates." Too cool!! Hack the shapes and you could build a whole city with just a couple objects using overlapping regions. Wow! I think I'm gonna take a shot at making a stump region for the logging areas. I think you just set back the release of PO&N version three by at least a week. That's the nice thing about working for free, tho - set your own deadlines, and anybody that don't like it can go fly a kite!
One funny thing I was doing in trying to reroute the connection to Stevens Point (it's kinda named in your honor, but there really is one in Northern Wisconsin) was to try to ressurect coal city from the dead, by generating the tile in the extractor, replacing the files with the old version, and rebuilding the track db, which I've been successful at before, but this time the rebuild dropped the ball on a piece of dynamic track:
Message Areas - "Scenery and mountain questions, stuttering framerates." – image 2
When I tried to come at the track that shows up as texture from the other end it derailed, because there's no tdb under the texture! The way they set this thing up you get some funny results sometimes.

Thanks again, Jim.
Jim Ward Remove | Alert Edit | Reply | Reply With Quote | Top

Lock | Archive | Remove

Lobby | Topics | Previous Topic | Next Topic

Restored from the Train-Sim.Com archive, captured November 2, 2001. About this archive.