Large and XL blocks to streamline ray tracing

    diremage

    Tech Wizard
    Joined
    Oct 26, 2016
    Messages
    93
    Reaction score
    53
    Will put this up here since I think it's probably a good idea, if a little off topic. For distant/low LOD, just treat each chunk as one vertice. You could pre-calculate the average color and possibly shape (solid, empty, wedge) of the chunk faces if you bake it when the ship is being built.

    So, I don't actually know how Starmade handles the crunchy bits of graphics rendering. But I -do- know that more blocks = more lag, even if the blocks are completely hidden behind other blocks.

    So since more blocks = more lag, what if we could build the same ships with fewer blocks?

    Basically, I propose that "fill" blocks, such as shield cap, shield regen, power cap, power regen, and so on, have a 3x3x3 cube size (Large version) which is 30 times more efficient and weighs 30 times more than a standard block (the 10% additional efficiency will incentivize use even when players do not consider lag effects) which takes 35 standard blocks to produce; and a 5x5x5 block size (XL) which is 140x more efficient and weighs 140 times more than a standard block, and takes 150 standard blocks to produce.

    A major disadvantage of these systems would be that if you shoot and kill this one block, you take out a relatively large portion of a system -- even a laser can kill 140 blocks at a time if you use these systems, BUT large shipbuilders will likely consider the additional efficiencies worth the additional risk most of the time.

    I can't speak for anyone else, but I would be excited to be able to look at a big ship and get more than 1 frame per second.
     
    Last edited:

    jontyfreack

    Pipe-God-Emperor of starmade
    Joined
    Nov 29, 2013
    Messages
    603
    Reaction score
    773
    • Legacy Citizen 9
    • Community Content - Silver 2
    No.
    Why? because reasons involving voxel sizes and also lag. More blocks does not mean more lag, more faces and vertices means more lag(and other things regarding more entities and also chunks being loaded and if you are on multiplayer because normally on an average server ships over 500k mass start to cause lag because of the size) and you will notice that an extremely highly detailed ship will lag more than a ship of the same size that is just a box. larger blocks are possible because schema schemaness, however I would assume that a block that 3x3x3 would have to have 3x3x3 voxel things to place blocks on, so the benefits of a larger block would be lost.*

    Basically number of blocks doesn't really cause lag apart from on large things, its the amount of faces that causes lag, and when the chunks are being loaded in.

    also by the way if you completely fill in a large ship hull you will notice a higher framerate because less faces are being rendered, so if you ever find trouble when building a large ship with some complex shapes use some system blocks to "block" up the inside of the hull to lower the amount of faces that will be rendered.

    What I am trying to say is that larger blocks have no benefit really and so are not needed nor desired by the great grey cat god.

    *as you can tell I am no expert on this subject and I suggest someone with adequate knowledge comment on this because after all, all I do is either build the largest and most detailed bridge in starmade or spend 2 hours docking 300 fighters together
     
    Joined
    Sep 12, 2014
    Messages
    90
    Reaction score
    44
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen 4
    Disclaimer: What I'm about to say may be completely off base and wrong, however, based on what I think was said in the June 6th Dev Blog, algorithms will eventually be applied to blocks' faces to merge them together, thus cutting down on the number of faces that need to be rendered. If this is true, then something like a 3x3 system block, or a 3x3 any other kind of block, would be pointless, and limit further optimization opportunities in this area.
     

    diremage

    Tech Wizard
    Joined
    Oct 26, 2016
    Messages
    93
    Reaction score
    53
    Thanks for pointing me to that dev blog! It was very informative. And it suggests to me that perhaps the direction Schine would want to go is towards "baking" a ship to optimize graphics and collision detection, where a completed ship has its surfaces "baked" into a more optimized form that then doesn't change until the surface of the ship changes (either through construction or damage). You can see a form of this process now when you link blocks with the new linking visual.

    I don't know the fine details of Starmade's graphics rendering and I don't pretend to be a specialist in that particular field of software engineering, but we are all arguing out of ignorance here. IF large blocks produce a performance improvement, which they could for reasons ranging from RAM to vertices and collision handling to ray tracing and damage calculations, IF they are worth the effort, THEN I propose that we adopt them.

    Setting aside the hypothetical crunchy nay-saying, can anyone actually see any gameplay/balance issues with this? That is the question players probably ARE qualified to answer.

    jontyfreack a big advantage of XL gear is that the volume increases faster than the surface area. A 3x3x3 block has 9*6 = 54 surface area but 27 volume (compared to the possible 162 surface area of 27 individual cubes), and this can even be optimized down to 6 surface area. A 5x5x5 block has a surface area of 150 and a volume of 125, compared to a surface area of 750 for 125 individual units. I understand that blocks that are adjacent to another block already don't render that face, but a large block even eliminates that adjacency calculation.

    Wonder if Starmade does chunk culling? You could save a lot of resource calls if you figure out that an entire chunk is occluded and stop it from even loading.
     
    Last edited:
    Joined
    Jun 24, 2015
    Messages
    385
    Reaction score
    59
    diremage said:
    Wonder if Starmade does chunk culling? You could save a lot of resource calls if you figure out that an entire chunk is occluded and stop it from even loading.
    StarMade actually cannot make use of Chunk Culling, largely due to the chunk needing to be loaded in order for it's blocks to do whatever it is they do.

    Example: power, I can and have built criss-crossing power arrays inside a single chunk, and then completely blocked that chunk from view. (both internal and external) on that particular ship, it was literally all of the ship's power.

    "culling" that chunk because it isn't visible, would result in a drifting hulk with 1e per second, instead of the 80k e per second it needs to function.
     

    diremage

    Tech Wizard
    Joined
    Oct 26, 2016
    Messages
    93
    Reaction score
    53
    Sounds like another reason to bake ships when you're done building them and before you've started destroying them.

    Regardless, your client surely doesn't need to load chunks for a ship you aren't even flying that are occluded.