October 29, 2009

Middle Geometry


i've experimented a lot with trackwork, including middle geometry which gave a lot of people headaches.

while creating the track superstructure for my new rails, i've come across the usual issues with disappearing or distorted geometry which have been raised numerous times, for example in this thread on uktrainsim.

at first my superstructure was distorted and disappeared after about 50 metres down the track loft, the latter of which has also always been an issue with the 3d sleepers i had once created.
now after a couple of hours of trying to solve it by using all the methods previously described on the forums with no avail, i think i've found some further enlightenment which i thought i could share with you.

i've found out that if i used one object
( 1_0024_superstructure ) that contained all the elements of my superstructure, some of which had more than 6 sides or 12 polygons, then one the one hand it only rendered for about 50 metres down the loft and on the other hand those peculiar elements that had more than six sides got distorted.
if i deleted the more complex elements and only employed simple cubic elements, it rendered correctly without distortion, but still only 50 metres down the line.
furthermore i deleted more elements and the less elements were in my object the greater was the distance that it rendered.

my solution then was to split my object up in two objects (1_0024_plate and 1_0024_screws) which now both have a reduced number of elements as well as polygons.
now suddenly even the elements with more complex shapes appear correctly and both objects render for more than 300 metres down the line.

here is a picture of it without the distortion now: