Diasppearing objects placed by Autogantry

The MSTS 1 Route Editor can be a beast to use, but it's capable of some amazing results, here you can talk with the wizards that are building some of the fantastic routes available and learn how to make your own.

Moderator: Moderators

Locked
User avatar
GSX1400
Been on the forums for a while
Posts: 207
Joined: Tue Dec 18, 2007 5:52 pm

Diasppearing objects placed by Autogantry

Post by GSX1400 »

I'm having a bit of a time with autogantry. :-?

I've decided to use it to place some track side stuff like telegraph poles and Post and Wire fences.
The poles go down without a problem and I have chosen to place them about 5m away from the centre of the track but the P&W fences are being a troublesome. Firstly I wanted them further away from the track than the poles so I'm using 7m.

The problem is that once the fences are placed away from the track the ones nearest the camera (in RE) or train (when driving) disappear.
This is how they appear next to the track together with the odd piece of fence in the middle for some reason. . .
Image

And this is how they appear once shifted out, notice how the ones nearest the camera have gone. . .
Image

I used Shape File Manager to move the objects 7m left away from the centre of the track.

I also remembered something about 'Vol sphere' and how the sphere size should be 10% than the largest of the values in that function so I edited the shape file to make sure. It made no difference.

volumes ( 1
vol_sphere (
vector ( -7 0.75 1.225 ) -8.51992
)
)


The object was made with Sketchup V6 and later V7 (I've tried both and no observable difference happened) and the MSTS exporter V2.0

This picture shows that the telegraph poles work as expected.
Image

Any thoughts would be most welcome.
Regards Tim

Restarted the GWR Devizes Branch Line project!
User avatar
jbilton
Very Active Forum Member
Posts: 19267
Joined: Fri Oct 10, 2003 12:08 pm
Location: At home ..waiting to go to Work.
Contact:

Re: Diasppearing objects placed by Autogantry

Post by jbilton »

Hi
I think you're on the 'right track' with Vol sphere ..... but it needs to be 10% larger than the length (which presumably is the largest measurement).

Cheers
Jon
------------------------Supporting whats good in the British community------------------------
Image
User avatar
GSX1400
Been on the forums for a while
Posts: 207
Joined: Tue Dec 18, 2007 5:52 pm

Re: Diasppearing objects placed by Autogantry

Post by GSX1400 »

jbilton wrote: I think you're on the 'right track' with Vol sphere .....
Thanks for replying Jon.
Another thought about "vol_sphere" in this case is that having shifted the fences over to the left that maybe the whole shape has changed size at that maybe the vol_sphere has to be even bigger than 10%.

I'll try later when I can and see what happens.
Regards Tim

Restarted the GWR Devizes Branch Line project!
User avatar
GSX1400
Been on the forums for a while
Posts: 207
Joined: Tue Dec 18, 2007 5:52 pm

Re: Diasppearing objects placed by Autogantry

Post by GSX1400 »

The thing is, there's a line in the shape file which defines the size of a sphere that the graphics engine uses when you look at a 3d object. If its big enough you can see all of the object, if not, in other words, if the object can't fit into the sphere then you won't see all of it. In theory the sphere should be 10% than the size of your object (I think that's how it works).

When you shift a shape to the left (i.e. you put -ve vectors in the shape) the tendency is to increase the size of the sphere to be bigger (i.e. more -ve) than the biggest value in the shape sizes.

I wonder what you get when you turn a sphere inside out by making it negative?

Once I did this
volumes ( 1
vol_sphere (
vector ( -7 0.75 1.224999 ) 1.32
)
It all worked. You see the vol_sphere value of 1.32 is 10% bigger than the biggest number in the brackets which is in fact 1.223999 and not the -7 which I was reading as a shift left by 7 metres. Originally Shape File Manager had increased the Vol_Sphere value to -7 and hence my confusion.

See the result below. . .
Image
You can even see the wires!
So there we have it, Vol_Sphere in this instance needs to be 10% bigger than the highest value number (1.32 being greater than -7).

. . . I think. . .
Regards Tim

Restarted the GWR Devizes Branch Line project!
User avatar
ARG706
Well Established Forum Member
Posts: 523
Joined: Mon Dec 25, 2006 7:16 am
Contact:

Re: Diasppearing objects placed by Autogantry

Post by ARG706 »

shape (
shape_header ( 00000000 00000000 )
volumes ( 1
vol_sphere (
vector ( -7.817 2.58266 0 ) 9.45404
)
)

As they've said, the bolded text is the one you need to change. Objects whose axis is on the edge of the actual object body will be more likely to disappear in the sim than ones with the axis in the centre. I just change the (bolded) text from whatever it is to 50 and this usually eliminates the problem for me.
krausyao
Been on the forums for a while
Posts: 166
Joined: Fri Jul 11, 2008 12:25 am
Location: Madison, Wisconsin

Re: Diasppearing objects placed by Autogantry

Post by krausyao »

It is not possible to calculate the last value of vol_sphere by using the first three values. The first three values represent the center point of the shape. The shape above is centered about the x-axis at -7.817m, centered about the y-axis at 2.58266m, and centered about the z-axis at 0m. Knowing that the shape is centered about the z-axis at 0m does not tell how long the shape is about this axis which is what is needed to calculate the last value of vol_sphere. What is needed to calculate the the last value of vol_sphere is the distance from the center of the shape to any of the corners. The corners can be determined by finding the maximum value of each axis of the point elements of the shape and then calculating the distance from the center of the shape to any corner and then multiply by 1.05.

Another way of calculating the last value of vol_sphere is half the distance of opposite corners of the shape without using the location of the center. Using the Show Bounding Info of Shape Viewer will show the size of the shape in each dimension.

For an example using shape jp2bluebrg.s which has dimensions width 6.012m, height 14.199m, and length 31.68m the last value of vol_sphere is 18.4974 using 1.05 * sqrt(x^2 + y^2 + z^2) as the formula where x is half the width, y is half the height and z is half the length.
Jeffrey Kraus-Yao
Digital Rails Corporation
http://www.digital-rails.us
Locked

Return to “[MSTS1] Route Building”