Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Inconsistent physical shape count

Discussion in 'General' started by Kittenpants, Feb 12, 2020.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Kittenpants Trainee Engineer

    Messages:
    13
    I recently got the warning that my grid was reaching its maximum number of physical shapes. I went into a cockpit and checked the grid info and found that I was at about 65,500 physical shapes, so I've been trying to figure out how to reduce that number and give myself some wiggle room to continue building. However, the physical shape count seems very inconsistent. I tried removing some blocks to see how much it would reduce the shape count, which it did, but when I replaced those blocks I had even more shapes than before I removed them. I tried this with some other blocks and found that my shape count kept increasing whenever I'd replace blocks.

    I then tried building a test platform to figure out the shape count for certain blocks. I basically just built a large square of light armor blocks along with a cockpit. The shape count for this grid was 5. I tried adding some blocks, both vanilla armor and custom mod blocks. Not only did the shape count seem to increase by 3 for a vanilla light armor cube, and only 1 or 2 for mod blocks of any sort, but the shape count would sometimes not go down whenever I removed these blocks. For example, I removed all of my test blocks, but even after they were removed, the shape count for my test platform was 21 instead of its initial shape count of 5. I tried saving the platform as a blueprint and then pasted a new one next to the original. Now the original platform has a shape count of 21, but the new one I pasted has a count of 5, even though both platforms are identical.

    How the hell is this game counting shapes?
     
  2. mojomann71 Senior Engineer

    Messages:
    1,952
  3. Malware Master Engineer

    Messages:
    9,833
    Armor blocks can combine physics shapes to lower the count. That's probably what you're seeing.

    Vanilla armor, that is. Most of the "armor" mods aren't really armor but has more in common with things like the catwalk.
     
    • Agree Agree x 1
  4. Stardriver907 Master Engineer

    Messages:
    3,368
    The only downside to using modded armor blocks. I get around it by not enclosing my ships with armor.

    That, and not trying to make them pretty ;)
     
  5. Kittenpants Trainee Engineer

    Messages:
    13
    I've submitted a bug report. As I mentioned above, the shape count is inconsistent even with -vanilla- armor blocks, like a simple cube. To re-state my example, I place an armor cube on a flat surface and the physical shape count goes from 5 to 8. I then remove cube, leaving only the flat surface again, but the physical shape count does not always go back down to 5. Sometimes it goes back down to 6. Sometimes it just stays at 8. Sometimes when I place a single -vanilla- light armor block, the physical shape count jumps up by 10+. The ultimate result is that even if I keep the same number and type of blocks, if I just keep placing and removing blocks, the physical shape count keeps going up over time.

    Furthermore, even if I go through and simplify geometry, like turning jagged stepped surfaces into flat surfaces, the physical shape count keeps increasing. Thus, I'm trying to figure out how this game calculates the shape count, because from what I can tell it just seems broken.
    --- Automerge ---
    To contextualize my frustration, I'm close to finishing a pretty detail-accurate 1:1 scale reconstruction of the Donnager from The Expanse. After all of this work, it's driving me nuts that I can't finish this thing because of the game engine's wacky method for counting polygons:[​IMG] [​IMG] [​IMG]
     
  6. Stardriver907 Master Engineer

    Messages:
    3,368
    Well, you can disable the PCU limit, but you still have to deal with the shapes limit. I know this because I hit it when I added the solar "sails" to Chilkoot Trail.
    [​IMG]
    I'm not aware of the dimensions of the Donnager, but Chilkoot's length (according to the game) is one kilometer, and her beam (that's width, for you landlubbers ;)) is 100 meters. I ran into the shape limit while building that top tier of panels. I was stumped. However, although it's difficult to tell from the upper photo, there is a large ship that is merged to the main ship. Eventually, for unrelated reasons, I un-merged that ship, and when I did the shape restriction went away. I was able to finish the "sails", and re-merging the other ship doesn't seem to bother the game.
    [​IMG]
    It's also true that the game favors a nice, smooth cube over the sexy curvy shapes people prefer to build. My guess is that those large nacelles at the stern are what the game doesn't like. Maybe you could build the nacelles separately and then merge them after you finish the main body?

    Otherwise I'm guessing that Keen's just going to say that's just the way the cookie crumbles as far as calculating shapes, cause performance.
     
  7. Malware Master Engineer

    Messages:
    9,833
    Educated guess: How the physics shapes are allocated depends on where the starting position of the algorithm is. Unfortunately they can't afford to find the most effective configuration, that would take too much time, so most likely the algorithm is a best-guess one. This does indeed mean that the count could vary.

    You can actually _see_ the physics primitives using the debug menu... um... alt-F12 in an offline world I think it was? You might be able to see what's going on.

    Have you tried to see if a reload changes the element count?


    Other than that, you're in the same boat as everybody who tries to make giant builds. The unfortunate fact is; this game isn't designed for your kind of builds. It's optimized for smaller builds more suitable for the "survival" gameplay. The physics element limit is something that's built into the Havok physics engine, not Keen's game engine - so it's not even something that's under their control. Not without a rather significant change, at least.

    Oh. Something just hit me. You keep talking about "counting polygons." This might not really be significant and just a choice of terms, and you may already be well aware, but in case you're not: They're not counting polygons, they're counting physics elements. Those are not the same. The physics model consists of highly simplified geometry compared to the polygons, and in the case of armor blocks, are generated.
     
    Last edited: Feb 13, 2020
    • Agree Agree x 1
  8. Kittenpants Trainee Engineer

    Messages:
    13
    I appreciate you making that distinction. Could you suggest, then, the most efficient way for me to reduce the physical objects count while maintaining the exterior look of the ship? Would it help if I were to just completely fill the inside of the ship with solid cubes in order to further reduce geometry?
     
  9. Malware Master Engineer

    Messages:
    9,833
    @Kittenpants Frankly, I don't know. I mean, logically, it should, yes.
     
  10. Spaceman Spiff Senior Engineer

    Messages:
    1,871
    I built a BASS (big-assed super-ship) for last year's Ranos' shipbuilding contest. I, too, ran up against the shape limit. I had no choice but to scale back.
     
  11. Ronin1973 Master Engineer

    Messages:
    4,911
    You'll probably have to reduce the amount of greebling around your ship as they cause a lot of complexity in the geometry. The interiors of your engine cowling might be a great place to start and continue simplifying.
     
  12. Stardriver907 Master Engineer

    Messages:
    3,368
    Yet another victim of crumbled cookies.
     
  13. Spaceman Spiff Senior Engineer

    Messages:
    1,871
    I wanted to do that one big ship. I've done it. I have no intention of doing it again.

    My preferred choice is to built with a minimalist approach. Why add a bunch of bells and whistles that don't do anything to improve the design's capability? But, alas, I believe I'm part of a very small minority that subscribes to this design philosophy.
     
  14. Stardriver907 Master Engineer

    Messages:
    3,368
    When I first started working on Chilkoot Trail, my goal was to have it end up looking like a blue whale. Part of my Arctic theme. As I attempted to do this my sessions took longer and longer to load, and very often it slowed down to one frame per second. I never hit a limit, but I could see it from here. The only remnant of that design philosophy is that the stern kinda has a whale-tail look, if you squint your eyes hard enough.

    While I am not a fan of limits, I am a fan of purpose. There are two reasons to build a BASS in SE. The first one is: because you can. The other one is you have determined that you need a mothership as a mobile base and to tend to your fleet. Chilkoot Trail is huge. I have trouble believing someone would need something bigger. All of the ships I'm aware of that are bigger than Chilkoot (higher PCU) have issues with movement unless they use mods, as I do. People also struggle with what to do with all the space. If you have more space than you need, your ship is too big. If looks are important, build smaller.

    That being said, you can still build an amazingly large functional ship in SE if you put your mind to it. It's better if you think NASA rather than Star Wars, though.
     
  15. Kittenpants Trainee Engineer

    Messages:
    13
    Fuck that, I'm not going to pussy out of what I want to build. The Donnager is a goddamn work of art and I'm going to do it justice. It seems that supplemental grids connected to a main grid by rotors do not add to the shape count of the main grid. So I'm working around the limitation by building large components like the engine cowls separately, attaching a small set of thrusters to them, and then docking them against a merge block set on top of a rotor in the main grid, like so:[​IMG]
     
  16. Malware Master Engineer

    Messages:
    9,833
    Correct, the physics limitation is per grid.
     
  17. Kittenpants Trainee Engineer

    Messages:
    13
    Malware, do you know if there's a maximum number of rotors that can be supported by a main grid? Is there some threshold where it will just kill performance?
     
  18. Stardriver907 Master Engineer

    Messages:
    3,368
    Well, ok. I commend your enthusiasm and I wish you luck. Not gonna lie, I'm not optimistic about your chances of success. There are damn few 1:1 remakes of large ships from other media. SE was made for ships like Big Red and Big Blue. Donnager takes the game well beyond what was intended.

    You have not mentioned whether or not you just want your build to just look like Donnager, or if the interior will be detailed. Are you using any mods? I can tell from the screenshot that it's going to be very heavy (you never actually mentioned her dimensions). If the size is anywhere near Chilkoot's you will be unimpressed with the performance of vanilla thrusters and gyros.

    I use modded thrusters and gyros. Chilkoot performs the way I would expect a 200 kiloton kilometer long ship would. I only have maneuvering thrust facing forward and I use the "flip and burn" technique to stop. These days I actually can get a sim speed of 1.0, and on days like that it takes Chilkoot about 30 actual minutes to do a 180. That's actually fifteen minutes faster than when I first built her back in 2014 (which means I understand the "not pussying out" thing ;)). In fact, you might want to have a conversation with my mentor @Commander Rotal . She did what you're doing a while ago, for what may be the same reasons, and knows what you're up against.
     
    • Agree Agree x 1
  19. Malware Master Engineer

    Messages:
    9,833
    @Kittenpants There's no simple answer to that question. At least, none I know of. Yes, of course there's a threshold, as it is a block that performs a job, and any job takes time to do (and this one in particular involves the physics engine too)... how much it takes before it kills performance depends on too many variables to nail down, just starting with your system capabilities. Just try it. I mean, at this point what do you have to lose?

    Make sure you lock the rotors and that should help somewhat.
     
  20. Kittenpants Trainee Engineer

    Messages:
    13
    I'm using a few mods; a couple that add some new armor block shapes and plates, and some mods for more powerful engines. As far as dimensions, she's about 250 blocks in length and roughly 90 wide at the stern. I've worked around the shape limit by separating a few hull sections and the engine cowls, and then attaching them to advanced rotors. They seem to be holding pretty well under thrust, and the thrust is proving to be quite sufficient.
     
  21. Commander Rotal Master Engineer

    Messages:
    4,979
    I'll take the liberty of answering in the actual thread because i will inevitably get something wrong and i'd rather not spread misinformation so it's good to have @Malware to look things over :D

    First of all: i don't follow The Expanse so the original ship in question is unknown to me but that is a damn fine piece of starship, i tip my fedora *and* my comm badge.
    Second of all: i enjoy your style of language but for the official forum it might be well advised to tone it down just one notch :baby: (yeah i can't shut it off either).

    Third of all, your topic.
    Sadly i too have no real idea what the Physical Shape Limit actually *is*, i only can tell you what it is NOT, that is a Block Limit. Well. TECHNICALLY it's a block limit but it's variable. Also there's a secondary threshhold in play; but let's take this slow.

    As Malware and Captain @Stardriver907 have already explained the Shape Limit seems to count some form of physical stuff happening in blocks; personally i have a suspicion that it has something to do with deformation as it seems to massively favour Armor Blocks. To underline the point: I have been able to build a cube out of 3 million Armor Blocks; my original Tapping crapped out at... goddess it's been long, was it 160 000 blocks?
    And yes, the Armor Blocks can and do melt together to reduce or increase physical shapes. I... i have no idea how that's supposed to be calculated because in my testing i have found it *not* working as it was explained to us so i just tend to ignore that fact for a simpler one, see below.

    Outside the Shape Limit i have encountered different problems with "Do Something Blocks" - which is basically every block that uses ship power and has a function. It seems like an overload of those leads to worse performance and eventual game crash; they also seem to take up unreasonably more Shape Limit. To tell you the truth i don't know what Keen counts as a physical shape but after seeing what they call a Medical ROOM i just disregard their naming conventions and tell you what i did to increase my ships' performance and size.

    1.) I see you are using mods. Mods are generally a good thing and can actually HELP with big ship problems - chief among them stronger Gyroscopes or Thrusters that cut down on the blocks required to move or stop the ship significantly. Unfortunately they are also rarely well optimized. So in your case the very first thing i'd recommend is "yeet the mods", replace them with vanilla blocks and see what happens. For convenience sake just duplicate the World file and make it a seperate World altogether.
    2.) Keep "Do Something"-blocks to an absolute minimum.
    2A.) Now what do i mean by that. First things first: use Conveyor TUBES. This is one of those areas where i have no idea if it plays into the Physical Shape Limit or not but Conveyor BLOCKS (the cube-shaped ones) do some stupid stuff with conveyor-connection calculations. Short version is: use too many Conveyor Cubes and your performance goes to shit, up to and including Crash To Desktop. Whenever you CAN use a Tube, use a Tube or a Corner Tube.
    2B.) If you're building a replica it is very, *very* understandable that you want to give it a proper interior. This is, unfortunately, not in the realm of the possible for bigger ships. Scale-issues with 2,5 meter thicc walls, floors and roofs aside - you just don't have that much block budget. Not if you want it proper. As much as it hurts me to recommend this: keep your interior to one or two great looking rooms and keep the rest of the ship functional and possibly empty. It hurts. It really does. But the engine just can't handle it.
    2C.) Gyroscopes are kind of the Tripple Whammy; they're Do Something blocks, they take up physical shapes and frankly they have an unreasonable amount of polygons and if Keen had listened to me years ago and given us Capital Gyros we'd be in a much, much better spot. But alas, big ships need dozens to thousands of Gyros, depending on size and mass, just to lumber around slowy. My recommendation: figure out how many Gyros are enough to keep the grid capable of using it Inertial Dampeners and yeet the rest. Gyroscopes are the bane of performance.
    2D.) Similar things go for Thrusters. A big, heavy ship is never going to dance. Build the hull, then check how much you need for proper dampening, cut down the rest. Thrusters are performance-eaters of the stupidest order.
    2E.) Rotors and Pistons.
    They are poison. Do not touch them. Ever. They are literally the worst parts of SE for big builds. Yes, they might help with the Physical Shapes Limit but frankly that has never worked in any of *my* tests on that subject and while i am fully aware that i'm probably just too dumb to do it properly i can't in good faith tell you to do something that i can't get right myself. Rotors and Pistons, in my experience, do very little but produce Clang. And Clang is something you do NOT want on a ship that's already taxing the physics engine.
    3.) Armor Blocks. Do as much with Armor Blocks as you possibly can. They have a superb optimization even if i can't wrap my head around what it actually did but i'm beyond asking for explanations now; after 5500 hours i have accepted that Armor Blocks are my friends and everything else is the enemy.
    4.) Uh... this is a bit embarassing for me because i'm not familiar with the ship in question but a quick google search told me it's supposed to be almost 500 meters long. Uh. You mentioned it being around 250 blocks in SE.
    A large grid cube in SE is 2,5 meters on every edge so a 250 block-long ship would be around 625 meters. *whiggles*

    5.) As for where these recommendations come from:

    [​IMG]

    1:1 Galaxy Class starships.

    Edit: only just saw this:

    Without having a mod list or seeing more of the ship's inside *this* is where my gut feelings tells me she's eating shapes. Amor Block mods are terrible for that.
     
  22. Kittenpants Trainee Engineer

    Messages:
    13
    @Commander Rotal
    Your Enterprise is gorgeous! I'd be very proud if I were you.

    First of all, you need to watch The Expanse. It's included with Amazon Prime, and it's easily the best space-based sci-fi on television. It's probably the only show ever to depict realistic space physics (no magic artificial gravity, no magic instant communication, acceleration G-force is a thing, people who've lived in space for generations not being able to tolerate the surface gravity of actual planets, etc.).
    Secondly, if people on this forum can't tell me anything I don't already know, I'm not too worried about getting kicked out for language.
    Thirdly, I appreciate your thoughtful reply.

    I know the "official" figure is about 2.5m per block, but I think they look more like 2m, and treating them as 2m each seemed to work out to everything looking much more proportionately accurate. I've attached a couple of reference images below, one a render of the Donnager as it appears in the show. The other is an example of how I'm using rotors. The engine cowl slides over the engine assembly like a sheath, and attaches at four equidistant points along the perimeter of the inner cowl. The rotor sits at the center of the four arms that attach to the cowl. I've tested this design extensively under thrust and haven't had any rotors blow up yet. In fact, once I made sure to lock the rotors, there was virtually no movement, even when I'd rapidly twist or pitch the ship (thanks to 20x X-large gyros). On the contrary, I tried separating and re-attaching the entire engine nacelle via rotor at one point, and they just bounced all over the place. But anyway, I think that people who're having issues with "clang" are either placing their rotors so that the directional forces acting upon it are not equal, they're placing it so that block from the two grids are contacting each other, or they're just not locking them.

    The next big trick will be seeing if rotors are adequate for mounting those two giant railguns on the port and starboard hard points.

    I've kind of accepted that I won't be able to fully build the interior, so I've been going through and simplifying the internal geometry as much as possible. Surprisingly, the mod armor blocks I'm using don't seem to be adding to the shape count any more than the vanilla blocks. I credit this to the quality of the mod (AQD - Armor Expansion). They're pretty much the only non-vanilla blocks I'll use because they work with the textures and they look like a professional extension of the vanilla geometry. The biggest culprits I'm finding for adding to the shape count are the semi-curved surfaces and areas where I've built raised armor "plates" on top of the hull with air gaps in between (probably because of all the shadow rendering associated with them. I've been going through and removing those gaps, and it's helping a lot.

    [​IMG]
    [​IMG]
     
  23. Malware Master Engineer

    Messages:
    9,833
    What they "look like" isn't really relevant. They really are 2.5m3. Everything else is scaled accordingly, including the player. What your head-canon is is none of our business, but when describing your ship to others, this is the figure they will use.

    So what if your version of the ship is larger though? If that made it easier to build, so be it. If it wasn't for that pesky limit that is. :p

    Shadows are rendering, not physics. You're breaking up the flat planes. By filling in the gaps you're getting more flat planes again, and thus less physics elements.

    A fairly surefire way to tell if an armor mod is "proper" armor or not is to see if they generate the armor edges in any way at all. If they don't, they probably aren't. If they do, they definitely are.
     
    • Agree Agree x 2
  24. Spaceman Spiff Senior Engineer

    Messages:
    1,871
    I'm confused. There are no "edges" on vanilla 2x1x1 base and/or tip armor, so is that armor not "proper"? (BTW, that's always bugged me.)
     
  25. Malware Master Engineer

    Messages:
    9,833
    @Spaceman Spiff Hence "probably aren't". Because some visual configurations can't have edges with the current implementation.

    Are you sure there are no edges though? Along the full edges on the actual gridlines? That's where you'll find them. Only 90 degrees and 45 degrees are supported for the edges, which is why, say, the halfblock, only has edges on one side.
     
  26. Spaceman Spiff Senior Engineer

    Messages:
    1,871
    It sure seems to me that if you can have them on the 45° planes on the 1x1x1 sloped blocks, then you should be able to have them on the 26.565° planes on the 2x1x1 half-blocks.
     
  27. Commander Rotal Master Engineer

    Messages:
    4,979
    I've said it before, i'll say it again; i don't care if we have Armor Edges or not but make them CONSISTENT. *rips out hair* Either all blocks have them or no blocks have them. Pick ONE, Keen ;_;
     
    • Agree Agree x 1
  28. Malware Master Engineer

    Messages:
    9,833
    @Spaceman Spiff It's a procedural system. Of course we can have that, but they'd have to change that system to accommodate for the odd positions and angles.
     
  29. Spaceman Spiff Senior Engineer

    Messages:
    1,871
    Preach it, Commander!! Amen to that!!
     
  30. Kittenpants Trainee Engineer

    Messages:
    13
    @Malware Here's a great example of why this is so confusing. In the images below, you can see where I turned a jagged surface into a flat surface. For some reason, even after re-loading, doing this increased the physical shape count. [​IMG]

    [​IMG]
     
Thread Status:
This last post in this thread was made more than 31 days old.