It is currently November 4th, 2024, 7:36 am

General Help with my first Project

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 6th, 2023, 11:41 am Ill look into your suggestion, I wanted to broaden my idea base anyway, I know I have just scratched the Surface.
Yeah, best thing is to think something through before you do it. This way, you won't have to repeat / correct the process more times than necessary. A good base / foundation / structure is paramount for a well made skin, since it won't need rewriting only slight adjutments, and it's easier to build and add on top of a healthy base.
LuciferVisuals wrote: May 6th, 2023, 11:41 am OH quick question, I said I did a new iris animation, optically much better, I wanted it to run a bit faster, its o.k. but would look better if it ran faster. I got the update down to Update=25, Unless I'm doing it wrong, inserting an UpdateDivider just slows it down, I tried decimal like UpdateDivider=.1 , and .01 but that did not appear to make any difference, and from my understanding any Negative number will stop it updating. Anything I can do to speed it up a bit?
Yes, the update dividers always slow things down, because the skin update is basically the equivalent of the fastest update happening in your skin (a minimum update used as reference, if you like). Update dividers are just integer multipliers to that. Negative ones will cause that section to only update at refresh / load time, so only once at the beginning (a good way to conserve resources for stuff that don't change while the skin is active, or change only on demand via bangs). Setting Disabled to 1 on a measure will never update it, not even at load time (a good way to start from numerical 0 in Calc measures, for example), until enabled.

If you want a faster animation, you can do it either by lowering the skin update (i.e. the one in the [Rainmeter] section) up until the absolute minimum which is 16 ms, or you can use ActionTimer measures that can repeat things using an even lower interval than 16 ms, via correspondingly setting the wait time in their ActionList... options - copy paste the simple code in the example at the bottom of that page to understand better, test it and then change the W variable to, say, 50, and see how you can slow it down and consequently, make things run faster.

Or, if you like to see how that example can apply to an animation like you have, this skin code here can be transformed into this:

Code: Select all

[Variables]
Increment=1
Frames=8
Wait=25

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

---Measures---

[Frame]
Measure=Calc
Formula=(Clamp(Frame+#Increment#,1,#Frames#))
UpdateDivider=-1
DynamicVariables=1

[Play]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Init | Wait #Wait# | Repeat Step,#Wait#,#Frames#
Init=[!UpdateMeasure Play][!UpdateMeter IrisFrame][!Redraw]
Step=[!UpdateMeasure Frame][!UpdateMeasure Play][!UpdateMeter IrisFrame][!Redraw]
UpdateDivider=-1
DynamicVariables=1

---Meters---

[IrisFrame]
Meter=Image
W=300
H=169
MeasureName=Frame
ImageName=#@#%1.jpg
UpdateDivider=-1

[CloseIris]
Meter=String
X=75
Y=170
W=150
SolidColor=255,0,0,255
StringAlign=Center
Padding=0,10,0,10
AntiAlias=1
Text=Close Iris
LeftMouseUpAction=[!CommandMeasure Play "Stop 1"][!SetVariable Increment 1][!CommandMeasure Play "Execute 1"]
UpdateDivider=-1
DynamicVariables=1

[OpenIris]
Meter=String
X=225
Y=170
W=150
SolidColor=0,0,255,255
StringAlign=Center
Padding=0,10,0,10
AntiAlias=1
Text=Open Iris
LeftMouseUpAction=[!CommandMeasure Play "Stop 1"][!SetVariable Increment -1][!CommandMeasure Play "Execute 1"]
UpdateDivider=-1
DynamicVariables=1
and has the same effect:
Image
but in this case you can lower the Wait variable below 16 ms to make it run even faster. Meanwhile, when not animating, the skin will continue to be updated once every 1 second (well, actually, since everything in it has a -1 update divider, those won't be updating except at load time), saving resources. When animating, it will, of course, update things and redraw stuff once every #Wait# ms as necessary, because of the bangs / actions executed by the ActionTimer measure.

Note: You can't have formulas in the ActionList... options from an ActionTimer measure, so be sure to do your computing for whatever variables you might use there beforehand, so that those variables will yield a plain numerical value by the time they're used in those options.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 6th, 2023, 1:54 pm
have been looking at a few stargate skins, from a code point of view, piece of cake, more basic than what I'm doing... SO THAT'S GOOD :lol:. In fact nothing at all new from a code point of view, obviously not complaining about that, I did notice so far none used buttons, well click on an image, that's more or less the same thing really from a code point of view, so that's really just a matter of design really. Like decorating as opposed to actually building. Having said that I still only seen a few, so not sure if that is in fact what you meant when you said "I use a lot of buttons, :o most people don't :oops: " But if that is in fact what you meant, then updating my approach will be easy. In fact it looks easier to do it that way, which may be why its popular.
Setting Disabled to 1 on a measure will never update it, not even at load time (a good way to start from numerical 0 in Calc measures, for example), until enabled.


That might be a better way of something I did in the Transformation Matrix Credits. I solved a problem but putting an unnecessary calc with an IF and an action... simply to stop the vertical marquee until I triggered it at the end of my Star wars animation. I'll go back and revisit that.

On the Update divider, I had discovered everything you mentioned the hard way, but I will admit that I cannot understand why Updatedivider= ANY DECIMAL <1 does not speed it up, mathematically speaking I think it should..... As dividing by any decimal less than 1, should in fact multiply the outcome? E.G. 50/10=5.... But 50/.1=500?

That said, the code you supplied looks like what I need, so I'll first have a play with it, then I'll have to study it for a bit to make sure I understand it.
[/quote]

Keith
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 6th, 2023, 1:54 pm
Oh on the mulling over the inc files, while I have been looking at something more down to earth and fun (Star gates), That began to Gel a bit. I am envisaging two types of inc files that meet up or crossover in the skin in question. One supplying graphic input and the other supplying what to do with it. That may sound like a complication, but I don't thingkit would be any more difficult to do it that way or any more code........

As to why do it? I'm still thinking out loud here, but it looks like it would give independent control of image source, on the one hand, and size and position on the other hand. As an example. Which design of stargate to stick in the skin, on the one hand.... On the other it's size and position. So 3 gate designs, in 3 size variables would result in 9 variations this way, obviously 4 by four is 16 variations with only a couple of extra lines of code. Taking that a step further, if color were in a third inc file, like the lights, blue, orange and white, etc, then basically even with 3 x 3 x 3 = 27 varieties, and does not appear any more difficult in principal than using one inc file...... I did say doesn't appear more difficult :rofl:

Does that make sense?

K
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 6th, 2023, 1:54 pm
Can I make up my own section or sub section like [Forground Images]..... (obviously in meters)? and ideally will a .inc feed into them? Not essential, but very helpful.

Keith
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 6th, 2023, 4:52 pmHaving said that I still only seen a few, so not sure if that is in fact what you meant when you said "I use a lot of buttons, :o most people don't :oops: ".
The reason is because Image meters are more flexible than Button meters. Some options and possibilities in Button meters are not available, e.g. W, H, ImageCrop, ImageRotate. They are tied up to the image you supply to them, the same way Bitmap meters are, to an extent. By comparison, one can do everything with Image meters.
LuciferVisuals wrote: May 6th, 2023, 4:52 pmOn the Update divider, I had discovered everything you mentioned the hard way, but I will admit that I cannot understand why Updatedivider= ANY DECIMAL <1 does not speed it up, mathematically speaking I think it should..... As dividing by any decimal less than 1, should in fact multiply the outcome? E.G. 50/10=5.... But 50/.1=500?
It's not because of math. It's because of the fact that Rainmeter must know the minimum update rate at which it will update the skin or elements from it. When setting the update in the Rainmeter section (which doesn't support dynamic variables), this is possible. When using subunitary update dividers, this is not possible, since they can be basically anything (and parsing the skin to identify the minimum won't help, since it might require knowing the value of a possibly dynamic variable at any time, something very hard to do). It's like knowing for sure the minimum frequency at which a CPU works without having to compute it from a larger frequency and taking into account a potentially countless number of factors.

From a programming point of view, this is logical as well: Rainmeter uses an integer update counter (like the variable in a FOR loop, if you like) that counts the updates of a skin, then when it encounters some section having an integer update divider N, it more or less just skips N-1 skin updates to update the said section according to its update divider (i.e. "update this once every N skin updates"). It's a simple solution to a simple problem, but you absolutely need to have a reference number to base that approach on. By comparision, imagine you have a 1000 ms skin update and you'd want to set an up a subunitary update divider of 1000/60, corresponding to a "60 FPS" update: since that results in a fractional 16.666... number and the granularity of Rainmeter's "internal clock" is 1 ms by design, at which update rate you'd update that section? 16, 16.6, 16.7, 17? What do you do with the inherent leftover time? What about an irrational number like SQRT(2)? See? This just complicates things, while the current implementation keeps it simple, without any drawback.
LuciferVisuals wrote: May 6th, 2023, 5:12 pmDoes that make sense?
In a way, it does, as long as you don't overcomplicate things. Remember, you can control many things using dynamic variables, or even plain ones (including size, position, color, etc), without even requiring an .inc for it. For some things it's simpler using the former, for others using the latter has additional benefits. It depends on context.
LuciferVisuals wrote: May 6th, 2023, 5:58 pmCan I make up my own section or sub section like [Forground Images]..... (obviously in meters)? and ideally will a .inc feed into them? Not essential, but very helpful.
Yes, you can. In some cases you don't even need to fake a section for that, since they'll "use" to the previous section anyway. For example:

Skin.ini:

Code: Select all

[SomeMeasure]
Measure=...
...

@IncludeSomeOtherMeters=#@#SomeOtherMeters.inc

[SomeMeter]
Meter=...
...

...
...\@Resources\SomeOtherMeters.inc:

Code: Select all

[SomeOtherMeter]
Meter=...
...

[SomeAnotherMeter]
Meter=...
...

...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 6th, 2023, 4:52 pmThat said, the code you supplied looks like what I need, so I'll first have a play with it, then I'll have to study it for a bit to make sure I understand it.
Sure thing. One thing I forgot to mention, in case it's not obvious: this code assumes you start numbering your frames from 1 and not 0. I did this since I didn't want to bother with starting with the Calc measure disabled to force it to start from 0. The clamping of the frame number between 1 and the number of frames takes care of always keeping the frame number within those limits.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 6th, 2023, 9:31 pm The reason is because Image meters are more flexible than Button meters. Some options and possibilities in Button meters are not available, e.g. W, H, ImageCrop, ImageRotate. They are tied up to the image you supply to them, the same way Bitmap meters are, to an extent. By comparison, one can do everything with Image meters.
Ah.... Thank you.... I will play with them
It's not because of math. ....... while the current implementation keeps it simple, without any drawback.
Thanks again.... That clears that up..... It was bugging me.

In a way, it does, as long as you don't overcomplicate things. Remember, you can control many things using dynamic variables, or even plain ones (including size, position, color, etc), without even requiring an .inc for it. For some things it's simpler using the former, for others using the latter has additional benefits. It depends on context.
Yes, so far not even attempted to write one word of this theoretical code, its all in my head, playing with the possibilities. After all these years, I know how my mind works when it's on to something, It keeps playing with possibilities,playing "What IF" then suddenly the entire thing becomes crystal clear.... I'm not there yet and cannot push it, it's as though IT knows there there is something "Magic" in there somewhere, and it hasn't surfaced yet..... It will be an "Of Course" moment then, "That is so obvious now"... Moment.... which hasn't happened yet, Hence I'm still mulling it over
Yes, you can. In some cases you don't even need to fake a section for that, since they'll "use" to the previous section anyway. For example:
Yep thanks, I actually knew that part, .... Its was just for some reason that I'm not sure of, Mu mind kept nagging me saying... "Well this will be useful" So I wanted to find out if it was a problem, So I could eliminate it as a consideration, or just think to myself... "Well is actually doable"..... So now I know it's the latter.. Thank You.

I Think I am on to something interesting and different, but at the moment I cannot see exactly what it is... So will keep mulling it over..

This morning when I woke the first thing I thought was, perhaps I should write something new and small and basically pointless, that simply uses the concepts I'm playing with in my head. No animations, nothing exciting, probably just like feeding shapes from one inc, colors from another etc. size and position from a third....... In itself pointless.... But while I don't want to use the time doing it, I'm seriously tempted to do it now..... Not to practice the techniques because that I know they will work even though I have only used them once as a very simple tester, so not a lot of point from that point of view. But it might
just prompts my "Of Course" moment....

I'll see if it clarifies itself first, because I have so many other things I want to look into, But if it doesn't then I'll make something very simple with the process, and see if that produces anything "magical"

Keith

Thanks again, especially for the update explanation.
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 7th, 2023, 6:15 amThanks again, especially for the update explanation.
You're welcome - glad things are clear(er) now. :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 7th, 2023, 3:50 pm You're welcome - glad things are clear(er) now. :great:
Didn't do anything yesterday, well watched TV all day (having discovered the joy of torrents.) Catching up on watching SGU again, which I have wanted to revisit for some time, kept with a notepad scribbling ideas and "what if" Ideas down, interrupted buy very brief running to the computer to try something, or look something up.

One practical issue with this problem arose, which I will try and resolve today..... its actually something I asked you about "A great Many Post Ago......" Meaning this idea was probably in the back of my mind even before I knew it was. I think from memory your answer was basically "Its Possible", but from memory there was not much detail, but also from memory the question was also very general at the time, I probably was not even sure why I wanted to know at the time, I just knew for some reason that I was wondering about it.

So while i'll root back through "A surprising number of post and answers" now it's clear why its relevant I'll ask again.

Assuming, this something good comes out of this.

So first a scenario. If I had a main skin called Lucifer's Playground, nothing in the root, just resources, and and Icon file to the first complete project, lets say the revised version of my remote control tablet. (How it actually is atm, in fact). Then I produce some new projects, one or more star gates, these would work perfectly as "stand alone" projects. But if installed in Lucifers Playground, (As opposed to their own directory), would benefit from instantly being controllable by the remote control. And an increasing range of bigger and better special effects. And in time by new star gate controllers, e.g. a DHD, or Atlantis controller, possibly scenery, rooms. landscapes....... And so on.

Its easily possible to make a new skin for each, and install it in rainmeter, but it puts each in its own directory, not in Lucifers Playground and while they can be moved in file explorer so:-

Is there a way to make each new skin, so it automatically puts it in lucifers playground? So that even if a User has no idea how to do it, its done for them..... I'm not thinking of a typical Forum User, they will probably all know how to do this, I'm thinking of a much larger audience, who don't know (and apparently don't want to know), how a computer actually works ?

Learning how to use one was a recent and interesting experience, I asked many younger people how to do fairly basic stuff, and was surprised to discover they did not have the faintest idea, literally it was like driving a car, they knew how to get in it and turn it on........ They knew how to use their programs, a surprising number had no idea how to even download and install a new program..... This was an eye opener for me :rofl:

I have now "Fixed" four computers for people, having made the silly mistake of saying "OH that's easy to fix" instead of the more prudent "Don't ask me, I have no idea what I'm doing" LOL Point being there is a much bigger audience for this stuff, than the Forum users, and I want to make it as easy as possible for that audience, to "Get into it".

That is after all the only reason people use windows, instead of unix derivatives, Lets be honest, it's totally crap, but it's easy to use, if you don't want to understand what it does or how it does it.

Keith
User avatar
Yincognito
Rainmeter Sage
Posts: 8597
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 8th, 2023, 7:29 amIs there a way to make each new skin, so it automatically puts it in lucifers playground? So that even if a User has no idea how to do it, its done for them.....
Yep. Like I told you before: make a skin suite. So, Lucifer's Playground will be the suite (and the "main skin folder"), and in it you have various subdivisions aka individual skins (i.e. the subfolders of the main folder). All skins in the suite will share the same @Resources folder, meaning that it will be at the same folder level as the individual skins in the suite:

Code: Select all

Skins --- Lucifer's Playground -+- @Resources
                                |
                                +- Credits
                                |
                                +- Iris
                                |
                                +- ...
                                |
                               ...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth