Avorion

Avorion

View Stats:
riteclick Oct 2, 2022 @ 5:33pm
Block Count and Performance
Obviously having to render more blocks is more taxing on performance, but to what degree is that still true when they are hidden in a compartment?

For example, back when block stacking was the meta, I would build a big box for the internals and have 15,000 blocks inside it, sealed away. I don't recall it affecting performance but that was a while ago. I currently get massive fps spikes during large battles in sectors with stations (as one might expect) but I suspect that's mostly particles and physics calculations more than block count by itself.

I tried testing whether the 15,000 block ship made a difference, but my results were mixed and inconclusive. Does anyone know if it's exclusively the rendering/physics calcs, or if block count itself, when hidden and not wreckage, makes a difference?

Related question: I've heard people saying the opposite for engines, that having one large engine block is terrible for performance. True? If so, why?

Thanks in advance!
< >
Showing 1-11 of 11 comments
rickcarson Oct 3, 2022 @ 1:15am 
I tried making 'power blocks' - e.g. six walls surrounding a massive number of tiny solar panels. Even something as small as a template with 10x10x10 (total panels, not meters - e.g. 1000 tiny cubes inside a normal size cube - would be really difficult to place onto the existing design, and performance would suffer.

So I think that the engine still has to take them into account - even if they're _technically_ hidden.
Valck Oct 3, 2022 @ 1:50am 
Originally posted by riteclick:
I've heard people saying the opposite for engines, that having one large engine block is terrible for performance. True? If so, why?
I have no doubt it is true, people say the weirdest stuff all the time, especially on the internet. Why? I have no idea, maybe they truly believe what they say, maybe they want to pull one over you, or just talk to someone, anyone, at all...

Originally posted by rickcarson:
I tried making 'power blocks' - e.g. six walls surrounding a massive number of tiny solar panels. Even something as small as a template with 10x10x10 (total panels, not meters - e.g. 1000 tiny cubes inside a normal size cube - would be really difficult to place onto the existing design, and performance would suffer.

So I think that the engine still has to take them into account - even if they're _technically_ hidden.
What do you expect, of course it has to account for every block, not only to check if it is hidden, but also to calculate the effects it has on stats and physics, and every time the ship gets hit, needs to check for blocks breaking off and blocks attached to these blocks, and blocks attached to the blocks attached to these blocks.
"Something as small as 10x10x10" doesn't matter, if it's one cube it's easy to account for,
let's say it takes 1/1000th of a frame. Now Mr Brilliant comes along and splits that into a thousand cubes of the same total volume, and suddenly the game has to do the same amount of work *for each and every one of these thousand* cubes, *plus more* to check the connections among all of them, and you've lost not one frame per second, but possibly quite a few more.
riteclick Oct 3, 2022 @ 12:46pm 
Originally posted by Valck:
Originally posted by riteclick:
I've heard people saying the opposite for engines, that having one large engine block is terrible for performance. True? If so, why?
I have no doubt it is true, people say the weirdest stuff all the time, especially on the internet. Why? I have no idea, maybe they truly believe what they say, maybe they want to pull one over you, or just talk to someone, anyone, at all...

Originally posted by rickcarson:
I tried making 'power blocks' - e.g. six walls surrounding a massive number of tiny solar panels. Even something as small as a template with 10x10x10 (total panels, not meters - e.g. 1000 tiny cubes inside a normal size cube - would be really difficult to place onto the existing design, and performance would suffer.

So I think that the engine still has to take them into account - even if they're _technically_ hidden.
What do you expect, of course it has to account for every block, not only to check if it is hidden, but also to calculate the effects it has on stats and physics, and every time the ship gets hit, needs to check for blocks breaking off and blocks attached to these blocks, and blocks attached to the blocks attached to these blocks.
"Something as small as 10x10x10" doesn't matter, if it's one cube it's easy to account for,
let's say it takes 1/1000th of a frame. Now Mr Brilliant comes along and splits that into a thousand cubes of the same total volume, and suddenly the game has to do the same amount of work *for each and every one of these thousand* cubes, *plus more* to check the connections among all of them, and you've lost not one frame per second, but possibly quite a few more.


Thanks for the response. I've thought about that, but surely the game wouldn't make that check every step/frame. That would be terribly optimized, no? I would suspect it only does so when there's a change, e.g. building, removing, or destroying blocks.
When I copy/paste a template with thousands of blocks, the game struggles at 2 fps. It gets a little better after placing it. But once I seal it away in the box, it appears to be fine again.
riteclick Oct 3, 2022 @ 12:51pm 
Originally posted by rickcarson:
I tried making 'power blocks' - e.g. six walls surrounding a massive number of tiny solar panels. Even something as small as a template with 10x10x10 (total panels, not meters - e.g. 1000 tiny cubes inside a normal size cube - would be really difficult to place onto the existing design, and performance would suffer.

So I think that the engine still has to take them into account - even if they're _technically_ hidden.

Yeah same experience here. But after it's placed, my fps jumps back to normal. In my experience, when not building, when just flying around doing Avorion stuff, it's difficult to tell a difference between a 100 block ship and the same ship but with 20,000 blocks inside a box. But I'm not sure if there's other elements I'm not accounting for, load times, etc.
Valck Oct 3, 2022 @ 3:13pm 
Originally posted by riteclick:
Thanks for the response. I've thought about that, but surely the game wouldn't make that check every step/frame. That would be terribly optimized, no? I would suspect it only does so when there's a change, e.g. building, removing, or destroying blocks.
When I copy/paste a template with thousands of blocks, the game struggles at 2 fps. It gets a little better after placing it. But once I seal it away in the box, it appears to be fine again.
It might not even be so bad if you're flying in deep space in single player, but I'd think as soon as something comes within a certain distance, more and more checks need to be performed, maybe just a bounding box or sphere at first, followed by more precise checks between different elements of different ships, and finally even more checks when it is likely collisions or projectile impacts might happen.
All of that is pure conjecture, I have no idea how it's actually handled internally. Would be interesting to hear from the horse's mouth directly.
I might even *shudders at the mere thought of it* subject myself to a "VOD" for that. Wow that feels painful, yuck. No, I don't think I would, not even for such a gem of wisdom.
riteclick Oct 4, 2022 @ 6:18pm 
Originally posted by Valck:
Originally posted by riteclick:
Thanks for the response. I've thought about that, but surely the game wouldn't make that check every step/frame. That would be terribly optimized, no? I would suspect it only does so when there's a change, e.g. building, removing, or destroying blocks.
When I copy/paste a template with thousands of blocks, the game struggles at 2 fps. It gets a little better after placing it. But once I seal it away in the box, it appears to be fine again.
It might not even be so bad if you're flying in deep space in single player, but I'd think as soon as something comes within a certain distance, more and more checks need to be performed, maybe just a bounding box or sphere at first, followed by more precise checks between different elements of different ships, and finally even more checks when it is likely collisions or projectile impacts might happen.
All of that is pure conjecture, I have no idea how it's actually handled internally. Would be interesting to hear from the horse's mouth directly.
I might even *shudders at the mere thought of it* subject myself to a "VOD" for that. Wow that feels painful, yuck. No, I don't think I would, not even for such a gem of wisdom.

lmao I might, in the name of science.

If like I was kinda drunk. And none of my friends found out about it. xD

My uneducated conjecture would be that blocks are only treated as separate entities when detached from the ship or doing damage calculations, and are otherwise only aesthetic, and that their physics properties are saved to the ship upon building. The fact you can stack thrusters and engines internally without issue leads me to think it's not the individual blocks acting on the other blocks of the ship.
Icheras [Ger] Oct 5, 2022 @ 10:24am 
I did a test, in neutral situations the game handles 30k solar pannels fine (regardless if visable or not), I did not do a combat test with that specific setup but i can tell from an earlier test that any block destruction will be noticeable (you can simulate it with adding/removing block in the editor as lower bound on impact). The main slowdown in the editor with large templates is due to the game constantly calculating the "new" stats the ship would have after the template gets placed.
Given that all these solar panels have 0 health any damage to that block (past protection %-tage) will cause performance issue (especially since you'll probably lose multiple panels at once).

In regards to "hiding" it, there doesn't seem to be an slowdown due to rendering (though some render errors do appear), but just due to client calculation.
In general I still wouldn't use them over generators (despite their significantly better output) simply because combat is more than 90% of the game and is the time where slow down hurts the most.
riteclick Oct 5, 2022 @ 8:28pm 
Originally posted by Icheras Ger:
I did a test, in neutral situations the game handles 30k solar pannels fine (regardless if visable or not), I did not do a combat test with that specific setup but i can tell from an earlier test that any block destruction will be noticeable (you can simulate it with adding/removing block in the editor as lower bound on impact). The main slowdown in the editor with large templates is due to the game constantly calculating the "new" stats the ship would have after the template gets placed.
Given that all these solar panels have 0 health any damage to that block (past protection %-tage) will cause performance issue (especially since you'll probably lose multiple panels at once).

In regards to "hiding" it, there doesn't seem to be an slowdown due to rendering (though some render errors do appear), but just due to client calculation.
In general I still wouldn't use them over generators (despite their significantly better output) simply because combat is more than 90% of the game and is the time where slow down hurts the most.

Thank you for your test and thorough input, I appreciate your time!
I've never had a solar panel take any damage or get destroyed, as they're behind many other blocks and armor. And I basically never let my shield drop. I think the particles from so many different turrets in a big battle is probably the main contributor to my slow down. But I'm sure a few thousand blocks under the hood isn't exactly helping
Schakar Oct 6, 2022 @ 3:36pm 
Originally posted by riteclick:
Related question: I've heard people saying the opposite for engines, that having one large engine block is terrible for performance. True? If so, why?
The only reason I can imagin is the glow-effect of this one big engine depending on your GPU and driver. Glow and Fog both requier alot of GPU power in general.

For playability I just can tell you: don't build to many to small blocks as they will be destroyed to fast ;). And it sucks if you have to visit a repair dock after each confrontation.

That's why many Workshop ships look nice ... but aren't realy useble in game. Any block smaller then 1x1x1 is a dead block.
Last edited by Schakar; Oct 6, 2022 @ 3:38pm
riteclick Oct 7, 2022 @ 12:11pm 
Originally posted by Schakar:
Originally posted by riteclick:
Related question: I've heard people saying the opposite for engines, that having one large engine block is terrible for performance. True? If so, why?
The only reason I can imagin is the glow-effect of this one big engine depending on your GPU and driver. Glow and Fog both requier alot of GPU power in general.

For playability I just can tell you: don't build to many to small blocks as they will be destroyed to fast ;). And it sucks if you have to visit a repair dock after each confrontation.

That's why many Workshop ships look nice ... but aren't realy useble in game. Any block smaller then 1x1x1 is a dead block.

Fair point about the glow. Maybe I'll cover up my glowing butt xD
Schakar Oct 7, 2022 @ 4:33pm 
Originally posted by riteclick:
Originally posted by Schakar:
The only reason I can imagin is the glow-effect of this one big engine depending on your GPU and driver. Glow and Fog both requier alot of GPU power in general.

For playability I just can tell you: don't build to many to small blocks as they will be destroyed to fast ;). And it sucks if you have to visit a repair dock after each confrontation.

That's why many Workshop ships look nice ... but aren't realy useble in game. Any block smaller then 1x1x1 is a dead block.

Fair point about the glow. Maybe I'll cover up my glowing butt xD
Might not work as the game/engine still calculates the glow even if you don't see it any more.

But if you hide it ... just make several smaler engines and hide them ;). For example instead of 1 big 20x20x50 some 5x5x50. The glow will be much smaler and so less GPU hungry. But don't get insane with all over 0.5x0.5x50 engines as this might flip to the other end of bad-performance *g*.
With some "fake" Engines you then can decorate (some 2x2x0.5 or 4x4x0.5).
Last edited by Schakar; Oct 7, 2022 @ 4:36pm
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: Oct 2, 2022 @ 5:33pm
Posts: 11