Box2D and Geometry Plug-In available

oz.Box2D Plugin is now available from http://www.benoitlahoz.net/

 

oz.Box2D is a plug-in bundle for the graphic development environment Quartz Composer.

It is based on the 2D physics library Box2D and configure some of its functions to be usable through node-based programming.

It makes complex shapes easy to include in physics simulation and contains helper patches to provide the user with some custom functions not basically included in Box2D.

Version 1.0

  • Based on Box2D 2.3.1: the user might want to check his knowledge of the Box2D principles before posting issues.
  • 32 / 64 bits, 10.7+
  • To be installed in Quartz Composer Plug-Ins folder.
  • IS NOT COMPATIBLE WITH ANY OTHER Box2D BASED PLUG-IN
  • Use poly2tri for triangulation through custom library OZGeom (also used in oz.Strings and oz.Geometry plug-ins,please make sure these plug-ins are updated too if you use them)
  • Is made to output values to be rendered with Kineme GL Tools (or other GL based rendering plug-ins).
  • Contains 11 patches:
    • World (processor): it’s the central patch of the bundle. The setting pane let the user choose the number of « Object » inputs. Outputs bodies data and bodies count.
    • Simple Body: let the user choose if he wants to create a Box or a Circle, with according parameters. Outputs a body Object.
    • Body With Line Structure: takes a 2D or 3D line structure in input(only the 2D points will be considered) and triangulate it (if filled body) to get displayable triangles (with U, V coordinates). Outputs a body Object.
    • Body With Triangles Structure: takes a 2D or 3D triangles structure in input(only the 2D points will be considered). Triangles may be organized like in the Kineme GL Triangle Structure patch: a 2D (X, Y, Z) vertices structure defining triangles. Outputs a body Object.
    • Model Emitter: takes a body Object in input and allow the user to emit (on trigger or continuously) multiple instances of this body. If the body model changes only the newly emitted bodies are concerned by the change. Manages lifetime of individual bodies. Outputs a body group Object.
    • Hit Test: takes 2 Objects in input (body or body group). Outputs a boolean, contact coordinates (2D structure that can be plugged in Kineme GL Point Structure) and contact normals (3D structure of lines).
    • Break Body: takes a body (not body group, only filled bodies) Object in input and breaks it on trigger. To be inserted between the body Object and the World patch.
    • Destroy Body: takes a body or body group Object in input and breaks it on trigger. To be inserted between the body Object and the World patch.
    • Body Info: takes a body (not a body group) Object in input. Outputs body ID, (X, Y) positions, Z rotation, body’s size (if relevant), body’s vertices and triangles (if relevant) and contact points.
    • Group Info: takes a body group (not a body) Object in input. Outputs body ID, (X, Y) positions, Z rotation, body’s size (if relevant), body’s vertices and triangles (if relevant) and contact points as a structure for each body of the group.
    • Mouse Joint: takes (X, Y) coordinates and boolean in input and allows the user to catch and drag bodies . Outputs a mouse joint Object to be plugged directly in the World patch.
  • Support self-intersecting polygons (see oz.Geometry plug-in for triangulation with holes, and oz.Strings plug-in to get triangles from strings)
  • Includes examples via the patches descriptions
  • USE AT YOUR OWN RISK !
  • Is released as DonationWare
  • Is licensed under Creative Commons Share Alike Attribution 4.0 (Commercial).
  • Concepts:
    • Object: Quartz Composer does not allow to create custom input or output ports, so the plug-in uses structures to get and set the bodies, joints, etc., to be shared between patches. An object can be a body, a body group (like in emitter) or a joint for the moment and is pluggable to the World patch directly or via another patch. The user is responsible to check what kind of object goes where.
    • Line Structure and Triangle Structure: ozBox2D outputs positions data in a Kineme GL-like way so the bodies’ data can be rendered with these patches.
  • Known issues:
    • Box2D ‘degenerate polygons’: generated triangles may sometimes be too thin. The plug-ins try hard to get themBox2D-able but in some particular (and rare) cases Box2D may crash with this issue.
    • Emitter / broken bodies performance: due to the way the plug-in has to cache bodies for re-use and generate values for rendering, body groups Objects may be slow (in particular with circles: only one circle is 96 triangles for filling and 33 vertices for stroke). User might want to adjust FPS and PTM in the World patch to keep a fluid animation below a certain number of bodies emitted, or to use plug-ins specifically made to emit bodies (like the1024 one).
    • Changing too fast (at each frame for example) the Emitter model body’s parameters may result in some (rare) cases in some issues with the bodies creation in the World (ie. bodies not considered by the plug-in then not rendered, but living in the Box2D world).
    • Does not support creating bodies in iterators due to the current bodies IDs management based on each body’s memory address (that remain the same in an iterator).
    • Some triangles output by oz.Strings Triangulate Character Structure patch or oz.Geometry Constrained Delaunay With Holes may not keep the exact position and U,V coordinates after breaking.
  • Todo list:
    • Huge ! But…
    • Debug what has to be debugged
    • Provide better examples (these are so ugly)
    • Joints creation and management
    • Forces creation and management
    • Raycasting
    • Iterators support
    • More callbacks to get instantaneous and user-selected world data
    • Helper patches for bodies creation: drawing, structure of bodies, jointed bodies, etc.
    • Helper patches to allow more conditions
    • Helper patches to get more data from bodies
    • Bridging with my OpenCV plug-in (new version currently in dev)

oz.Geometry Plug-In

 

Version 1.0

  • 32 / 64 bits, 10.7+
  • Uses my OZGeom library also used in oz.Strings and oz.Box2D, please make sure these plug-ins are updated too if you use them.
  • Use poly2tri for triangulation
  • Use Clipper library for clipping
  • To be installed in Quartz Composer Plug-Ins folder.
  • Is made to output values to be rendered with Kineme GL Tools (or other GL based rendering plug-ins).
  • Contains 21 patches:
    • 2D Ellipse: build a simple 2D (at Z = Z input) ellipse closed line structure according to the input number of vertices
    • 2D Rectangle: build a simple 2D (at Z = Z input) rectangle closed line structure according to the input number of vertices
    • 3D Bounds: get the bounds and center point of a 3D line structure.
    • 3D Is Counter ClockWise: checks if the input Line STructure has been built counter clockwise.
    • 3D Is Point Inside Bounds: checks if a point is inside the bounds of a 3D Line Structure.
    • 2D Contains: checks if a Line Structure contaisn another Line Structure.
    • 3D Close Polygon: closes a polygon by duplicating the first vertex of a Line Structure.
    • 3D Remove Duplicates: removes the duplicates in a Line Structure.
    • 2D Smooth Line Structure: smooth a Line Structure according to the input ratio and steps (points between each original vertex).
    • 3D Simplify Line Structure: simplify an input Line Structure according to the input tolerance.
    • 2D Rotate Z: rotates a Line Structure around the Z axis.
    • 3D Scale: scales a Line Structure.
    • 3D Translate: translates a Line Structure.
    • 3D Flip: flip horizontally, vertically or in depth a Line Structure
    • 3D Grow Line Structure: grows the input Line STructure according to a normalized input ratio (begin -> end)
    • 3D Follow Path: outputs an (X, Y, Z) point on the input Line Structure according to the input ratio (0. -> 1.)
    • 3D Morph Line Structure: morphs a Line Structue to another one according to the input ratio (0. -> 1.)
    • 2D Convex Hull: outputs a closed line structure of the input Line Structure’s convex hull
    • 2D Clipper: outputs a line structure made of the clipping operation between input Line Structure 1 and input Line Structure 2
    • 2D Constrained Delaunay: performs a 2D Constrained Delaunay operation on the input Line Structure and output a resulting Triangle Structure (handles self-intersecting polygons via clipping)
    • 2D Constrained Delaunay With Holes: performs a 2D Constrained Delaunay operation on the input structure of Line Structures and output a resulting Triangle Structure (handles self-intersecting polygons via clipping; compared to the oz.Strings Triangulate patch it is 1D less)
  • Support self-intersecting polygons (see oz.Geometry plug-in for triangulation with holes, and oz.Strings plug-in to get triangles from strings)
  • Does not include examples (in the TODO list)
  • USE AT YOUR OWN RISK !
  • Is released as DonationWare
  • Is licensed under Creative Commons Share Alike Attribution 4.0 (Commercial).
  • Known issues:
    • TO BE TESTED BETTER
    • 2D functions are – most of the time – not working with 3D: make evrything 3D (oops… triangulation…)
  • Todo list:
    • TO BE TESTED BETTER
    • Feed the library with others geometric functions
    • Implement my « old » Line->’Width Polygon’ function
    • Implement my « old » editor that allows drawing directly in QC
    • Implement « get structure in bounds »
    • 3D Rotations with matrices
    • Make examples
    • Be inspired…

Origami 1.2 Update Available

Origami has been updated to version 1.2 bringing with it a host of updates.

1513281_245922745570320_27242416_n

http://facebook.github.io/origami/update/

 

What’s new in 1.2:

  • By popular request! — Added an iPad device to the Phone patch, specified from the Phone Dimensions patch
  • Added functionality for designing in Landscape mode in addition to Portrait mode, specified from the Phone Dimensions patch
  • The Phone patch now shows a touch point instead of the mouse cursor
  • Added a new Browser Chrome patch, which styles the viewer window to look like a web browser when the composition is running
  • Added a new Browser Buttons patch, which gives you the state of the back and forward buttons from the Browser Chrome patch
  • Added new Hex to RGB and RGB to Hex patches, which convert hex strings to RGB values and vice versa
  • Added a new Index Switch patch, which switches between multiple index values and remembers its current index
  • Added a new Velocity patch, which outputs the difference in value between the previous frame and current frame
  • Added new Cursor Control patch, which allows you to hide or change the appearance of the cursor
  • Redesigned Quartz Composer’s toolbar icons
  • Images now keep their names when dragged onto the canvas
  • Improved plugin loading in some cases

 

 

Quartz Composer Gone Wireless

In what could be the first ever Quartz Composer April fools joke Bartosz on the Macoscope blog has just released a wireless qc plugin.

 

connections

 

Some time ago I’ve tackled the problem of messed-up connections in Quartz Composer. While the cable-like solution was surely an improvement in comparison to the original implementation, I quickly realised it can be easily made much better. Instead of making connections even more cabel-ly, I’ve attacked the core of the problem – the connections themselves.

With Ethernet ports being almost gone from the MacBook lineup and with iOS devices missing them entirely, it’s clear that wireless is the future. Cables are artefacts of the last century. Many of their drawbacks constantly prevent people from living painlessly. Not only do cables tangle constantly, but also it is estimated that over 14 million people get injured every year tripping over them. The less cables in our day to day environment the better.

With this insightful idea in mind I’ve jumped into Xcode and within an hour I had a working antenna-based connections in Quartz Composer:

 

http://macoscope.com/blog/quartz-composer-gone-wireless/

jQC 1.0 A UI Framework for Quartz Composer released.

 

jQC 1.0 has been released and adds lots of new functions and compatibility with the Origami Macros.

 

jQC1dot0Poster

 

Version 1.0 is here! This is a major update to jQC, bringing with it 15 new patches as well as bug fixes and improvements to existing patches. This release is proudly Origami compatible, which means it can be used alongside the the framework without issue, and several take full advantage of Origami’s retina mode.. Big features include new animation patches, the Rubberband Scrolling patch, and substatial improvements to the Mobile Device Dimensions and Device Framer patches. This means you can now smoothly rotate devices into landscape and have your viewport size kept in sync. BIG thanks to everyone who has downloaded and provided feedback over the past year. Keep it coming, and keep doing good work.

 

This release includes the following new patches:

 

Boolean Toggle 2

Delay

Fade Out

Hit Target

Looping Animation

Parallax

Phone Cursor

Position Inspector

Rubberband Scrolling

Simple Animator

Swap Inputs (Number)

Swatches (Flat UI Colors)

Swatches (Flattastic)

Swatches (iOS 7 Colors)

Text Cursor

 

This release also includes and improves upon a number of earlier patches:

 

Align Inside

Channel Changer

Color Button

Crisp Text

Device Framer

Fancy Button

Focus & Unfocus

Gradient Clear

Hex to RGB

Highest Number

Lowest Number

If Any

Image Align

Initialize Boolean

Initialize Number

Initialize String

Interaction Lite

iOS 7 Blur (Box)

iOS 7 Blur (Masked)

Mobile Device Dimensions

Mouse Is Over Target

mouseUp

mouseDown

Multi Input Mini

Multi Input Large

Multi Input Chainer

Pixel Aligned Billboard

Rectangler

Sample & Hold (Number)

Status Light

Sticky Toggle

Sticky Toggle (Boolean)

Sticky Toggle (Index)

Sticky Toggle (Number)

Sticky Toggle (String)

 

There are also annotated example comps for all patches included for reference.

 

Release notes:

  • The Moto 360 smart watch, Nexus 4 and iPad have been added to the Mobile Device Dimensions and Device Framer patches

  • Device Framer now accepts images and can be paired with Rubberband Scrolling

  • Rectangle has been renamed to Rectangler to avoid a name overlap with Origami

  • Color Button now resizes to fit the button label, and will switch to the “width” and “height” attributes if they are larger.

  • Boolean Multiplexer (Number) has been removed due to bugs and limited utility.

  • Boolean Toggle has been removed and replaced with Boolean Toggle 2. The new patch has more sensical IO port names, so the new patch was introduced to prevent existing comps from breaking.

  • Underscores have been removed from patch input & output names (hat tip to the Origami folks for fixing the Apple bug)

  • Hex to RGB now includes Alpha as an option

  • iOS 7 Blur patches now have the ability to adjust the blur radius and connect Interaction patches for click-and-drag repositioning.

  • iOS Blur Interactive example file has a mask that becomes misaligned when dragged outside the viewport

  • IOS Blur Interactive example file has a misaligned device frame

 

 

 

 

http://qcdesigners.com/index.php/forums/topic/100/it-s-finally-here-j-qc-1-0-a-u/view/post_id/380

Graphics Tools Updated

A new update has recently been released for Graphics Tools.

Quartz Composer 4.6(151) Framework 5.1(319)

https://developer.apple.com/downloads/index.action

Whilst there is no change log for this update i imagine over the next few weeks any changes or updates will become apparent.

 

EDIT: It appears this update to Graphics Tools still runs the same versions of Quartz Composer as the previous Graphics Tools download from October 2013

Quartz Composer Plug-In Manager

qcpm-icon

The developer behind Coge and Vezer have just released a free tool for Quartz Composer.

Its an app for installing plugins, fixing plugin related issues and some other misc things. You can drag and drop multiple plugins into the Install tab, the app will detect where to put them (official API plugins or not). On the manage tab you will see a list of all the plugin installed, marked with red where are problems, and that way you should see a button to fix those issues. Issues could be multiple versions (so you have installed 1.0 and 1.1 version of the same plugin, which is dangerous), multiple instances of the same plugin and plugins-in-the-wrong-folder as well.

INSTALLING PLUGINS

Installing Quartz Composer Plugins could be confusing since there are multiple type of plugins: official API pluginsshould be installed into Plug-Ins, while Skanky SDK plugins should be installed into Patches directory.

Drop in one or multiple Quartz Composer Plugins to the Install tab of the Plugin Manager, the tool will auto-detectwhere the plugins should be placed, and will copy there for you!

FIXING ISSUES

The tool can detect if a plugin has been installed to thewrong directory, and it can also detect whenever multiple instances have been installed of the same plugin, which could be a root of many problems with plugins.

The Manage tab gives you a list of all the Quartz Composer Plugins installed, and allows you to fix all the issues with a single click.

http://imimot.hu/qc-plugin-manager/