orphalese

Veteran
Veteran
Joined
Jun 1, 2021
Messages
41
Reaction score
21
First Language
Spanish
Primarily Uses
RMMZ
Here you have 2 light sources with similar configuration
The fire is: <light:5:400:#ffe1a3>
and the cow is <light:5:400:#ffe1a3><light-ex:0,0:60:0:0>

I think the cow looks like brighter because of the visual effect of the segment of the circle, but the radius and the gradient are similar.

Then: I think your flashlight is using a bigger radius than your fire. Try using the same for both

--- EDITED LATER ---
Wait, I realised that you can play with the intensity of the light tricking with the startAt of the gradient and combining two light effects

Brown cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>

And white cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>

Captura de pantalla -2023-03-21 11-17-55.png

That means that you can create a 360º flashlight this way and combine them, look how much brighter is the second fire now:



Captura de pantalla -2023-03-21 11-22-04.png

First fire is:
<light:5:400:#ffe1a3>

And second one is:
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0>
 

Attachments

  • Captura de pantalla -2023-03-21 10-46-57.png
    Captura de pantalla -2023-03-21 10-46-57.png
    446.9 KB · Views: 1
Last edited:

orphalese

Veteran
Veteran
Joined
Jun 1, 2021
Messages
41
Reaction score
21
First Language
Spanish
Primarily Uses
RMMZ
Now I have a question.

I want a window white light to fade to red and stay like that until it become night and then fades. Im trying something like this, having in my system 6000 frames per hour:

Page 1 condition: hour >= 9
<light:1:550:#ece4b2>
<light-ex:0,-38:60:0:0>

Page 2 condition: hour >= 19
<light:1:550:[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]>
<light-ex:0,-38:60:0:0>

Page 3 condition: hour >= 20
<light:1:550:#F5801F>
<light-ex:0,-38:60:0:0>

Page 4 condition: hour >= 21
<light:1:550:[1000,#F5801F,#000000,#000000,#000000,#000000]>
<light-ex:0,-38:60:0:0>

Page 5 condition: hour >= 22
<light:1:550:#000000>
<light-ex:0,-38:60:0:0>

This is definitely not clean code and also it doesn't works well, at 20:00 the light becomes #ece4b2 again for some reason. Is there any other way to make it better? Thanks a lot in advance for you answers and thanks @OcRam for the amazing plugins
 

Attachments

  • Captura de pantalla -2023-03-21 15-48-45.png
    Captura de pantalla -2023-03-21 15-48-45.png
    129 KB · Views: 1
Last edited:

finalrpg777

Veteran
Veteran
Joined
Oct 8, 2020
Messages
46
Reaction score
5
First Language
English
Primarily Uses
RMVXA
Here you have 2 light sources with similar configuration
The fire is: <light:5:400:#ffe1a3>
and the cow is <light:5:400:#ffe1a3><light-ex:0,0:60:0:0>

I think the cow looks like brighter because of the visual effect of the segment of the circle, but the radius and the gradient are similar.

Then: I think your flashlight is using a bigger radius than your fire. Try using the same for both

--- EDITED LATER ---
Wait, I realised that you can play with the intensity of the light tricking with the startAt of the gradient and combining two light effects

Brown cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>

And white cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>

View attachment 256689

That means that you can create a 360º flashlight this way and combine them, look how much brighter is the second fire now:



View attachment 256690

First fire is:
<light:5:400:#ffe1a3>

And second one is:
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0.5>
<light:5:400:#ffe1a3>
Now I have a question.

I want a window white light to fade to red and stay like that until it become night and then fades. Im trying something like this, having in my system 6000 frames per hour:

Page 1 condition: hour >= 9
<light:1:550:#ece4b2>
<light-ex:0,-38:60:0:0>

Page 2 condition: hour >= 19
<light:1:550:[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]>
<light-ex:0,-38:60:0:0>

Page 3 condition: hour >= 20
<light:1:550:#F5801F>
<light-ex:0,-38:60:0:0>

Page 4 condition: hour >= 21
<light:1:550:[1000,#F5801F,#000000,#000000,#000000,#000000]>
<light-ex:0,-38:60:0:0>

Page 5 condition: hour >= 22
<light:1:550:#000000>
<light-ex:0,-38:60:0:0>

This is definitely not clean code and also it doesn't works well, at 20:00 the light becomes #ece4b2 again for some reason. Is there any other way to make it better? Thanks a lot in advance for you answers and thanks @OcRam for the amazing plugins
Here you have 2 light sources with similar configuration
The fire is: <light:5:400:#ffe1a3>
and the cow is <light:5:400:#ffe1a3><light-ex:0,0:60:0:0>

I think the cow looks like brighter because of the visual effect of the segment of the circle, but the radius and the gradient are similar.

Then: I think your flashlight is using a bigger radius than your fire. Try using the same for both

--- EDITED LATER ---
Wait, I realised that you can play with the intensity of the light tricking with the startAt of the gradient and combining two light effects

Brown cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>

And white cow is
<light:5:400:#ffe1a3>
<light-ex:0,0:60:0:0:0>

View attachment 256689

That means that you can create a 360º flashlight this way and combine them, look how much brighter is the second fire now:



View attachment 256690

First fire is:
<light:5:400:#ffe1a3>

And second one is:
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0.5>
<light:5:400:#ffe1a3>
<light-ex:0,0:360:0:0:0>
Hey thats a nice trick, thanks ill use it! Btw I thought that StartAt meant the to choose a point to start a rotation for the light (rotate like a lighthouse). Thats what i had understood based on the plugin's Help description.
 

Attachments

  • startat.JPG
    startat.JPG
    26.8 KB · Views: 2

orphalese

Veteran
Veteran
Joined
Jun 1, 2021
Messages
41
Reaction score
21
First Language
Spanish
Primarily Uses
RMMZ
No, actually startAt makes the light to start far from source, to make more realistic flashlights, try it
The starting position of rotation is angle
This is startAt 0.2


Captura de pantalla -2023-03-22 09-10-56.png
 
Last edited:

finalrpg777

Veteran
Veteran
Joined
Oct 8, 2020
Messages
46
Reaction score
5
First Language
English
Primarily Uses
RMVXA
No, actually startAt makes the light to start far from source, to make more realistic flashlights, try it
The starting position of rotation is angle
This is startAt 0.2


View attachment 256812
Ah cool, its kinda like the OffsetX.
Would you happen to know how to make a gunflash occur when a weapon shoots? I've been looking for a way to do this with other lighting plugins but cant find the solution.
 

orphalese

Veteran
Veteran
Joined
Jun 1, 2021
Messages
41
Reaction score
21
First Language
Spanish
Primarily Uses
RMMZ
I would definitely use the native animations for that, you can use them centered on an event or on a specific point in the screen
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
952
Reaction score
1,114
First Language
Finnish
Primarily Uses
RMMZ
Now I have a question.

I want a window white light to fade to red and stay like that until it become night and then fades. Im trying something like this, having in my system 6000 frames per hour:

Page 1 condition: hour >= 9
<light:1:550:#ece4b2>
<light-ex:0,-38:60:0:0>

Page 2 condition: hour >= 19
<light:1:550:[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]>
<light-ex:0,-38:60:0:0>

Page 3 condition: hour >= 20
<light:1:550:#F5801F>
<light-ex:0,-38:60:0:0>

Page 4 condition: hour >= 21
<light:1:550:[1000,#F5801F,#000000,#000000,#000000,#000000]>
<light-ex:0,-38:60:0:0>

Page 5 condition: hour >= 22
<light:1:550:#000000>
<light-ex:0,-38:60:0:0>

This is definitely not clean code and also it doesn't works well, at 20:00 the light becomes #ece4b2 again for some reason. Is there any other way to make it better? Thanks a lot in advance for you answers and thanks @OcRam for the amazing plugins
Thank you for the message and compliments,

At 20:00 it becomes #ece4b2 again probably because "[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]" will rotate these colors and every 5th time it's #ece4b2

I will try to make proper light color fading feature to next release after I've finished dynamic shadows, but sadly ATM I have zero dev time due IRL things.

Syntax probably will be something like this:
<light:type:radius:color-or-colors:fade-in-time>
example <light:1:550:#F5801F:1000>
 

finalrpg777

Veteran
Veteran
Joined
Oct 8, 2020
Messages
46
Reaction score
5
First Language
English
Primarily Uses
RMVXA
I would definitely use the native animations for that, you can use them centered on an event or on a specific point in the screen
You mean the animations that come with the game? I tried with a Common Event but the animations have no lighting
 

Attachments

  • animations.JPG
    animations.JPG
    32.8 KB · Views: 2

orphalese

Veteran
Veteran
Joined
Jun 1, 2021
Messages
41
Reaction score
21
First Language
Spanish
Primarily Uses
RMMZ
Thank you for the message and compliments,

At 20:00 it becomes #ece4b2 again probably because "[1000,#ece4b2,#F5801F,#F5801F,#F5801F,#F5801F]" will rotate these colors and every 5th time it's #ece4b2

I will try to make proper light color fading feature to next release after I've finished dynamic shadows, but sadly ATM I have zero dev time due IRL things.

Syntax probably will be something like this:
<light:type:radius:color-or-colors:fade-in-time>
example <light:1:550:#F5801F:1000>
Is it ok for you if I suggest some changes? I know this it not the most clean code possible and probably I'm stepping into what I was not called to.

But, something like [1000,#ff0000,#00ff00,#0000ff,hold]
could be a nice feature because you mantain the fading feature but deciding when to break it.

Then, something like this in the constructor to accept the parameter


Code:
    class Light_Data {

        constructor(light_type, light_color, radius, ex_params, terrain_light_obj, update_type) { // Init some stuff...

            let color = light_color;
            this._originalColor = color;

            this._colorIndex = 1; this._cycleCounter = 0; this._cycleFader = 0;
            if (light_color.indexOf("]") > 0) {
                this._multipleColors = [];
                light_color = light_color.replace("[", "");
                light_color = light_color.replace("]", "");
                const arr_tmp = light_color.split(","); color = arr_tmp[1];
                for (let i = 1; i < arr_tmp.length; i++) {
                    if(arr_tmp[i].toLowerCase()=="hold"){
                        this._multipleColors.push("hold");
                    }else{
                        this._multipleColors.push(OcRam.hexToRGBA(arr_tmp[i]));
                    }

and then in the updateColorCycle, to stop the cycle

Code:
 updateColorCycle() {
            if (this._colorCount > 1) { // Pre-calculate color steps for faster processing!
                if (this._cycleCounter > this._cycleFader) {
                    let target_color = this._multipleColors[this._colorIndex];
                    this._preCalcColorSteps = [
                        (target_color.r - this._currentColor.r) / this._cycleFader,
                        (target_color.g - this._currentColor.g) / this._cycleFader,
                        (target_color.b - this._currentColor.b) / this._cycleFader,
                        (target_color.a - this._currentColor.a) / this._cycleFader
                    ];
                    if(this._multipleColors[this._colorIndex]=="hold"){
                        this._colorCount=1;
                        return;
                    }

Sorry if this is not welcomed. Again, your plugins are amazing and I don't know how you find time to maintain them all. Congrats!!!
 

Latest Threads

Latest Posts

Latest Profile Posts

Happy Memorial Day to those on here like me who live in the United States. :)
Alright got a video of a review of a fake PS5 here. I've decided I'm only going to do maybe 10 videos about bootleg consoles, and then I think I'm going to move on, and post YouTube videos of old video game TV advertisements for franchises like Mario and Sonic and Spyro and all that for a little nostalgia. :cool:

Two solid days and I still have four slots left in my custom A2 tilesheet I am drawing.
i really love spaghetti

Forum statistics

Threads
131,524
Messages
1,220,482
Members
173,223
Latest member
ZecaVn
Top