Results 1 to 7 of 7

Thread: Editing Bounding Boxes.

  1. #1
    Join Date
    Jan 2007
    Location
    United States of America.
    Posts
    1,127

    Default Editing Bounding Boxes.

    Does anyone have any experience with editing RW GeoPcDx file bounding boxes using RW Tools?

  2. #2
    Join Date
    Feb 2007
    Location
    Louisville, Kentucky
    Posts
    948

    Default

    I believe that what you are referring to as bounding boxes are actually the collision properties information that is at the bottom of the asset's bin file. Note that not all assets have collision properties set for them.

  3. #3
    Join Date
    Jan 2007
    Location
    United States of America.
    Posts
    1,127

    Default

    In the Geo file, the bounding is called a bounding sphere, and it has several locations in the file (usually associated with Radius).

    The reason i'm asking has to do with 3DCanvas 8. Assets that i've created with that software disappear at certain angles. A lot of people have said that it's a pivot point issue, and i've tried moving that around to find that the asset still disappears, just at a different angle. I came across a thread a few months back that said the disappearing is caused by adding pieces to an asset and the modeling software does not properly update the bounding box. Because of this, Railworks sees the asset as being smaller than it really is.

    Out of curiosity, I encased one of my disappearing assets in a box that was larger than the asset, then painted it transparent, named it's heirarchy Main, and moved the rest of the asset inside of this new heirarchy. Sure enough, when I exported the file to Railworks, it no longer disappeared, so i'm thinking there is some validity to this claim.

    It would be easier if instead of going to the trouble of creating a "manual bounding box", I could simply expand the one that is already in the Geo file. If I remember correctly, I also had to do this with a few .S files in MSTS.

  4. #4
    Join Date
    Nov 1999
    Location
    Oregon, USA.
    Posts
    385

    Default

    The "bounding sphere," or "view sphere" as it's usually called, is one of the properties any 3D game engine uses to determine if something should be drawn or not. I haven't looked into the way the dimensions of view spheres are calculated by the RW game engine, but I know the diameter of the view sphere is apparently less than the maximum dimension of the object, at least sometimes. I suspect the game code uses some sort of average of the XYZ dimensions, because I've had problems with especially long, thin objects disappearing. I think we've all seen that phenomenon at one time or another.

    It might be instructive to compare the known XYZ dimensions of an assortment of objects to the dimensions of the computed view spheres to get a better idea of what's going on.

    I can usually avoid the "disappearing" problem by centering the pivot within each named part of a model. Unless you're working with animated parts where the location of the pivot point is critical to making the animation work properly, there's no reason you can't set pivot points wherever you want. However, that strategy doesn't work for very large models - say 75m and up. You may have to break those down into smaller models and match them back together in the route editor.

    There's also no reason the view sphere dimensions in the GeoPcDx file can't be hacked so the sphere truly encompasses its corresponding object, but it's something only experienced users (like the ones who have posted in this thread so far) should try. I'd try relocating the pivot points first.

  5. #5
    Join Date
    Feb 2007
    Location
    Louisville, Kentucky
    Posts
    948

    Default

    There is a reference to a centre:

    Centre d:numElements="4" d:elementType="sFloat32" drecision="string">0.0000 0.0000 -0.0000 1.0000</Centre

    and a radius:

    Radius d:type="sFloat32" d:alt_encoding="00000080F5002240" drecision="string">9.0019</Radius>

    in the GeoPcDx file area called:

    /cHcSGBoundingSphere

  6. #6
    Join Date
    Jan 2007
    Location
    United States of America.
    Posts
    1,127

    Default

    With all the finesse of using a baseball bat to drive in a finishing nail, I edited all of the Radius entries of one of my disappearing assets (after backing it up, of course). The asset was a 300'x36'x300' warehouse. I found several entries that read "0", and one entry that looked to be about the size of the proper "Radius". I put in values of 500 in all of them, just to make sure all bases were covered. It worked - the asset no longer disappears - but only after plugging in arbitrary numbers in places that I have no idea what affect it's having on the model. Further investigation is required.

  7. #7
    Join Date
    Feb 2007
    Location
    Louisville, Kentucky
    Posts
    948

    Default

    I would guess that the centre entries have to do with the center of the radius in relation to your object's center, and then of course the radius is the size of the bounding sphere measured from that center.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-->