It is currently September 21st, 2020, 1:07 pm

How to glow effect on visualizer

Help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 18
Joined: September 7th, 2020, 2:24 pm

Re: How to glow effect on visualizer

Post by CodeCode »

Yincognito wrote: September 11th, 2020, 6:30 pm By your approach I mean using the number of the frame in a Bitmap meter to display the Earth, instead of using separate frame images. The former is very light on the CPU compared to the latter (despite the huge size of the TIFF image, at 105840 x 294 and 60 MB with TIFF compression), and I'm not even mentioning the fact that it doesn't overwork the HDD like the latter. Basically there's almost no difference between the CPU usage without the rotating Earth compared to with the rotating Earth.

I run Rainmeter with Hardware Acceleration disabled, and I didn't experience any issues whatsoever. But I did enable Hardware Acceleration after reading your reply, and it indeed looks there are some issues with it, as the image / skin dissapears after a couple of frames are shown. Of course, since the rotation is endless, those few frames reappear after the rotation is 360 degrees complete, but then the rest of them dissapear again. I suppose there's a limit to how wide can be an image while using Hardware Acceleration, that's the only explanation I can think of for the skin only displaying the first few frames from a Bitmap meter.

In any case, this isn't a code problem, it's a Rainmeter one, so for sure I won't change the approach for something that works without Hardware Acceleration just because enabling it is a bit buggy.



Yeah, but you can't display an animated GIF in Rainmeter unless you extract its frames beforehand, or you add them to a Bitmap meter. My point is that directly using a GIF doesn't work in Rainmeter. One way or another, you still get to the 2 options I mentioned above, just liked stated by the manual as well.
Hi Yincognito,

I am interested in your TIFF animation, and would love to see your code to run it like you have designed it to be, as a file rather than a folder of images.

Would you be so kind as to share it, please?

Thanks
CodeCode
Can't fix it if it ain't broke - unless it is in code.
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to glow effect on visualizer

Post by Yincognito »

CodeCode wrote: September 12th, 2020, 1:01 pm Hi Yincognito,

I am interested in your TIFF animation, and would love to see your code to run it like you have designed it to be, as a file rather than a folder of images.

Would you be so kind as to share it, please?

Thanks
CodeCode
Sure. It's nothing fancy yet, no pause, reset or inverse direction on click for now, though I might add those in the future, if I feel like it:

Code: Select all

[Variables]
Update=25
Frames=360
Step=1

[Rainmeter]
Update=#Update#
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!SetWindowPosition "49.85%" "49.00%" "50.00%" "50.00%"]

---Measures---

[Frame]
Measure=Calc
Formula=((#Frames#+Frame+#Step#)%#Frames#)
MaxValue=#Frames#
DynamicVariables=1

---Meters---

[Earth]
Meter=Bitmap
MeasureName=Frame
BitmapImage="#@#Rotating Earth (two layers, 105840x294, lzw, dis).tif"
BitmapFrames=#Frames#
DynamicVariables=1
The TIFF I use for this specific skin is here, on MediaFire (extract the file and place it into the Resources folder of the skin).
User avatar
CodeCode
Posts: 18
Joined: September 7th, 2020, 2:24 pm

Re: How to glow effect on visualizer

Post by CodeCode »

Yincognito wrote: September 12th, 2020, 2:51 pm Sure. It's nothing fancy yet, no pause, reset or inverse direction on click for now, though I might add those in the future, if I feel like it:

Code: Select all

[Variables]
Update=25
Frames=360
Step=1

[Rainmeter]
Update=#Update#
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!SetWindowPosition "49.85%" "49.00%" "50.00%" "50.00%"]

---Measures---

[Frame]
Measure=Calc
Formula=((#Frames#+Frame+#Step#)%#Frames#)
MaxValue=#Frames#
DynamicVariables=1

---Meters---

[Earth]
Meter=Bitmap
MeasureName=Frame
BitmapImage="#@#Rotating Earth (two layers, 105840x294, lzw, dis).tif"
BitmapFrames=#Frames#
DynamicVariables=1
The TIFF I use for this specific skin is here, on MediaFire (extract the file and place it into the Resources folder of the skin).
Thanks :thumbup: :rosegift:
Can't fix it if it ain't broke - unless it is in code.
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to glow effect on visualizer

Post by Yincognito »

CodeCode wrote: September 12th, 2020, 11:02 pm Thanks :thumbup: :rosegift:
You're welcome. I might even have something better waiting to be properly set and released ... like playing a video in a Rainmeter skin. 8-)
User avatar
balala
Rainmeter Sage
Posts: 11374
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to glow effect on visualizer

Post by balala »

Yincognito wrote: September 12th, 2020, 11:10 pm like playing a video in a Rainmeter skin.
I doubt you can (directly) play a video in a Rainmeter skin, however I'd be extremely curious what are you thinking to...
User avatar
balala
Rainmeter Sage
Posts: 11374
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to glow effect on visualizer

Post by balala »

Yincognito wrote: September 12th, 2020, 2:51 pm no pause, reset or inverse direction on click for now,
Although definitely possible from the point of view of Rainmeter, this would make not too much sense. The rotation of the Earth never pauses or reverse, so why would you work with these?
But as said, it's definitely possible.
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to glow effect on visualizer

Post by Yincognito »

balala wrote: September 13th, 2020, 6:04 amAlthough definitely possible from the point of view of Rainmeter, this would make not too much sense. The rotation of the Earth never pauses or reverse, so why would you work with these?
But as said, it's definitely possible.
Yes, you're right - that's why I said I'll add them only if "I feel like it". They are by no means an astronomical necessity, I was thinking more at them as means to "add features" to an otherwise extremely simple skin, or even as means of temporarily stopping the animation to save resources or "going back in time" from an Earth rotation point of view. The latter would work well if I will decide on implementing an accurate rotation, where the face of the Earth lit by the Sun will always be facing the user, according to the longitude and / or sunrise and sunset times - something like the user being in the place of the Sun, geometrically. But as I said, I'll have to see what's the level of complexity for that and then decide based on it, because in the end I only wanted a rotating accurate 3D Earth in the place of the static Earth in my wallpaper, nothing too fancy or complicated.
balala wrote: September 13th, 2020, 5:54 amI doubt you can (directly) play a video in a Rainmeter skin, however I'd be extremely curious what are you thinking to...
Well, technically Rainmeter won't play a video, but a Bitmap meter, extracted from the video in real time, on the fly. So far it works perfectly, but since I currently use a single image file, there is a pause between the end of a Bitmap playing cycle and the start of the following one. This can be fully corrected by using a second image file acting as a "buffer", where the skin will play only the finished file while extracting the other one in the meantime, followed by switching the referenced files at the end of the Bitmap playing cycle - pretty much like all video players do, after all.

I'm pretty sure it will work as expected, but I have some uncertainties regarding the resource usage and the audio / synronization part.
User avatar
balala
Rainmeter Sage
Posts: 11374
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to glow effect on visualizer

Post by balala »

Yincognito wrote: September 13th, 2020, 11:26 am Yes, you're right - that's why I said I'll add them only if "I feel like it". They are by no means an astronomical necessity, I was thinking more at them as means to "add features" to an otherwise extremely simple skin, or even as means of temporarily stopping the animation to save resources or "going back in time" from an Earth rotation point of view.
They for sure are possible, no doubt of this, as I already said.
Yincognito wrote: September 13th, 2020, 11:26 am The latter would work well if I will decide on implementing an accurate rotation, where the face of the Earth lit by the Sun will always be facing the user, according to the longitude and / or sunrise and sunset times - something like the user being in the place of the Sun, geometrically. But as I said, I'll have to see what's the level of complexity for that and then decide based on it, because in the end I only wanted a rotating accurate 3D Earth in the place of the static Earth in my wallpaper, nothing too fancy or complicated.
I suppose a Time measure will be needed, but other than this, I don't think it would be very complicated.
Yincognito wrote: September 13th, 2020, 11:26 am Well, technically Rainmeter won't play a video, but a Bitmap meter, extracted from the video in real time, on the fly. So far it works perfectly, but since I currently use a single image file, there is a pause between the end of a Bitmap playing cycle and the start of the following one. This can be fully corrected by using a second image file acting as a "buffer", where the skin will play only the finished file while extracting the other one in the meantime, followed by switching the referenced files at the end of the Bitmap playing cycle - pretty much like all video players do, after all.
:o Intereseting idea (!?) :o
What tool do you use to create the bitmap?
Yincognito wrote: September 13th, 2020, 11:26 am I'm pretty sure it will work as expected, but I have some uncertainties regarding the resource usage and the audio / synronization part.
:o Do you want to add the audio as well? :o
For this you have to crate a .wav file, based on the audio track of the video. For a longer (not even too long) video, the .wav file will because extramely large, I suppose.
User avatar
Yincognito
Posts: 2565
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to glow effect on visualizer

Post by Yincognito »

balala wrote: September 13th, 2020, 5:54 pm :o Intereseting idea (!?) :o
What tool do you use to create the bitmap?

:o Do you want to add the audio as well? :o
For this you have to crate a .wav file, based on the audio track of the video. For a longer (not even too long) video, the .wav file will because extramely large, I suppose.
Oh, it's the same tool I used when creating my Sony Vegas plugin for scene detection in videos years ago: FFmpeg. The user will have to have the FFmpeg binaries, of course, but that's easy to download or even include in the @Resources folder, either as an address that the user can download or as the files themselves. The skin itself is extremely simple for the video part, and as for the audio part I don't think it'll have to be a WAV, if you don't rely on Rainmeter to play it (which would be incnvenient anyway, due to the limitations in that regard).

Currently I'm more concerned about trivial Rainmeter code things that don't work as I want to in the prototype, rather than making the whole process work, LOL. In other words, the Rainmeter code is giving me more problems than strictly extracting and playing the bitmap. :D
User avatar
balala
Rainmeter Sage
Posts: 11374
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to glow effect on visualizer

Post by balala »

Yincognito wrote: September 13th, 2020, 6:27 pm Oh, it's the same tool I used when creating my Sony Vegas plugin for scene detection in videos years ago: FFmpeg. The user will have to have the FFmpeg binaries, of course, but that's easy to download or even include in the @Resources folder, either as an address that the user can download or as the files themselves.
Ok, will give a try to them tomorrow.
However including an address and instructing the finaly user to download and use the app, well... this is not relly good. Including the file themselves seems a much better idea, however in this case the skin installer will have a .exe file, which again is debatable.
Yincognito wrote: September 13th, 2020, 6:27 pm and as for the audio part I don't think it'll have to be a WAV, if you don't rely on Rainmeter to play it (which would be incnvenient anyway, due to the limitations in that regard).
Agree, however this is what have I understood from your previous posts.
Yincognito wrote: September 13th, 2020, 6:27 pm Currently I'm more concerned about trivial Rainmeter code things that don't work as I want to in the prototype, rather than making the whole process work, LOL. In other words, the Rainmeter code is giving me more problems than strictly extracting and playing the bitmap. :D
Why? What is the problem?