(Help) I seem to have found a limit to how many static objects you can have in a map

Discussion in 'Content Creation' started by jammin2222, Aug 13, 2014.

  1. jammin2222

    jammin2222
    Expand Collapse

    Joined:
    Sep 15, 2013
    Messages:
    386
    I have either broken my map or there is a bug that makes importing/copying objects a bit tricky once you hit a certain limit.
    I made two prefabs consisting of traffic lights for two different types of junction. I have copied them all over the city but they started to be invisible upon copying them. I blindly copied a few more and saved/reloaded the map and I could see them again.

    I thought ok, must be a bug, but when I went to continue copying they were again invisible. So I blindly did a few more, saved/reloaded the map and I could see them. I continued like this a few more times but eventually the map would crash on loading.
    My only choice was to delete the two prefabs I had made.
    I loaded the map back up and sure enough all the traffic lights were gone, so I deleted the huge list of redundant prefabs left in the scene tree and saved/reloaded and all is well. I remake the two prefabs again with new names this time and set out to redo all that work I lost. I started in the same way as before and sure enough when it got to about the same state as before they started being invisible again.

    This time I stopped and deleted the first invisible prefab and tried to copy a normal static object that wasn't part of a prefab and sure enough it was invisible. I deleted it AND the last prefab I could see, and tried to copy a normal object again and I could see it. subsequent copies are invisible though. Even importing a new model will be invisible after hitting this limit.

    So from what I have figured I can only add about 10-20 more objects after they start being invisible before the map will start crashing.

    All I can say is I do have A LOT of objects in my map, A LOT!

    Is there any documented limit of how much crap you can cram in a map? Its not like the map is laggy either. I'm pleasantly surprised with the performance in fact. Though I am wondering how I can finish it without adding anything else to it. The only way I can think of is to combine some models into one .dae file :/

    Any ideas?

    - - - Updated - - -

    Ok so I counted roughly how many objects I have in my map. I came up with 4113 items.

    I am a bit sad that I can't finish my map due to this limitation.

    Has anyone else got over 4000 static objects in their maps? This isn't including the forest items. I can still add more forest by the look of things.

    I did a rough calculation that I will need to have about 1000 more buildings to fill the remaining spaces that I have set out for them. Then I will need a heap more objects for street furniture.

    What should my plan of attack be?

    Here are some things I could try, tell me what sounds like the best plan or feel free to add your own ideas.

    • Add the objects to the forest brush and have a hard time lining up the objects properly.
    • Rework through the entire city combining chunks of the city into one huge model that will probably cause more issues with lag.
    • Delete everything and start again but this time don't make it as big (last resort)
    • remove a few static objects and replace them with more important stuff like finishing the roads. Then grass over any places where I was going to put buildings.
    • spread the buildings out evenly across the city so they are not clumped in groups and fill in the gaps with grass/trees
    • deleting all the street lights and traffic lights will give me about 500-600 more objects to play with. Only about a quarter of the city has the lights at the moment so I could trade them off for buildings but I will still be short of objects.
    • Find a magic file and edit it to increase the static object limit (would be nice. maybe the devs know if raising the object limit is possible)

    What should I do guys?

    - - - Updated - - -

    I thought It might help if you could see the map to decide what the best option is to get the map completed.

     
    #1 jammin2222, Aug 13, 2014
    Last edited by a moderator: Oct 21, 2015
  2. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,630
    Just a thought:confused:

    but maybe try fiddling with these values? [under visibility]
    [near clip], [visible distance] and maybe [decalBias]
    105171bc10.png
     
  3. jammin2222

    jammin2222
    Expand Collapse

    Joined:
    Sep 15, 2013
    Messages:
    386
    I had increased the [visible distance] a far amount to 5000 along time back, but this isn't really the issue as when you Shift + drag a new copy of a model it will be right next to the original and should be visible like the 4000 other times I have done it. Its only now that its happening and if i delete a few objects I can copy the same amount over again before they start turning invisible.

    Coming to think about it the problem only started after I copied a lot of prefabs around the place. I wonder if I delete all the prefabs again and just try copying the traffic lights as single items instead. If i don't run into any problems this time I will know not to use prefabs in the future. I think I will try this next.

    Still would like to know whats causing the problem for sure though.

    Thanks for the reply

    Cheers :)
     
  4. LuisAntonRebollo

    LuisAntonRebollo
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Feb 25, 2014
    Messages:
    117
    Hi and thx for share your problem.

    We want to support large maps in BeamNG.drive, we added this issue to our internal bug tracker.

    I send you a PM for talk about.
     
    #4 LuisAntonRebollo, Aug 13, 2014
    Last edited: Aug 13, 2014
  5. Davidbc

    Davidbc
    Expand Collapse

    Joined:
    Mar 20, 2013
    Messages:
    1,333
    that map is huge... I hope the problem is fixed and you can release it :eek:
     
  6. SkinnierSteve

    SkinnierSteve
    Expand Collapse

    Joined:
    Jul 29, 2014
    Messages:
    65
    First of all I have to say Whoah! That's a huge city with a huge number of objects! Second I have to say that it looks extremely awesome, and great job! Third I would like to say I didn't know about the object limit, and I hope they can fix it. Maybe you could remove some un-necesary objects, or build the city in parts like I'm doing with mine.
    I hope you get the problem sorted out, because that city looks amazing, and I would love to drive in it!
     
  7. pulley999

    pulley999
    Expand Collapse

    Joined:
    Jan 21, 2013
    Messages:
    825
    My vote is to combine them, and see how that works.
     
  8. ErikSW

    ErikSW
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    152
    I am afraid I can't help... I really hope you can get it to work though, that map looks to good to be true :D Really, it looks amazing, reminds me about a rpg map in Gmod which I can't remember the name of.
     
  9. jammin2222

    jammin2222
    Expand Collapse

    Joined:
    Sep 15, 2013
    Messages:
    386
    Thanks for all the replies :)

    Its nice that the devs are looking into the issue and I look forward to them telling me what a noob I have been and how to fix it. I kind of think its a memory issue, or something to do with the prefabs I was copying last.

    so untill I hear back from the devs I will try deleting the prefabs and just copying the single parts over instead. If they start being invisible again I can rule out the prefabs causing it. Then I will try combining the street lights and traffic lights into one model to reduce the individual object count. This alone wont free up enough objects to complete the map but I can then start combining some road sections. The only downside is that the bigger and more complex a model is, the more chance it will kill the fps when you drive on it.

    I really hope they can just tweak some code and I can just continue without having to combine huge chunks of the city though.

    whatever the outcome I will finish the map if it kills me.

    I will keep you posted

    Cheers :)
     
  10. theshark

    theshark
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    137
    It seems to be a problem with torque3d. The object id's and therefore the amount of objects is limited 4096. We try to raise it without raising the amount of memory needed too much :)
     
  11. jammin2222

    jammin2222
    Expand Collapse

    Joined:
    Sep 15, 2013
    Messages:
    386
    It all comes with a trade off i expect. I would be interested know if raising it to 8192 would be a problem. I guess it depends how much memory the current way is using. I Look forward to seeing the outcome of this as it will save me a heap of trouble in the long run if you can raise it. Even if its only buy couple of thousand. it would help.

    I wonder how the forest code deals with large numbers of objects. I'm sure its pretty easy to paint over 4096 trees in a map. I could be wrong.

    I will defiantly combine clusters of streetlights and stuff together as i don't think it will cause too much trouble. (aside from making them)

    hopefully buy the time I run out of objects again the devs will have pulled off a miracle :)




    On a side note, is there a limit on how many materials you can have in a .cs file?

    I ask because Mine are huge and Im having trouble with entries getting deleted when I modify another entry.
     
  12. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    Are you talking about map size dimensions or actual object counts max in any given map? Holy cow, a map size of 8192 would require a 32 core system to run it!:p
     
  13. jammin2222

    jammin2222
    Expand Collapse

    Joined:
    Sep 15, 2013
    Messages:
    386
    object count in any given map.

    I hit the limit, I cant add any more static objects to the map as I have used all 4096 of them lol

    Though this map is nearly 8192. Its a 2048 heightmap with a times 3 multiplier making it a 6144 I guess.

    I really hope they can up this limit on objects. The map is not that laggy considering the size and shear amount of stuff it has. Though I wonder what the performance will be like if they doubled the object limit to 8192 or even more instead.
     
  14. thevidmaster

    thevidmaster
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    202
    for now i would recommend grouping the individual objects into sections, sort of like what Sketch City has going on
     
  15. jammin2222

    jammin2222
    Expand Collapse

    Joined:
    Sep 15, 2013
    Messages:
    386
    yes that's hows its been done so far. I have reused a lot of stuff from my Sketch city map. I have also made a heap of new stuff too. I don't really want to combine the buildings into one file as it makes it less flexible when It comes to placing them without looking really repetitive. Its repetitive enough as it is when I can put them wherever I like.
    I will start grouping things that will need to be repeated in equal ways, like lamp posts. I can think of a few other things I can get away with combining too.

    I will keep plodding on regardless and maybe one day I will finally finish it. It seems never ending, but it's starting to fell like a city in places now. Fingers crossed that with a bit of a rework to some models and maybe an increase to the object limit in the future It should turn out alright in the end.
     
  16. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804

    Wow....the multiplier is assessed during creation/export/import? Made a 4096 heightmap and loaded it up and the whole shebang hits T3D rendering limits. Good to know about the object
    count limit. Do they follow the map size or is that the total for any map?
     
  17. jammin2222

    jammin2222
    Expand Collapse

    Joined:
    Sep 15, 2013
    Messages:
    386
    When you import a height map you should see an option to change the meter per pixel. Default is 1. So a map with a 1024x1024 Heightmap @ 1 meter per pixel will be 1024 meters across. My map is a 2048x2048 height map @ 3 meters per pixel so the map is 6144 meters across instead of 2048 meters across. This stretches out the height map effectively lowering its resolution and making it harder to shape fine details into the terrain.
    As I am planning most of the roads being mesh and will only be a few non mesh roads I traded of this resolution for some more size.

    Sadly this object limit is regardless of map size. So if you have a heap of static objects in your map and still plan on adding a lot more then it would be wise to organize your scene tree in such a way that you can highlight all your statics objects and see the total number (shows how many items you have selected on the bar at the bottom of the world editor)
    I don't know if there is an easier way to count them as selecting 4000 items at the same time makes the editor freeze up for a minute. once its unfroze you can continue with no problems though. So if they do increase the object limit they might want to limit how many objects you can select at the same time. 500-1000 at a time would be enough I guess.

    I am surprised there is an arbitrary object limit set like this, I thought the limit would just be performance related. Just stop when its laggy enough kind of thing. It's good to know the devs would like to raise this limit though :) I would have been totally fine with them saying tough tits, deal with it. They may still say that though when they have poked around for a while lol
     
  18. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    Great explanation Jammin and thank you! It seems at this stage of T3D's development this is what we get. Knowing that the Beamng devs are on the T3D steering committee is serious hope that our concerns and
    wishes will be heard going forward.

    As for map size I made my first ever 4096 size map and can't begin imagining ever finishing something that huge! I can clearly understand your frustration with losing control of 4K objects. I gave up autopainting
    the damn thing after putting down a stock grass overlay and wasn't finished after over two hours...lol. Starting small is definitely the way to go.
     
  19. jammin2222

    jammin2222
    Expand Collapse

    Joined:
    Sep 15, 2013
    Messages:
    386
    I heard that Torque kind of freaks out with height maps bigger than 2048x2048 so I didn't look at figuring out how to get L3TD to export anything bigger than its apparent max size of 2048. Did you use L3TD to make your height map?

    Also I was feeling very daunted when I started this map too. It was very slow to start with. A lot of thinking and shuffling things about and not much to show for the first two months. Then it started to fill out quite quickly until it decided to somehow delete every material from every building. There is nothing worse than that gut wrenching feeling when you load up your map and all your nicely textured objects are bright orange. At this point I decided I would completely start over with a new height map as I didn't really like the one I had. Importing all the objects again took a while but it was worth it in the end.

    I'm not sure how long ago it was since my last update to Sketch City but I have been working on this since then. If I'm at home then I am probably doing something map related. All I can say is don't give up and before long it starts to feel like you are getting somewhere.

    Back on topic about object limits, I don't think combining models is going to help performance one bit. It will mean you have to see more high detail models at the same time. I removed all the single streetlights and traffic lights (freeing up about 500 objects) and made a group of them designed for each type of road section. Each group has a max of 8 lampposts and 4 traffic lights. This means that instead of 2 or 3 lampposts being shown in high detail at any one time it now has to draw up to 24 (2 groups of lights). It has knocked 10 fps off in places, and I don't really have 10 fps to spare. This will be even more of a problem on bigger objects I suspect.

    I have been keeping count of the objects and so far I approximate there are 1325 road sections, 1739 buildings/details and 104 grouped light sections.
    So I have 928 free if the limit is 4096. As I have 1325 road sections I will need to have 1325 objects for the light groups, one for each road section. And as each road section can have up to 4 buildings I will need up to 5300 objects for them alone. So 7950 objects just to complete the current road sections with the grouped lights and the buildings. The grouped lights are causing a noticeable fps reduction compared to having them as single objects so in an ideal world I would ungroup them again adding another 15900 objects to make a total of
    23850
    bloody objects! :eek:

    I Think the devs will have to pull off a miracle to raise the limit 6 times to 24576. If they can then a huge city map isn't that far away.
     
  20. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    I'm currently using Gimp for learning texturing and making custom heightmaps. Good to learn on I guess as I have very little time to devote to it and my brain spins like a top anyway. Heightmaps appear simple at first
    but when the creative juices get flowing it gets harder to keep it simple and actually learn something. Knowing in advance of the object limit will definitely change the way I think of future map ideas. BTW, I dig all the
    Willis Tower looking buildings you have going and reminds me how I'd like to model an ultra high poly, ultra high res scale version of it.:cool:
     
  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