screen saver problem

jersmi's picture

i made a screen saver using the Kineme GL Torus patch. it only works so far on my system. does the torus patch need to be installed for the screen saver to work?

PreviewAttachmentSize
Spirograph.qtz22.56 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

jersmi's picture
Re: screen saver problem

oh, and vade's v002Blur is in there, too.

cybero's picture
Re: screen saver problem

Got your composition down jersmi, ran it through the mill, checked its protocol and lo and behold -------- once placed into Library/Screensavers it ran, and ran and ran, until, at least, I got back to work :-).

It also takes music visualizer protocol nicely too, but those go into Library/Compostions

cwright's picture
Re: screen saver problem

yes, GLTools needs to be installed for the screensaver to work.

jersmi's picture
Re: screen saver problem

thanks, cybero, for giving it the workout. that's reassuring.

any advice, then, on the best (ie, most fps) way to produce a fine line circle that does not rely on kineme patches, scales nicely, works with alpha blending? i tried a sprite with a pdf (and png) of a 4pt circle (made in adobe illustrator), but it looks very different because of, i guess, how Replicate in Space handles it? (any advice on getting the replicate in space patch to not duplicate/overlap the first iteration?)

cybero's picture
Re: screen saver problem

a] the circle, unless crafted out of vectors and mathematics could, with transparency, be saved as .png or .ai, or .pdf.

the key thing is that it does need to be saved with full transparency.

I've attached an example, it uses a simple ellipse, not a circle, but you could drop a .ai,.png or .pdf circle in instead.

I've used sprites and billboards, both set to alpha blending.

apologies for the previously less than pertinent answer regarding the need or otherwise for the Kineme plugins.

PreviewAttachmentSize
AI_Type_Circle.qtz219.65 KB

jersmi's picture
Re: screen saver problem

thanks so much for taking the time, cybero.

i did save the circle files i originally created with transparency (.png, .pdf, but not .ai), and it almost works connected to a sprite in the Spirograph.qtz, but it has some quirks the torus patch avoids, some overlaps, stroke resizing, things like this.

jersmi's picture
Spirograph2

best solution in the end does seem to be to keep it 2d with an image+sprite instead of kineme gl torus. the replicate in space overlap problem solved by sending to Z rotation "360 - (360/copies)" to eliminate the Nth copy overlap. thanks again, cybero.

next i'd like to make a .saver file in xcode and insert this .qtz file. any advice with this would be hugely appreciated.

PreviewAttachmentSize
Spirograph2.qtz430.05 KB

cybero's picture
Re: Spirograph2

Set the protocols for your composition to be screensaver then just drop that into your Library/Screensaver folder and away you go.

Instructions here How To Make a Screensaver with Quartz Composer

All the screensaver projects I've found to output a click and install preference pane .saver seem to be OpenGL based.

See Free ScreenSaver source code for some example projects.

In fact no reference to including a .qtz as a resource can I find in Apple's development literature concerning screensaver making.

Of course - that doesn't mean it can't or hasn't been done :-) Come to think of it, it doesn't even prove that there isn't some reference to including .qtz.

Most telling thing is that Apple don't avoid using .qtz as some of their own screensavers.

Be really good in some ways if we can make click and install .savers with .qtz resources.

Nice Spirograph, what about shifting the Hues?

jersmi's picture
Re: Spirograph2

thanks for the links. i'll start looking at the source code for those others.

this .qtz works fine as a screensaver on my computer, but the issue came about wishing to share with friends who do not have quartz composer installed. like you mentioned, there must be a way to use the xcode screen saver template with QCRenderer, QcView, something-- i'm just inexperienced as a coder. i found a couple mentions of it in the apple QC mailing lists, not much.

re: shifting hues in the spirograph.qtz, certainly lots of possibilities. i just ended up at a place i thought looked pretty good for the moment. what did you have in mind?

bangnoise's picture
Re: Spirograph2

Hi

You can share the .qtz file with friends who don't have Quartz Composer installed. Just be sure to instruct them to put it in their Library > Screen Savers folder, and it will show up and work as a screen saver. Composer only needs to be present to edit compositions, it is not required for playback.

That said, one reason you might want to go down the Cocoa route is to package and use custom QC Plugins, which is where your question here started...

To do that, bundle the plug-ins in your screen saver's resources and call QCPlugin's loadPluginAtPath: method in the ScreenSaverView subclass' +initialize method.

Displaying a QCView is simple... create one programatically, load your bundled composition using loadCompositionFromFile:, add it as a subview of your ScreenSaverView subclass and then tell it to startRendering and stopRendering in the SSView's start/stopAnimation methods.

You'd probably want to add something which drew text directly to screen (without a .qtz) if loading of plug-ins or composition failed. In all I would anticipate it being less than 20 lines of code... oh, and add the Quartz framework to the project and #import <Quartz/Quartz.h> in the header to get the whole thing to compile :)

If you've eliminated the need for the custom plug-ins, and especially if you're new to Cocoa, then skipping all this and just sharing the .qtz file will be a whole load simpler. Also remember that any plug-ins from other people may have licensing restrictions on re-packaging.

Regards,

Tom

cybero's picture
Re: Spirograph2

Thanks for the clarification about and the quick how to for screensaver making in XCode bangnoise.

Regarding Hue Shifting just a simple Macro containing as many colour outputs as needed, [produced by HSL colour patches], Each HSL patch has one or more of its inputs changed either through LFO or Interpolation, possibly linked up to an audio input or spectrum.

Connect the colour outputs to the colour inputs and away you go.

jersmi's picture
qtz in Screen Saver folder

bangnoise: thanks! i have had bad luck so far having folks without QC installed drop the .qtz into their Library/Screen Savers folder. i'm probably doing something wrong-- what could it be, then? i'll have a chance to try again / troubleshoot early next week. you sure QC doesn't need to be installed on the machine for it to work? all info i have found googling seems to suggest so...

anyway, thank you so much for the info re: bundling plugins, etc. this is an excellent learning process.

and cybero, re: color, sure, i can see what you are saying. i'll look into audio for another version, maybe with other params besides color, too.

cybero's picture
Re: qtz in Screen Saver folder

If you aren't using any 3rd party plugins, such as Kineme or FXFactory for instance, then your composition, if appropriately protocolised , tested and output for both Leopard and Tiger OS X users then all Tiger and Leopard users must be able to see that screensaver.

However, if you have produced a screensaver that is only working effectively on Leopard, which you have done, then it won't show up, or perhaps show up only some of its features due to the differences between Tiger and Leopard runtimes.

In Quartz Composer you can

A] Test the composition in three different runtimes, Tiger, Leopard 64 bit and Leopard 32 bit , all accessible from the File menu.

If you can run in Tiger runtime without problems, seeing as how you'll be seeing your work already it should run AOK on both Leopard and Tiger.

Of course, one could be running Tiger and not Leopard.

You have posted up a composition that only runs in Leopard, so that won't apply to you. To be honest, not sure about the forwards compatibility issue as such, I wouldn't have thought it would crop up. I have not found any Tiger 'era' compositions failing in Leopard.

So onto Step

B] Bring the Editor window into focus [select it] . From the Editor Menu, you can choose to display 10.4 compatibility information and you can also ask to have 'Unsafe' Patches Indicated [Indicate Unsafe Patches].

Sometimes one can produce something that will only work within Leopard. Attempting to do something similar within Tiger won't always produce exactly the same result. It's all a trade off.

If you are using any patches that weren't in Tiger then you'll get problems; Math Expression, Smooth and Image Resize show up as incompatible.

jersmi's picture
Re: qtz in Screen Saver folder

well, it's good info and i appreciate it, but all three computers i tried are intel machines running leopard. so i don't know just yet. i will have a chance to troubleshoot tomorrow and tuesday.

thanks again.

cybero's picture
Re: qtz in Screen Saver folder

They'd also need the v002 blur plugin for the blur to work, but even without that it should work as a screensaver of sorts, just not as you really intended.

My guess, and its only a guess because I don't run a 64 bit Intel machine at present is that you might have some friends that do and that might be making all the difference. Initially I couldn't get Leopard 64 bit to load the item in test runtime even with the vade plugins taken , temporarily, out of the picture.

I then did myself a favour by putting them back in place again, extracting a couple of errant items that cropped up in the console log in runtime testing both at 32 and 64 bit Leopard.

It ran, albeit more shakily, in 64 bit Leopard mode and that was with all correct plugins in place and not one out of place or duplicated.

This may all, in no small part be down to my running a PPC and not an Intel Mac, but I can't get the composition to render well at 64 bit. I wonder if your friends have got a different , later edition of Mac hardware, would that make all the difference?

jersmi's picture
Re: qtz in Screen Saver folder

We'll see! Now I think I have the right info to troubleshoot.

btw, i did install vade's blur on one other machine i was testing...

cybero, thanks for your persistence. i really appreciate it.

jersmi's picture
Re: screen saver problem

this issue is resolved. running 10.5.6 on intel machines, this composition works as a screen saver without QC installed. the latest is attached. (i think the embedded images for the circles increased the file size...)

PreviewAttachmentSize
SpirographSS.qtz335.69 KB

cybero's picture
Re: screen saver problem

Lovely piece of work, would do really well as a music visualizer too.

Thinking in terms of feeding into Speed, Alpha, Feedback & Iterations via a Queue.

leegrosbauer's picture
Re: screen saver problem

That's just great, jersmi! Truly beautiful!