Does height region 1 need to be different?

Discussion in 'Khas Scripts' started by Kes, Aug 22, 2015.

Thread Status:
Not open for further replies.
  1. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,110
    Likes Received:
    10,722
    First Language:
    English
    Primarily Uses:
    RMVXA
    If I have understood correctly, the region which is set determines the shadow that is thrown in an undifferentiated way.

    However, I think region 1 needs to be different for the following reason.

    Take, for example, a small cupboard, table or sideboard next to a window. It's going to be region 1 as that is its height.  Clearly it needs to throw a shadow - but the top surface of the object needs to be lit as the light will be falling on to it from a greater height if the window is a normal one.

    Perhaps there is already a cunning way of achieving this which I haven't noticed.  If so, great.  If not, is there any way to have this effect?
     
    #1
  2. Khas

    Khas Detective lv73 Veteran

    Messages:
    282
    Likes Received:
    374
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Regions are employed to declare the floor's height, so the system can cast shadows accordingly. But please note that shadows on this engine are a simplification of the real situation - I've tested several methods and ways of casting shadows and the implemented one is the best without sacrificing performance. In order to do more complex things (such object shadows), I would need a Z Buffer (a buffer that stores height data), but processing it on the CPU would cost too much performance.

    I've been studying ways of casting object and character shadows without a Z Buffer, but I haven't figured out a good algorithm yet. I may find it, but it can take some time (for instance, it took me 10 months to make the KGL as fast as it is today).
     
    Last edited by a moderator: Aug 22, 2015
    #2
  3. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,110
    Likes Received:
    10,722
    First Language:
    English
    Primarily Uses:
    RMVXA
    Okay, I understand your difficulty.  All I need do, in that case, is edit some tiles so that they have a new, suitable, shadow already attached to them and simply not give them a region.  There will be a shadow, and the top will be lit.  That seems easier than you searching round for an obscure algorithm.

    Thanks anyway.
     
    #3
    Khas likes this.
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,703
    Likes Received:
    6,600
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
     
    #4
Thread Status:
Not open for further replies.

Share This Page