It is currently April 26th, 2024, 12:47 am

help with animation - i'm new here

Get help with creating, editing & fixing problems with skins
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

Yincognito wrote: April 29th, 2023, 3:14 pm

Code: Select all

[meterIrisFrame]
meter=Image
ImageTint=255,255,255,255
x=220
y=225
w=700
h=700
ImageName="#@#Iris\Iris[measure value].png"
DynamicVariables=1
Hidden=1

Sorry forgot to enclose the code the first time.

Possibly ?
User avatar
Yincognito
Rainmeter Sage
Posts: 7164
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: help with animation - i'm new here

Post by Yincognito »

LuciferVisuals wrote: April 29th, 2023, 6:37 pm

Code: Select all

[meterIrisFrame]
meter=Image
ImageTint=255,255,255,255
x=220
y=225
w=700
h=700
ImageName="#@#Iris\Iris[measure value].png"
DynamicVariables=1
Hidden=1

Sorry forgot to enclose the code the first time.

Possibly ?
Yes, check my last reply. Obviously the path will depend on how you named the images yourself, but I suppose their are still "indexed" with 0, 1, and so on at the end, so it looks about right. Instead of [measure value] it would be the [Loop] measure from my code (which you can rename it to your liking, if desired). The start, end and increment values would have to be adjusted for your case - remember, you only need to use 1 set of the iris images (either the closed to open one or the open to closed one, depending on what you want). The left mouse up action options from my code can easily be converted to your button command ones, you only need to copy paste and replace the bangs in the latter.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7164
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: help with animation - i'm new here

Post by Yincognito »

LuciferVisuals wrote: April 29th, 2023, 6:37 pmPossibly?
Let me know if you still have trouble in "converting" my non-image example to your image-featured one. You shouldn't, but if you still do, I'll post the adaptation (using my own 6 images, since I don't have the iris ones).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

Yincognito wrote: April 29th, 2023, 7:18 pm Let me know if you still have trouble in "converting" my non-image example to your image-featured one. You shouldn't, but if you still do, I'll post the adaptation (using my own 6 images, since I don't have the iris ones).
I was being a bit slow there, when i put it in a file and ran it, only then I realized it was just the number bit and would need changing to work with images, Ill have a go at it tomorrow.

Thanks for it.

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

Re: help with animation - i'm new here

Post by Yincognito »

LuciferVisuals wrote: April 29th, 2023, 7:35 pm I was being a bit slow there, when i put it in a file and ran it, only then I realized it was just the number bit and would need changing to work with images, Ill have a go at it tomorrow.

Thanks for it.

Keith
Yep. The main "change" is to add the measure number to your image path... :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7164
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: help with animation - i'm new here

Post by Yincognito »

LuciferVisuals wrote: April 29th, 2023, 6:05 pmAny chance of a simple example of that?
So simple that you can try to create it again yourself without looking, once you get the idea (seriously, starting from scratch with a simple skin helps):

Code: Select all

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

---Measures---

[Loop]
Paused=1
Measure=Loop
StartValue=0
EndValue=7
Increment=1
LoopCount=1

---Meters---

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

[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=[!PauseMeasure Loop][!SetOption Loop InvertMeasure 0][!UnpauseMeasure Loop]

[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=[!PauseMeasure Loop][!SetOption Loop InvertMeasure 1][!UnpauseMeasure Loop]
Test_1.0.0.rmskin
ezgif.com-video-to-gif.gif
The Button meters instead of the String ones, the ButtonCommand options instead of the LeftMouseUpAction ones, the positioning, the image path or various hide and show effects are of no concern, since you know much better than myself how you want your skin to look and behave. ;-)

P.S. Normally, such animations done on demand (i.e. not endless) are better done using ActionTimer measures, instead of a fast skin Update rate, in order to save the CPU / GPU usage when not animating, but this works fine as a simple example.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

Yincognito wrote: April 29th, 2023, 8:23 pm So simple that you can try to create it again yourself without looking,
I will admit it looks it, but I am stuck on my previous code and my mind simply will not move on until I understand THIS problem.

1) As you know I got mine working perfectly using two sets of images. (And that still works)
2) So ..... In theory it should also worked with one set of images using a negative count for the second animation (Open iris, but could have been either depending on desired result.

This works perfectly in closing the Iris

Code: Select all

 [measurecloseIrisFrameCalc]
Measure=Loop
StartValue=0
EndValue=7
Increment=1
LoopCount=1
IfCondition=(#CURRENTSECTION#>=8)
IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"][!Redraw]
Disabled=1
(that button at top is really handy)

This is basically identical but using a negative count and will not work ?

Code: Select all

 [MeasureOpenIrisFrameCalc]
Measure=Loop
StartValue=7
EndValue=0
Increment=-1
LoopCount=1
IfCondition=(#CURRENTSECTION#>=8)
IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"][!Redraw]
Disabled=1
And neither will this (I HAVE ONLY CHANGED (#CURRENTSECTION#>=8) To =-8 as I wasn't sure how RM would handle the negative count

Code: Select all

 [MeasureOpenIrisFrameCalc]
Measure=Loop
StartValue=7
EndValue=0
Increment=-1
LoopCount=1
IfCondition=(#CURRENTSECTION#>=8)
IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"][!Redraw]
Disabled=1
I do not get any error messages, open iris simply immediately goes to what would be the last frame, i.e. fully open without playing the animation.

Hope you can understand WHY I want to get to the bottom of this, before moving on.....
I can see your way looks much better, and looks like you did all the work for me, so will move on to that
BUT WOULD REALLY LIKE TO UNDERSTAND why this is not working first?

Am I missing something obvious?

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

Re: help with animation - i'm new here

Post by LuciferVisuals »

Yincognito wrote: April 29th, 2023, 8:23 pm So simple
Please Ignore my other question about my old code for the moment. This example has revealed something interesting.

It took a whole five minutes to revise this to work with my images, and buttons etc, tested all working perfectly, no errors, and visually correct..

I removed my entire open/close iris section from my skin and replaced it with the revised copy of yours in its place.

Guess what? Same problems I have been having with (LOTS of variations of open/close Iris) immediately returned. You think I would find that frustrating, on the contrary I'm delighted, because it means obviously something elsewhere in the skin is causing the problem (something that "should" have nothing to do with this).

So basically I will start starting with an empty skin containing just your open/close Iris (being so much simpler than mine) then I will rebuild the skin adding the sections one at a time, until I find what is causing the Iris part to cease working, then take it from there.

Of course this probably also means that some of the considerable number of my previous attempts to do this, which all resulted in the same problem (except the one using the reset measure..... Twice) may in fact be perfectly o.k. Horrifyingly they might all be o.k. as the root cause of the problem appears to be elsewhere in the skin.

I'll have to find out what it is, before I can consider what to do about it.

Keith

Thank you for accidentally finding the root cause of this problem...... LOL

And on a serious note, thanks for this, it is a much simpler approach, but now means I really do have to get to the root cause of the issue (as opposed to just my stubbornness).
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: help with animation - i'm new here

Post by LuciferVisuals »

Yincognito wrote: April 29th, 2023, 8:23 pm
Normally, such animations done on demand (i.e. not endless) are better done using ActionTimer measures, instead of a fast skin Update rate, in order to save the CPU / GPU usage when not animating, but this works fine as a simple example.
Right all fixed...... But I never actually found the cause of the problem.

I did what I said, started empty added one bit at a time till everything that should be was there, still working, Repeated with mine, same result. So decided some piece of spurious c@#p somewhere was causing the problem, and having invested about four days on this issue, I am calling that "job done", So I'm fighting the impulse to root through all the leftovers and find exactly what it was. Because I want to move on.

After all I now have two perfectly working versions of this, your revised version, and my version, both totally different, but both totally working. And I have Soooo many more new things I want to do. But first I better fix that Star Wars Text, and also have some ideas to improve that, as that's the last of the "unfinished Business" before I can start on something completely new.

I am however going to look up your PS. As I'm using a lot of graphics, and intend so many more, (the fun part really).

So I want to consider for the first time, the resources I'm using. No doubt you will be the fist to know if I struggle with that..... it's your own fault for being so helpful.

As usual, thanks for your time and patience.

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

Re: help with animation - i'm new here

Post by Yincognito »

LuciferVisuals wrote: April 30th, 2023, 9:06 amBUT WOULD REALLY LIKE TO UNDERSTAND why this is not working first?

Am I missing something obvious?
I believe you do (or you did, now that you sorted things out in another way). The #CURRENTSECTION# / measure value in the IfCondition will never be greater or equal to 8, because it only goes from 0 to 7 (or 7 to 0, depending on direction). I wanted to mention this much earlier, while you were still chatting with balala, but thought that there might be another reason I wasn't aware for its inclusion. Now, I'm not saying this is what caused you problems, but it's something that stands out from that measure's code.

Anyway, like I told you, see how nice is to start from scratch and add little bits progressively, one at a time? Much easier to build something that works, understand why it works, and then expand it on a healthy basis, compared to having to sort out a (longer) code already written, possibly by someone else. 8-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth