Quartz Crystal render difference to QC re random patch

usefuldesign.au's picture

Crystal is rendering my comp differently to how QC does.

I have random (controller) patches that scrub through a Queue of images (from a movie). The random patch feeds a Sample & Hold Patch which is cycled by an LFO PWM Wave to sample then hold at intervals. As the queue is filling the hold is a static image. When the queue is full, the hold part of cycle effectively "plays" the movie as the input continues to feed into the queue and forces the items through. This is read by some structure index patches taking there index value from the randomised sample and hold. All good.

When I render in Crystal it does not "play" the movie when queue should be full, it just does the random kind of scrubbing all the time. ( On screen feedback suggests the queue does fill in Crystal after 15 sec – my first guess was it wasn't filling because of playback differences to QC. )

Is this something known?

Here's a sample of the QC comp.

I'm loading a cut of the Crystal rendering to vimeo but have to wait for it to convert:

PreviewAttachmentSize
groundcontrol_demo.zip148.73 KB

Comment viewing options

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

cybero's picture
Re: Quartz Crystal render difference to QC re random patch

Asks for a FakePatch that I don't have installed

cybero's picture
Re: Quartz Crystal render difference to QC re random patch

Another quick thought why not setup some other conditions that adapt to Quartz Crystal's quirks, might simply need a workaround.

Are we meant to get the queue filling whilst the movie plays, because the wacky video plays all the time, so I think, that without the aforementioned FakePatch, nothing will work as it ought to.

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

Can't think what that could be. Was actually making explicitly only using std patches b/c I want to send it to a friend as a message for his opening tonight.

Stopwatch, Queue, Math Exp, Movie Loader, LFO, Structure Count and Index – that's it. A few others in the Value Printer Marco but that's just for screen feedback (non-essential) and just Crop, Gaussian Gradient and Sprites?!

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

Is FakePatch a name or a classification (I have no idea what FakePatch is)?

cwright's picture
Re: Quartz Crystal render difference to QC re random patch

QCFakePatch is a temporary placeholder used by the QuartzComposer editor for some operations (Creating macros, possibly virtual patches, etc).

When that happens on load, it means you had an exception happen, and you chose to continue (rather than quit) -- That's a bad idea. exceptions mean that some function did not complete, and didn't clean up after itself (in this case, some operation left the QCFakePatch laying around, which isn't supposed to exist in a composition, only temporarily while getting edited) -- This is simply a symptom. There's no telling what other corruption happened because whatever operation didn't complete. some patches may not be in their correct state, some connections may not be created, and some settings may be incorrect.

When reporting QuartzCrystal bugs, Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please indicate what render settings you used/are using. Please.

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

I didn't get an exception dialogue unless I am delerious and didn't see it (which I doubt ;) )

I just typed a post explaining I copy&pasted from larger comp (c&p buggy peeps tell me?) and got a Kineme Access Denied Message and couldn't get back to the text I wrote.

Renderer settings (which would be in the file i was loading to Kineme for use until Vimeo mounts) are H.264 Low 720x405 no AA no MB, Dur:30 sec approx FPS: 29.97 TIMESCALE=1

I had that Marco-lock up bug just before where double-click wont open them (nothing playing so not FPS related) so I saved comp and reopened and got that 'FakePatch' message myself. The comp played fine in QC when I re-opened it.

Will try to load render to save you the CPU cycles then delete when VImeo up.

Thx Alastair

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

Render Mov (a bridged)

Renderer settings are H.264 Low 720x405 no AA no MB, Dur:30 sec approx FPS: 29.97 TIMESCALE=1

PreviewAttachmentSize
groundcontrol_demo_cutd.mov1.04 MB

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

Re-reading your post cwright, I should point out that had same issue with full version of this file as I did with the demo piece I uploaded re sample and hold not "playing" movie.

I haven't had any messages when I open the master file, so can I assume no 'FakePatch' madness in that one?

I suspect that is a manifestation of copying over the patches bit by bit to a blank file. What do you say?

cybero's picture
Re: Quartz Crystal render difference to QC re random patch

Sorry to be so dense about this, but this is the QC glitch, so what you want to achieve is that the movie holds until the queue fills , yes?

You have the movie patch set to Asynchronous so it will play regardless of the timebase of QC.

Thought occurred to me that you could run the video and the audio separate and use the Audio Tools, but interesting to see the Queue being to used to take video image structure values.

cwright's picture
Re: Quartz Crystal render difference to QC re random patch

The only place where QCFakePatch is created is in -[QCPatchView _createSubgraphFromSelection:] -- this is called by the editor when you create a macro from selected patches (shift-cmd-M). Period. (I've exhaustively looked for all places where that method happens, and that's the only place).

It's possible it was stored in the composition you were copying from, but either way, the only way it's left around is when "continue" is chosen after an exception is thrown when working with macros.

It's not particularly important, it just means that things aren't necessarily all sane (even if they look/act sane). I'd expect it to be ok if it's rendering normally in QC.

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

It's kinda the other way around. In the main comp the sprites aren't even enabled until the queue is full b/c it looks better when it's running that way. Ignore the sound. I'll remaster anyway and that video is just a short clip to save queue time (and virtual memory trigger point which slows down comp a lot – listen to the hard-drive buzz).

If you have a queue of (29.97 * movie duration in seconds) items, with the movie continuously feeding into the queue (the movie loops), you effectively get a conveyor belt of images. Image I have 6 structure item patches. These are like six dudes standing at various points beside the conveyor belt.

Each dudes' position is set by the index number they are being told to stand at ({0 - 654} in the case of this movie length). While they are standing still (have a static index no.) a stream of images is going past on the conveyor belt. This stream is feed to a sprite. The index no. is not always static. When the LFO says so, the Sample and Hold patch inside the Macro is set to sample. Being feed randomised numbers the index no. moves around. This is like having the dude run back and forth along the conveyor belt to various index nos until the sampling stops and he holds his position. But he is still feeding a sprite while running around so it's like a scrubbing effect.

Sorry to get all remedial on you but I got into the analogy! Actually is very simple in conception and construction but unless you made it might seem a little ?wthihut?

Funny thing is I was dreaming about an application I could work with video in this and other ways for literally ten years before I found QC by snooping round the Dev Tools. I was instantly smitten, the implications seemed enormous to me (I hadn't seen much VJ software then either). Yet I haven't actually started testing those video ideas until yesterday because a need arose to show-off/give a buzz to a friend.

I have lots more of this stuff in store from twelve years of imaginings so REALLY hope I can get CRYSTAL to play BALL or I'm going to buy Screenflow which has it's down side (realtime) but I guess it's also an upside if it does the job and does it fast.

I've nearly spent as much time narrating this process as doing it — crickey!!

cwright's picture
The Prob

The problem is that your movie player is set to asynchronous mode.

That means that the movie is decoding in "real time", while the composition is getting rendered in non-real time. Since QuartzCrystal tends to encode much more slowly than realtime, the movie output isn't going to resemble anything approaching normal output (several output frames are going to get dropped because of the QCrystal encode lag).

Try making the movie player non-asynchronous, and see if that helps any.

cybero's picture
Re: Quartz Crystal render difference to QC re random patch

so basically you end up with a scrubby stuttering video resulting , yes?

like the attached clip?

uses your posted composition, my video, no audio.

PreviewAttachmentSize
groundcontrol_demo2.mov353.06 KB

cybero's picture
Re: The Prob

Absolutely right, cwright :-)

I mentioned the Asynchronous setting earlier, but didn't stress how it could help to achieve output. [Was still trying to make sense of what the glitch was, having been confused by FakePatches :-)]

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

Asyncronous will be screwing with QCrystal wont it. I had my sound mute mostly cause I'm over it but when rendering I did hear it kind of jumps back and forth. SO the queue is getting a dodgy feed from here, there and everywhere. By jove I think you've got it!

I had Asyncronous cause I was going to send as a comp for friend to play and wanted sound at that stage and sound requires asyncronous playback (can't use Kineme patches in this as that's too much explaining to copy plugins to Library etc. etc.)

Just re-rendered, sweet as. Your a Freakin Legend cybero and deserve some mythical dogs to be named after you! I'll post final comp when it's done prob by end of today.

usefuldesign.au's picture
Re: The Prob

Thanks cwright.

I think in a case of cosmic-osmosis I was following your line of thought. Cybero's comment about asyncronous kind of jumped out at me on a re-read and it all clicked into place re: jumpy feed to queue. It works perfectly in the demo comp now so the master will work to, I am sure of it.

Thanks again. Will I ever get to a point where there aren't new brambles to get caught on and waste a morning?

usefuldesign.au's picture
Re: The Prob

In my version the file is intact and functional despite 'fakePatch' message. Think yours should be operational too. It was good you only hinted, I had to work out for myself.

I even got distracted watching three robots singing at random but they listen to each other and adjust accordingly. End up singing in harmony, wow technology, aren't we blessed.

short sharp science

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

That's actually the undesired behaviour, before the queue fills — although it's okay when you have a few of them going at different rhythms.

See my later posts with long-windian explanation of full-queue-being-continuously-fed-movie analogy by way of explanation. Today is a happy watershed day for me in QC-land as I finally remembered and acted on why I wanted to learn QC in the first place (two or so years ago).

gtoledo3's picture
Re: The Prob

Man I hate it when I do that... and I always have to remember the flip back too. I've burned all kinds of time on that, and still do it all of the time.

It's worth noting that if you have a loop going (specified start point, and a duration) and really need asynch mode for that reason, that you can hook up the player to external patch time and multiply by a fraction, leaving the player in asynch for when you do your offline render. You can get all mathematical with it and get exact if you want. That way you can keep your loop points and get something that looks right.

gtoledo3's picture
Re: The Prob

"fakePatch" is in the air this week!

Why just earlier this week I had this happen, and created a qtz to replicate the bug...

When you select all and create macro, it makes the exception, but doesn't break any connections. Save, close, reopen, and viola, "fakePatch".

In retrospect, I think this has hosed me a couple times.

Also, something really similar can happen with one virtual patch that I've made, unless I actually duplicate it first, before using it... and that's just a simple CI kernel, but in my clip all of the inputs and outputs are published. I haven't tested to see if that's what is making the difference, but I suspect it is.

PreviewAttachmentSize
macro bug.qtz3.15 KB

usefuldesign.au's picture
Re: The Prob

Good thinking! I don't need to in this case. It was like I started comp one way for real time playback with stock std patches only then ended up trying for Q.Crystal rendering, one reason being the long time the queue takes to fill so I can trim the .mov down at beginning when it's not doing much. Turned the async for sound only. Will dub sound later in QTPro if I haven't fallen asleep. :)

Thanks for letting me know even the Pros can fall for that, George appreciate it. If it wasn't for the encouragement I've received this year from Kineme community would have chucked this lark in long ago.

usefuldesign.au's picture
Re: Quartz Crystal render difference to QC re random patch

Okay now I have a co-ordinates issue. I know cwright explained this to me once ages ago — I tried to understand this complication and failed but I'm really going to try and get it this time, otherwise I can't take advantage of Quartz Crystal's superior rendering.

I have a sprite playing the same image but flipped about X-axis and masked to give your typical QCTV reflection. Depending on the size of my comp rendering dimensions, I have to relocate the reflection sprite (not 100% sure why but obviously there are transformations active on it that I can't explain). When I set them by eye to sit just under the main 6 sprites, I am setting there location using normalised co-ordinates, nothing special. When I render in Quartz Crystal the Y-Axis co-ordinate gets knocked out of place by 0.2 units at least.

Something to do with Crystals internal shenanigans for producing the render image but how am I to account for this "adjustment" programmatically. I'd love to be able to have a method that reconciles this problem and not fight it each few months or forget rendering which is what happened last time. :\

Shall I post another comp with reflection sprite? It's a bother as old one has decided not to work, is it just me or is QC flaky (PBCK) or is it more QCfakePatch getting round perhaps?

cwright's picture
Re: Quartz Crystal render difference to QC re random patch

usefuldesign.au wrote:
When I render in Quartz Crystal the Y-Axis co-ordinate gets knocked out of place by 0.2 units at least.

Something to do with Crystals internal shenanigans for producing the render image but how am I to account for this "adjustment" programmatically.

QuartzCrystal actually doesn't do anything weird with coordinates. At all. It uses QuartzComposer to do the actual rendering (just in software-only mode).

Like your propeller composition from earlier this year, it's a number of small complications:

  • You're not specifying a size on the Render In Image patch -- this means it defaults to the size of the rendering context (very large if you're using antialiasing)

  • You're using the auto-size mode for a billboard -- This is almost certainly not what you want when rendering with antialiasing (antialiasing will end up downscaling the image, making it smaller than real size).

To programatically work around this:

  • Define definite size on Render In Image.
  • Stop using antialiasing, or use QuartzCrystal's input when sizing things (QuartzCrystalAntialias as the size multiplier, in this case)
  • Stop using Real Size mode on billboards (esp. with Antialiasing in QuartzCrystal)

If you're actually using sprites (and not billboards this time), it's probably just Render In Image stuff.

Post a sample composition, and I can try to give a more detailed explanation of what's going on/why.