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

DavidFoxfire

Veteran
Veteran
Joined
Feb 28, 2014
Messages
224
Reaction score
44
Primarily Uses
That woudl work perfectly. SInce I'm goign to be needing 0-19 for plugins, placement of random encounters and the like.
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
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.
 

Phinx

Villager
Member
Joined
Jan 10, 2017
Messages
12
Reaction score
4
First Language
German
Primarily Uses
@Nicke Thanks, I was afraid I had to abandon another lighting plugin because the creator no longer supports it.
That fixed it perfectly.
 
Joined
May 15, 2016
Messages
1
Reaction score
0
First Language
English
Primarily Uses
upload_2017-9-13_10-53-12.png
It happened a few problems, when i use QuasiMovent, you can fix it ?
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,295
Reaction score
1,273
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)
 

dragon1up

Veteran
Veteran
Joined
Sep 24, 2013
Messages
122
Reaction score
37
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.
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
596
Reaction score
366
First Language
Polish
Primarily Uses
RMMV
@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.
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
377
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.
 

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
706
Reaction score
702
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.
 

Kirika

Villager
Member
Joined
Aug 12, 2014
Messages
23
Reaction score
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.
 

DarthSarlos

Villager
Member
Joined
Jul 17, 2013
Messages
25
Reaction score
0
First Language
German
Primarily Uses
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.
 

HasdrubalBarca

Veteran
Veteran
Joined
Feb 4, 2015
Messages
161
Reaction score
56
First Language
English
Primarily Uses
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.
The non-shadow version works fine with Quxios pixel movement.
 

dragon1up

Veteran
Veteran
Joined
Sep 24, 2013
Messages
122
Reaction score
37
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
 

monkeyintartan

TartanMonkey
Veteran
Joined
Nov 13, 2013
Messages
195
Reaction score
122
First Language
english
Primarily Uses
HI

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

Roult

Villager
Member
Joined
Oct 25, 2015
Messages
29
Reaction score
3
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.
 

Attachments

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
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.

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
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
636
Reaction score
206
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.
 

Roult

Villager
Member
Joined
Oct 25, 2015
Messages
29
Reaction score
3
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".
View attachment 72577


You should have 0-9 for lake level as floor 0 etc up to 60-69 for house roof
check bellow
View attachment 72578
Thanks you Kilitar for your help, it's works.

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.

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?
 

Attachments

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
636
Reaction score
206
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?
 

Khas

Detective lv73
Veteran
Joined
Sep 16, 2012
Messages
282
Reaction score
377
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.
The only thing getting me through today so far is coffee. And lots of it.

Forum statistics

Threads
97,852
Messages
947,384
Members
129,079
Latest member
DerLaPux
Top