Partial Lighting (Light when source is covered by slab or wedge)

    Edymnion

    Carebear Extraordinaire!
    Joined
    Mar 18, 2015
    Messages
    2,709
    Reaction score
    1,512
    • Purchased!
    • Thinking Positive Gold
    • Legacy Citizen 5
    Might be trickier than it sounds, seeing as how you would need to have the light source determine if the block covering it was a wedge/slab/etc, and then determine it's facing, but...

    ...I'd like to see light sources (crystals, light cubes, etc) still give some amount of light even when covered by another block.

    Example, set a light/crystal in a wall, cover all but one side. Put a wedge on it sideways so that you can still see half the light. It will currently give no light to the room because it is reading the surface as being completely covered by the wedge, even though you can see half the light. Same for wedges, if you put a half wedge on top of it, or even a quarter wedge, you get zero light.

    I'd like to be able to use light sources along with wedges to create things like recessed lighting tracks, or use wedges to make diamond shaped lights.

    Would likely require a complete lighting overhaul though, as you'd either have to check the surrounding blocks and modify light based off of that, or find a way to have the lighting engine check to see if a facet of the light source is being drawn, and then generate light based on that.

    Doesn't even have to be scaled light, I would be just as happy with a full light source effect from a partially covered light.
     
    • Like
    Reactions: Lone_Puppy

    Lukwan

    Human
    Joined
    Oct 30, 2015
    Messages
    691
    Reaction score
    254
    I want scaled light.

    Variable light levels will be the most effective way to give designers more control over color. There are a very limited number of colors available in armour and decoration and the palette will not increase much over time.

    Blending new color-tones can be done by mixing light levels (just like mixing paint only with different primaries). Palette expanded! (y)
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    Right now, light sources (not to be confused with light blocks) are probably handled like regular blocks by the game. That is to say, based on the way the game behaves right now, every light block probably spawns 6 light sources in the voxel spaces all around its faces. Of course, if the voxel space is already occupied by another block, the light source is not spawned.

    For the case of partial coverage, the game will probably need to check the bounding box of any adjoining block. Assuming that angled blocks do not have full cube bounding boxes, the game could check each of four points-in-space equidistant around the original light source point, at diagonal directions. When one point is found to not intersect with the bounding box, the light source is spawned in that slightly-offset position.

    This creates a problem with corner and the smaller "Tetra?" blocks: a point might not intersect the bounding box, but logically, the light should not show up there. So a second "bounding box" would have to be calculated by extruding the polygon (on the angled block that touches the light block) all the way out to the other side of the angled block, effectively creating a wedge bounding box. So now the offset light sources need to not only avoid intersections with the original bounding box, but they also need to avoid intersections with this mathematical wedge in order to qualify as a valid light source.

    If you can implement this in the game's back end, then you can easily identify these offset light sources, and give them a dimmer light value, so that they end up "looking right" in game, as in half-intensity or one-third intensity.
     

    TheGT

    Chief Janitorial, Second Legion, Fourth Squadron
    Joined
    Dec 10, 2015
    Messages
    60
    Reaction score
    25
    Just to add something somewhat related, an engine or beacon with a slabs/transparent blocks and such placed over them should still give off a flare, provided that the slab is not completely covering the engine.