Keep the Javascript Queue Moving

jersmi's picture

How to keep a queue animating when it is not gaining new members?

Attached qtz, drawing with a mesh. This is modifications to the mouse ribbon patch with Chris Wright's method for always drawing to the viewer plane.

I am looking for a way to keep the animation moving and animating (in this case up, +y) when the queue is not loading (mouse button up or off). I have been trying to modify the javascript driving the queue / mesh creation (all the way inside the comp), but maybe another way?

(Also, any cool js mods for expressive animated meshes are welcome! And what's up with the mesh twist effect flashing/glitching?)

PreviewAttachmentSize
MeshDraw.qtz92.03 KB

Comment viewing options

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

jersmi's picture
Re: Keep the Javascript Queue Moving

Also, how can I get the mesh to clear on reset, as kineme triangle/line/point structure patches would? Right now the mesh clears at next draw.

jersmi's picture
Re: Keep the Javascript Queue Moving

Oh, I was overthinking this -- just added an lfo with very small amplitude to x (or y) input so there's always something being added to the queue.

edit: and it appears that now the mesh is clearing as expected, too. jeesh.

i pulled gtoledo's updated mesh filters in to see if his MEsh Twist would work as expected -- not so far, but maybe in my array i i have a 0 or unfriendly number to the mesh. still investigating. hope this is helpful to someone along the way...

M.Oostrik's picture
Re: Keep the Javascript Queue Moving

That is a workable solution.

You can aIso add an numeric input and feed in a time patch. You don't have to use the this input within your script. Just having it there updates the script.

jersmi's picture
Re: Keep the Javascript Queue Moving

Thanks for that. I tried inserting a "dummy" patch time into the js with no initial success, but I'll have another look.

jersmi's picture
Flashing viewer problem with this qtz

I have an issue with this qtz where the viewer will intermittently start flashing. Usually happens after a good amount of editing, but when it does I have to restart QC to get it to stop. Is there any way to suss out a problem like this? Is this a known issue with the mesh renderer? Am I doing something wrong in javascript, sending the mesh creator values it does not like?

cybero's picture
Re: Flashing viewer problem with this qtz

doesn't flash intermittently for me. are you repeatedly triggering new line ? this doesn't sound like the sort of system wide graphic flashing one gets with OpenCL in editing / viewer mode. sounds totally local to the viewer. any high z scaling going on?

dust's picture
Re: Flashing viewer problem with this qtz

this is pretty cool. the flickering has something to do with the twist. maybe because your passing nan for draw off which confuses the mesh twist. also this is the root to your question how do i keep the drawing moving after i stop drawing. when you stop drawing your coords are nan this is so when you draw again the previous drawing isn't connected to the new drawing. you would have to come up with some sort of logic.

maybe use a smooth to delay the mouse draw off then use the non delayed mouse off to trigger a bigger gravity. use a smooth patch for mouse off with default settings this will give you a 1 second delay before your draw off is really off then use the real mouse off to increase the gravity making the drawing continue to fly off the screen within that 1 second time delay before the nan cuts the drawing.

jersmi's picture
Re: Flashing viewer problem with this qtz

I don't think the flickering is the nan issue because I am using this in a tracking environment where there is never a nan received (unless manually triggered).

cybero, the flashing can take a while to kick in, then it won't stop. Intermittent behavior. No large z movements necessary to create flashing.

dust, i like your creative problem solving approach. The twist has its own flicker issue, true. I like the way it works, too. Thought maybe it could be related.

Mostly wondering if anyone had any issues with the mesh creator / renderer, any log somewhere or any way to see something as its happening to help sort out the problem. It could be data from the js patch, but I have not spotted anything yet.

jersmi's picture
Re: Flashing viewer problem with this qtz

Simply resizing the Viewer appears to correct the flashing. This sucks for formal presentation, but at least I don't have to restart QC when building. Maybe I can make a downsize trigger to try and reset or something.

jersmi's picture
Adding an image to a mesh

How would one add an image to a QC mesh, like the image input on the Kineme 3D renderer? For the sake of understanding, I'd like to see a simple graphic, something like a circle image laid onto the mesh so it looks like links in a chain. Possible? I see the "Set Mesh Texture", but not sure if this would be the right patch.