Page 1 of 1

Diasppearing objects placed by Autogantry

Posted: Sun Mar 15, 2009 9:50 pm
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.

Re: Diasppearing objects placed by Autogantry

Posted: Mon Mar 16, 2009 12:48 am
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

Re: Diasppearing objects placed by Autogantry

Posted: Mon Mar 16, 2009 9:40 am
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.

Re: Diasppearing objects placed by Autogantry

Posted: Mon Mar 16, 2009 7:33 pm
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. . .

Re: Diasppearing objects placed by Autogantry

Posted: Fri Mar 20, 2009 12:11 am
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.

Re: Diasppearing objects placed by Autogantry

Posted: Wed Mar 25, 2009 2:14 am
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.