Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Iterator



I am trying to make a series of sprites using an RSS feed. What I want to do is make n sprites where n is the number of items in the RSS feed. I used an iterator (set to iterate by the number of items in the RSS structure) to render the right number of sprites in different positions with different colours.

the problem that I have got is that when I put the text rendering stuff in the iterator, the animation runs quite slowly. I assume that this is because the text is rendering every frame, whereas it appears to render at the beginning of the animation only if the image with string is not in the iterator.

You're assumption is correct. I looked at the composition and the big problem is that the Image With String patch is generating an image from a string that changes for every iteration loop.
You can boost performance quite a bit by making sure the image has a fixed size instead of depending on the amount of text. I go from 8 to 20FPS if I set the Image Width and Image Height to a constant 1.0.

It's still very unoptimized at that point, as the composition is still drawing 10 fairly long texts per frame, but it's pretty much as far as you can go with the iterator approach.

So my question is how do I render an arbitrary number of text images without using the iterator, or is there any way of putting them in, but making sure that they are rendered only when the content of the RSS feed changes?

I don't think there is any other way than what you're doing right now


________________________________________________________

Pierre-Olivier Latour                            email@hidden

Quartz Composer Architect                Graphic & Imaging Team


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden

References: 
 >Iterator (From: Andrew Kearney <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.