Solved City map optimization advice

Discussion in 'Mod Support' started by swift502, Jun 16, 2019.

  1. swift502

    swift502
    Expand Collapse

    Joined:
    Oct 30, 2018
    Messages:
    103
    Hi,

    I'm attempting to port GTA 3's map into BeamNG.
    The first island alone has roughly 15 000 objects and 500 000 triangles.

    A quick and dirty import was a surprise to me. I exported the entire island as one .dae model and still got 60fps.



    I'd really love to know, what would be the most performant export option? (Rendering and physics wise)
    • 15 000 individual objects without LODs
    • Splitting the island into 12 or 16 segments each, every segment with it's own LODs, ~25 000 triangles per segment's highest LOD (seems like a reasonable balance to me)
    • One mesh (like in the video) with big LODs for each island
    And does it even matter? How does the physics broad-phase work? If it's so efficient, should I even bother with splitting up the islands?

    And for comparison, do we know how many triangles are being drawn on-screen in a map like Italy? What are the usual rendering budgets for official BeamNG maps?

    Thanks a lot for help.
    Jan
    --- Post updated ---
    And then there's 335 street light objects. Can I just export them as one mesh, so it's easier to batch-render them? Or individually, so that each one has it's own AABB to optimize for physics?
     
    #1 swift502, Jun 16, 2019
    Last edited: Jun 16, 2019
    • Like Like x 1
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    In your video, everything is one material?
    If so, that's why you are not seeing issues.

    As soon you start adding the materials, that will increase the drawcalls.
    The less unique material you have, the better for performance.
    I'd divide things into smaller pieces just for the sake of being able to work on it better.

    Physics side, does not matter if it's a single piece, or 15k small pieces.
    Avoid having long/stretched triangles for performance at best.
     
    • Like Like x 2
  3. swift502

    swift502
    Expand Collapse

    Joined:
    Oct 30, 2018
    Messages:
    103
    And then there's 335 lamps. Can I just export them in groups, so the get easily batched for rendering? Or individually, to optimize for physics?
    Ok thanks a lot!
     
  4. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Should be the same physics wise.
    Rendering wise, it depends if you want to use LODS or not.
     
    • Like Like x 1
  5. swift502

    swift502
    Expand Collapse

    Joined:
    Oct 30, 2018
    Messages:
    103
    The lamp question somehow duplicated by accident. :)
    I'll shoot for several segments per island, where each segment (in it's highest LOD) has, let's say <100 000 triangles. That's including lamps and all the other props.

    There's quite a lot of materials so I'll instead try to keep the triangles down, by using LODs on every segment you're not currently in.
    In the worst case I'd have to bake "mega textures" for individual map segments. But I don't want to do that, because it would inevitably reduce the texture quality, and possibly introduce mip-mapping bleeding artifacts.

    I'll keep posting updates in the WIP thread.

    Thanks again!
     
    • Like Like x 1
  6. swift502

    swift502
    Expand Collapse

    Joined:
    Oct 30, 2018
    Messages:
    103
    There's about 4800 materials total. Pretty crazy. But seems to run great. I think I managed to keep the triangle count below 200 000 tris at all times.
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice