When looking into a W file with a text editor, I find a "VDbldCount (*)" which is a counter for the "ViewDbSphere" elements. These elements have a sequence number, and x-y-z position and a radius.
Question: what is the meaning of the ViewDbSphere element.
Question: these elements are sometimes nested Why? when? what does the nesting mean?
Removing the nesting by balancing brackets causes loosing all track when opening the W file with the Route Editor, but in MSTS explore mode all track remains present.
Wim
contents of W files
Moderator: Moderators
-
wacampbell
- Been on the forums for a while
- Posts: 174
- Joined: Tue May 14, 2002 12:00 am
- Location: Wayne Campbell, BC, Canada
The ViewDbSphere statements are added to the world file by the route editor. They are used by the program to improve framerates by culling (removing) objects that are not in the field of view. The mathematics to determine the visibility of a sphere is simple compared to the math necessary to determine the visibility of complex shaped objects. So, to keep the math simple, each object has a ViewDBSphere defined ( in the shape file ) that fully encloses the object. These ViewDBSpheres are then copied into the world file and, to further simplify the math, overlapping ViewDBSphere's are combined to reduce the number of tests needed. The result is a small heirarchical database of sphere's within sphere's that speeds the process of searching for visible objects. You'll see that the top level sphere fully encloses all the others. To some extent, RE does this properly. But at some point, I see it seems to all break down. Too bad, because FOV culling is a good technique to improve framerates.
-
wacampbell
- Been on the forums for a while
- Posts: 174
- Joined: Tue May 14, 2002 12:00 am
- Location: Wayne Campbell, BC, Canada
You can restore your static objects as you describe in your other thread:
http://forums.uktrainsim.com/viewtopic.php?t=70989
Be sure to fix up the UiD numbers in the new static objects to avoid duplicates.
Regarding the static object's VDbId values, most of the time Route Editor doesn't use them. This is the case when it has a value of 4294967295 ( equal to -1 in binary ). But in any case, its easy to get Route Editor to recalculate the ViewDBSphere section of the world file and fix all the VDbId fields. Just delete a static object from the tile, and save. I noticed that the delete operation forces a full update of all the ViewDBSphere section and will fix up any problem VDbId links. I noticed a few routes out there where the builder has done manual editing of the world files and left ViewDBSphere problems as seen by floating objects etc. Normally deleting an object on the tile does the job.
http://forums.uktrainsim.com/viewtopic.php?t=70989
Be sure to fix up the UiD numbers in the new static objects to avoid duplicates.
Regarding the static object's VDbId values, most of the time Route Editor doesn't use them. This is the case when it has a value of 4294967295 ( equal to -1 in binary ). But in any case, its easy to get Route Editor to recalculate the ViewDBSphere section of the world file and fix all the VDbId fields. Just delete a static object from the tile, and save. I noticed that the delete operation forces a full update of all the ViewDBSphere section and will fix up any problem VDbId links. I noticed a few routes out there where the builder has done manual editing of the world files and left ViewDBSphere problems as seen by floating objects etc. Normally deleting an object on the tile does the job.
Thanks for the encouragement. Complete return to last backup with a correct W in the problem position would mean throwing out over a 100 miles of double track with several stations and freight yards. So the only possible solution is a repair.
Copy static object from the corrupt file to the old backup worked. Several hours of work but over 150 catenary masts and wires recovered.
But now one remaining TDB error. The old W contained an unfinished yard track bundle. The bundle was finished and close several month ago at the moment the W file and the TDB got out of sync. Now I found I had a group of about 20 track sections without the tdb marker line overhead. I was able to select, delete, new insert all but one section. Several times the send/dont send message. But the bundle is now finished, but I have one A1tPnt6dBRgtMnl with two red markers instead of three, it has no overhead tdb line on the diverting track, and a blue line is caused by the adjoining section which should fit on the diverting track.
The tdb blue and red lines suggest a 20 meter straight is present instead of the switch. What now ? A possible solution would be text edit the W file to replace the points with a 20 meter straight
Wim
Copy static object from the corrupt file to the old backup worked. Several hours of work but over 150 catenary masts and wires recovered.
But now one remaining TDB error. The old W contained an unfinished yard track bundle. The bundle was finished and close several month ago at the moment the W file and the TDB got out of sync. Now I found I had a group of about 20 track sections without the tdb marker line overhead. I was able to select, delete, new insert all but one section. Several times the send/dont send message. But the bundle is now finished, but I have one A1tPnt6dBRgtMnl with two red markers instead of three, it has no overhead tdb line on the diverting track, and a blue line is caused by the adjoining section which should fit on the diverting track.
The tdb blue and red lines suggest a 20 meter straight is present instead of the switch. What now ? A possible solution would be text edit the W file to replace the points with a 20 meter straight
Wim