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.

Voxel Density

Discussion in 'General' started by Burstar, Sep 19, 2018.

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

    Messages:
    459
    The coding and ingenuity behind planets and asteroids in SE (and ME?) is quite impressive. The ability to randomly generate entire planets, have the mechanism easily modifiable, and the result actually look like one is just.... respect where it is due. I'm curious why voxels are so small though. I'm sure most, if not all, of us have seen the single voxel hovering in the way. It's so cute hovering there with the destructive power of a sun. I wonder if making the voxels larger would decrease memory and workload required, or is the detail loss too unsatisfactory?
     
  2. rexxar Senior Engineer

    Messages:
    1,530
    Planets are not random.
    Voxels are not small, they are 1m^3.
    Changing voxel size won't affect the little scraps that get left over.
    The tiny bits of voxel you're talking about are an artifact of the mesh system, afaik. It happens when multiple neighboring voxels have a very small amount of material, while the voxels around them have none. It's probably fixable, but I'm not really familiar with the voxel system on that level.
     
  3. Burstar Apprentice Engineer

    Messages:
    459
    Is there a difference between Voxels and Voxcells? SE Toolbox shows there are 255 Voxcells/m^3

    'random' is a lot easier to say than 'uses an algorithm, the results of which are reproducible yet cannot be predicted ahead of time by the user'. Thanks for clarifying.
     
  4. Malware Master Engineer

    Messages:
    9,599
    Planets use a heightmap, not a procedural function. Even ore placements are based on a map. I mean, they could be, but they've chosen not to. They originally tried actual randomly generated planets, it's the first they tried but the results were... bland. As for the voxel size, they have adjusted them during the lifetime of the game.
     
  5. Burstar Apprentice Engineer

    Messages:
    459
    There is a seed prompt when placing planets. What does this do?
     
  6. Malware Master Engineer

    Messages:
    9,599
    I don't know for sure, I'm sorry. I'm pretty certain it's used for tree placement and probably also the planetary rocks. Maybe @rexxar knows what else it might be used for.
     
  7. rexxar Senior Engineer

    Messages:
    1,530
    Biomes, elevation, ore deposits, voxel materials are all pre-set in the planet's definition files (heightmaps). The seed appears to be legacy, from when Keen originally experimented with procedural planets. It isn't used internally. I don't really have the time to hunt down the tree and rock spawning code, but I imagine it's random based on some fixed seed, or just using the system's random seed.

    Voxel cells have an 8 bit fill ratio (0-255). This tells the engine how much material is in the cell, which it then uses in conjunction with neighboring cells to generate the visible surface mesh. They are still 1m^3 in volume. The cell also has another 8 bit value which represents the material type present in the cell.
     
  8. Burstar Apprentice Engineer

    Messages:
    459
    Ok, thanks again for the clarification guys.

    Not gonna lie, it's a little disappointing though.
     
  9. AlfieUK4 Trainee Engineer

    Messages:
    65
    The major features on planets are pre-set through the planet data files/channels, but aren't the minor features (sub-20m variations) in terrain procedural? Might be used for that.
     
  10. rexxar Senior Engineer

    Messages:
    1,530
    No. The seed is not used at all in the code.
     
Thread Status:
This last post in this thread was made more than 31 days old.