[Request] Glow Effectlet file

I'm trying to modify some old effects/effectlets to combine them into a super effect of my liking.

I'd like to use the "Glow" Effect, but the file I have (glow.effect) looks like a bunch of garble-de-gook when I open it in Notepad or any text editor.

Any help would be appreciated.

Thanks in advance!

#298763

the glow effect is not scripted, but it's coded - you would need the source code. I'm afraid you need to rewrite that part, creating a smooth animation ( you can get code for the smoooothness from my Slide effect :P ) that modifies the Desklet.ColorMatrix property. The ColorMatrix property should be a 5x5 matrix... there are samples around for GDI+ that explain how to use it for various effects, otherwise you can try here on msdn

#298811

Thanks for the reply. I'll have to take a longer look at it when I'm not working or spending time with the girlfriend (new relationships are great... :D).

I just noticed though (after installing your slide effect) that it uses no CPU cycles whatsoever! I'm floored! If I can get this kind of thing going with glowing I'm gonna be really happy.

EDIT By the way... would you mind if I ended up asking you for some help once I've got something more concrete? I'll probably need someone experienced to help me find the problems in my script... ;)

#298823

Yeah, there are two types of effectlets:

- DLLs renamed to .effect

- Scripts, renamed to .effectlet

I'll do a scripted glow effectlet after soccer tomorrow ;)

#298841

I just noticed though (after installing your slide effect) that it uses no CPU cycles whatsoever! I'm floored! If I can get this kind of thing going with glowing I'm gonna be really happy.
On my (slow) computer, a 256x256 desklet will eat up a lot of processor:
  • continuos sliding (setting the Rebouce option) is around 25% - CPU consumption is directly proportional to the smoothness value
  • glowing can take up to 100%, but it's proportional to Speed. At 50% speed the CPU is around 20%.

They both need redrawing, the glow could be a bit more cpu-intensive since it needs matrix operations, but I'm not sure :)

By the way... would you mind if I ended up asking you for some help once I've got something more concrete? I'll probably need someone experienced to help me find the problems in my script... ;)
np, we can keep this thread if its something useful for scripter, or move to the Dev. Hangout ;)

#298976

@Andreas - *hugs* You're awesome! Where would the world be without you... (I know... still stuck in the days of regular icons ;) )

@dreadnaut - Yeah, I haven't tried with a 256x256 desklet. My desklets are all 96x96 and when I used your slide effectlet, the CPU usage stayed at zero for me.

I'll be sure to release it once I'm done with it of course! I guess since all the effectlets are "Open-source" it's only fair that I share with the rest of you. :)

#299021

Not to sound like a nag... but have you had a chance to look at the script for the glow effect yet, Andreas?

I've had a look at the GDI+ link that dreadnaut gave me, but it's a little bit over my head. Are there any examples of how you might incorportate this into a script?

#301037

diggin' deep down in my filesystem, I've just found this file... it's like... a glow effectlet ?! I really don't know where is it from, and it does not work really well, but it tells you how to use the colormatrix property ! should be much easier than the msdn examples I think :D

(I added a .txt extension for the upload, just get rid of it!)

EDIT: unattached glow.effectlet - it's the same that comes with Avedesk 1.2

#301041

oops forgat totally about this. I blame the good weather (was at the beach actually today :) ):

basically, a glow is done by modyfing the colormatrix in this way:

		m->m[4][0] = m->m[4][1] = m->m[4][2] = (REAL)lpData->counter / (lpData->numFrames*(100.0f / (float)lpData->maxGlowLevel));

If you want a full effectlet, I'll do it tonight or annoy me thru PM otherwise ;)

#301043

ok, so my effectlet of unknown origin was correct. The glow effect can be achieved changing positions [4,0] [4,1] and [4,2] of the color matrix :D

#301047

@dreadnaut - that's the effectlet file that comes with AveDesk 1.2 I think... for some reason when I run the original copy I have, I get the little boxes flying around, but no glowing. With the verison you sent me, I get an error message... :S

If you want, I can show you a video of what I mean.

Thanks for the explanation of the colormatrix (both of you)... it makes a bit more sense now as to where the actual changes were taking place.

#301074

mmmh I get the floating boxes too... but I haven't played around with the settings enough probably !

and maybe I put my hands into that effectlet and ruined something a long time ago, and I don't remenber :P

#301079

*poke again* Hey Ave... I PM'ed you but no reply... maybe you're enjoying the view at the beach too much to bother with the script... I can't blame ya if you are... ;)

I've got some code that I think should work... but it doesnt... :( I can't post it right now since I'm at work and the code is at home, but I'll see if I can post it up later tonight.

#301638

Ok... so I've been playing around with this a bit - mostly just learning from what I see in the files I've got since the examples that herd posted aren't properly linked... :(

I'm wondering about the functions within the scripts. Are they active whenever one of the parameters is "active"? For example, in the original Glow.effectlet file we see this:

Function OnBeforeDraw(IsMouseOn, IsSelected, IsPreview)

Does this mean that the OnBeforeDraw function is called and running whenever IsMouseOn==true?

Like I said, I've got some code, but it's not doing very much, and to be quite honest, I'm not familiar with the scripting language, so I have no idea how to parse through the code by myself.

Thanks in advance!

#301882

sorry, I have been busy with stuff lately:

OnBeforeDraw() will always be called when the desklet is redrawn.

The parameters can be true or false.

For example:

  Function OnBeforeDraw(IsMouseOn, IsSelected, IsPreview)

// we only want to do something when the mouse is over or when the effectlet is

// is in preview mode

if(IsMouseOn = True Or IsPreview = True) then

// TODO add code

end if

end function

I'm diggin up my glow-effectlet example right now for you - it's on an old HDD.

#301886

w00t!!!!

Thanks soo much for this! I'll be studying this stuff a little bit more - hopefully I can contribute more to this stuff (and work on the smooth magnification once I get comfortable) when I learn from the masters.

Andreas = programming god dude... and stuff :D:D:D

#301914