Khas Advanced Lighting v4.2 Ultra (now with real-time shadows!)

Discussion in 'JS Plugin Releases (RMMV)' started by Khas, Apr 22, 2017.

    Tags:
  1. DavidFoxfire

    DavidFoxfire Veteran Veteran

    Messages:
    224
    Likes Received:
    44
    Location:
    St. Louis, MO
    That woudl work perfectly. SInce I'm goign to be needing 0-19 for plugins, placement of random encounters and the like.
     
  2. Kilitar

    Kilitar Veteran Veteran

    Messages:
    141
    Likes Received:
    41
    First Language:
    czech
    Primarily Uses:
    RMMV
    Hello @Khas
    Not sure if it is intended behaviour or bug (hope it is bug and will be solved :) )
    If I use combination of comment tags:
    [light blue]
    [light_size 480]

    Ligh size works.

    If I use:
    [light blue]
    [light_size 480]
    [light_shadows off]

    then light size is ignored (and ligh is in original image size)

    Thank you for answer.
     
  3. Phinx

    Phinx Villager Member

    Messages:
    12
    Likes Received:
    4
    First Language:
    German
    @Nicke Thanks, I was afraid I had to abandon another lighting plugin because the creator no longer supports it.
    That fixed it perfectly.
     
  4. Nguyen Phan Vy

    Nguyen Phan Vy Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    English
    upload_2017-9-13_10-53-12.png
    It happened a few problems, when i use QuasiMovent, you can fix it ?
     
  5. Tuomo L

    Tuomo L Oldbie Veteran

    Messages:
    2,292
    Likes Received:
    1,267
    Location:
    Finland!
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    Help, I can't update the lightning script without it breaking my game. I can't update to 1.5.1 without it breaking the lightning script.

    TypeError: Cannot read property 'length' of undefined
    at WebGLState.setBlendMode (pixi.js:18126)
    at SpriteRenderer.flush (pixi.js:22163)
    at WebGLRenderer.render (pixi.js:17529)
    at Khas_Lighting.update (/E:/Enterbrain/MV/Strangers%20of%20Power/js/plugins/KhasAdvancedLighting.js:923)
    at Khas_Graphics.updateScene [as khs_updateScene] (/E:/Enterbrain/MV/Strangers%20of%20Power/js/plugins/KhasAdvancedLighting.js:883)
    at Khas_Graphics.updateScene (/E:/Enterbrain/MV/Strangers%20of%20Power/js/plugins/KhasHintSystem.js:302)
    at Spriteset_Map.updateKhasGraphics (/E:/Enterbrain/MV/Strangers%20of%20Power/js/plugins/KhasGraphics.js:145)
    at Spriteset_Map.update (/E:/Enterbrain/MV/Strangers%20of%20Power/js/plugins/KhasGraphics.js:135)
    at Spriteset_Map.Spriteset_Base.initialize (rpg_sprites.js:2127)
    at Spriteset_Map.initialize (rpg_sprites.js:2257)
     
  6. dragon1up

    dragon1up Veteran Veteran

    Messages:
    69
    Likes Received:
    7
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Just updated to 1.5.1 but yeah everything works except the fog plug-in and lighting plug-in sadly.
     
  7. fizzly

    fizzly Veteran Veteran

    Messages:
    412
    Likes Received:
    292
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    N/A
    @Khas I'm not sure, but I think I found a bug. I'm using Orange Time System by @Hudell and when I'm inside buildings (inside switch or tileset in orange time's script) lights are not working anymore - they are gone. I also have Orange Time System Compatibility JS.
     
  8. Khas

    Khas Detective lv73 Veteran

    Messages:
    282
    Likes Received:
    374
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Hey everyone, thanks for your patience! I'm aware of the 1.5.1 update problem (@Kirika @GameFire @DavidFoxfire @Tuomo L @dragon1up )and I'll deliver an update soon. It's just that I'm super busy with college stuff, so you may have to wait a few weeks. Meanwhile you can use the solution @Nicke proposed (click here!).

    Please note that I'll stop supporting my plugins soon, but I'll still be around for some time to make sure they do not have any critical bug and to help those who are using them.



    @dragon1up perhaps this is an incompatibility issue with other plugins (it seems you're using a lot of graphic plugins). But I can't know what is wrong from what you provided, so can you send me a demo with the problems being reproduced?

    @Cloned yes!

    @Kilitar great! I'm happy to hear it worked.

    Regarding the light_size/light_shadows issue, I guess it's a bug, so I'll take a closer look at this soon. Other user reported this as well.

    @Kirika I meant there's no standard way to do that, unless you implement it yourself :)
    Where precisely does the size command does not work? When do you call it?

    @Parallax Panda these spikes you're experiencing sound like memory leakage. However, I did keep this in mind while I developed my plugins and I did several tests (very performance intensive tests) and nothing showed up. Perhaps it's a Pixi thing, as it likes to behave unexpectedly. Maybe you could open Window's task manager and keep an eye on memory while playing.

    Unfortunately this is a single case and I don't have many information in order to fix it. I would need to have profile data and mess around a lot until I find what is wrong.


    The master demo has been gone for awhile, so there's only the demos for each script (you can find the files on each folder in the download link).

    Regarding the minimum requirements, I perfectly understand your request, but it's something that I can't do. My plugins are used by a lot of developers, each one with different plugins, scenes and mechanics, each one with different performance requirements. The only thing I can do is to make my plugins as lightweight as possible, but I can't say they require this or that hardware to run smoothly. Even if you take 2 games with the exact same plugins and maps, if one has different lighting on a given scene, the requirements may differ as well.

    @fizzly I'll take a look into that.
     
  9. padr81

    padr81 Guy whose game is taking too long. Veteran

    Messages:
    642
    Likes Received:
    640
    First Language:
    english
    Primarily Uses:
    N/A
    @Khas Is it possible to offset the player light ? I use taller sprite and would like to offset the player lights by about 48 pixels. is this possible.
     
  10. Kirika

    Kirika Villager Member

    Messages:
    23
    Likes Received:
    1
    First Language:
    na
    Primarily Uses:
    N/A
    @Khas in script when i identify lights - i.e.:
    halogen_big: {
    fileName: "halogen",
    intensity: 100, variation: 0, size: 180,
    offset_x: 0, offset_y: 0
    },
    parameter size do nothing.
     
  11. DarthSarlos

    DarthSarlos Villager Member

    Messages:
    25
    Likes Received:
    0
    First Language:
    German
    Will you be trying to make it compatible to (Quasi's/Quxios') pixel movement before you stop supporting this plugin?

    The lights work just fine, but if you try to use one as a lantern it crashes like @Nguyen Phan Vy s screenshot shows.
     
  12. HasdrubalBarca

    HasdrubalBarca Veteran Veteran

    Messages:
    160
    Likes Received:
    56
    First Language:
    English
    The non-shadow version works fine with Quxios pixel movement.
     
  13. dragon1up

    dragon1up Veteran Veteran

    Messages:
    69
    Likes Received:
    7
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Currently did a test with MV 1.4.0 and still get blank screens on a few maps with only the following plug-ins in usage.

    Khas core
    Khas Graphics
    Khas Advanced Fog
    Khas Advanced Lighting 3.1 /Ultra

    On/Off of MOG plug-ins


    Mog time
    Mog weather
    Mog time system hud

    Then tried a blank project with just the Khas things, is there something that I have done wrong ?

    Still has blank screens that show up when using the menu on certain maps. Don't exactly like the idea of having to remake maps from scratch though.

    Which just had the following plug-ins : Khas ones in this order with made with MV on top turned off.

    Khas core 2.0
    Khas Graphics 1.1
    Khas Advanced Fog 3.0
    Khas Advanced lighting 3.1/Ultra
     
  14. monkeyintartan

    monkeyintartan TartanMonkey Veteran

    Messages:
    195
    Likes Received:
    121
    Location:
    Stockport
    First Language:
    english
    HI

    Love this plugin it is amazing !!!! Quick question. Can you change an individual lights intensity int the comments like you can the size ?
     
  15. Roult

    Roult Villager Member

    Messages:
    19
    Likes Received:
    1
    Hi' everyone, and in advance sorry for my english.

    I really love this Plugin and i thanks Khas for this (And for the script of VX ACE).

    I have a problem when i create a shadows for a stones walls, below is good but when i walk above these walls, the shadows is not natural.

    Somebody has a solution?

    Thanks you.
     

    Attached Files:

  16. Kilitar

    Kilitar Veteran Veteran

    Messages:
    141
    Likes Received:
    41
    First Language:
    czech
    Primarily Uses:
    RMMV

    Because you understand shadow logic wrong. I see 2 basic mistakes. Because light is blocked based on TILES DIFFERENCE. You have tile without tag - so floor 0, and then 25 (2 floors above 0) and 20 (also 2 floors above zero).
    You needs to terrain tag every tile on floor except lowest one by appropriate terrain tag to have natural shadows. You simply must TAG all tiles on floor, not only "borders".
    On dark image you standing on Floor 0 (not tagged) and of course light on tagged floor 2 (25) is "Light blocker".
    XXX.JPG


    You should have 0-9 for lake level as floor 0 etc up to 60-69 for house roof
    check bellow
    Region.png
     
    Khas likes this.
  17. JamesRyan

    JamesRyan Game Designer Veteran

    Messages:
    590
    Likes Received:
    186
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMMV
    Hi, Khas!
    I used your Awesome Lighting on Ace back then, and now i'm really excited that you have brought it to MV. I'm gonna buy a license for it to use for my commercial game soon. However, could you please make it compatible with MOG Time System (https://atelierrgss.wordpress.com/rmv-time-system/)? I would love to see the screen gets darkened by gradually decreasing Ambient Light value from day to night and vice versa.
    I have tried to use a parallel common event to check time and change Ambient Light accordingly, but there was a noticable moment during each time Ambient Light changed and it also slightly decreased my performance, as i also had some other parallel common events. I will be very gratefuly for this.
     
  18. Roult

    Roult Villager Member

    Messages:
    19
    Likes Received:
    1
    Thanks you Kilitar for your help, it's works.


    Hello JamesRyan, I use Khas Light and MOG Time system (and weather ex) plugin too, i had made a event with switch condition.
    During the change of Ambiant Light, i have 29FPS continuously. How many FPS has you?
     

    Attached Files:

  19. JamesRyan

    JamesRyan Game Designer Veteran

    Messages:
    590
    Likes Received:
    186
    Location:
    Vietnam
    First Language:
    Vietnamese
    Primarily Uses:
    RMMV
    The framerate is not really stable. It stutters sometimes (not really much just about 2 to 4 fps drop but i'm kind of a fastidious player :cutesmile:). That's why i only said "slightly". However, i think it will be a problem in a huge map with many lights (though i tested on a small map). Is version 3.1 more light-weight?
    Btw, i did even change Ambient Light every 15 minutes in my common events (with every single value changed, like from 100 to 96 in an hour), but it still did not look smooth enough. Do you have another way to make the screen change smoothly?
     
  20. Khas

    Khas Detective lv73 Veteran

    Messages:
    282
    Likes Received:
    374
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Thanks for your patience, everyone! The plugin has been updated to fix bugs.

    Please note that no feature will be added in possible future updates besides bug fixes.

    Version 3.1 was updated to 3.2.
    Version 4.0 was updated to 4.2 (so version 3 and 4 have the same minor version number).



    @padr81 yes! You will need to add a custom light and change its offset in its declaration.

    @Kirika fixed!

    @DarthSarlos @Nguyen Phan Vy @HasdrubalBarca I have no intentions of making this plugin compatible with crashes made by 3rd party plugins. That being said, you may manually edit the plugin and see if it works.

    Search for:
    Game_Map.prototype.getHeight = function(x, y) {
    return this.isValid(x, y) ? this._heightMap[x][y] : null;
    };


    Replace by this:
    Game_Map.prototype.getHeight = function(x, y) {
    x = Math.round(x);
    y = Math.round(y);
    return this.isValid(x, y) ? this._heightMap[x][y] : null;
    };


    @dragon1up let me see if I understood it correctly. If you create a fresh project, things work well. However, if you disable all the plugins (except mine) in your project, the error persists?

    I would need a demo to take a look into this problem. There's nothing much I can do without testing it.

    @monkeyintartan nope, you need to create your custom lights for that :)

    @Kilitar thanks for your help :)

    @JamesRyan I'm glad you like it! Regarding your request, I won't do it, I'm sorry. A lot of people ask me to make my plugin compatible with some time systems, but I feel the users are responsible to implement that kind of logic. After all, my plugin has nothing related to time control, so why should I add such thing? There's an add-on for compatibility with the Orange Time System in my Mega shared folder, if you want to take a look.

    Regarding performance, version 4 is intensive, and version 3 is lightweight (it outperforms any other lighting plugin for MV). And about smooth transitions, the best way would be to implement a smoother interpolation (currently I'm doing linear interpolation), but this would require a bit of knowledge.
     

Share This Page