Unsupported — We cannot guarantee that this software will work properly on Mac OS 10.8 and above. Please be careful.

Release: GL Tools, v20080115

Release Type: Beta
Version: 20080115
Release Notes

This GL Tools beta adds support for line stippling (no line texturing yet), and adds a new patch, Read Pixels.

Read Pixels reads the QC Viewer's output when it's evaluated, and outputs what the viewer would display. This means it won't read from higher layers if it's attached to a low-layer consumer.

Currently it's pretty limited: It reads the whole frame, and only the Color data. In upcoming betas I'll include inputs to control where it reads from (x, y, width, height), and I'll probably add Depth-Buffer reading too.

PreviewAttachmentSize
GLTools-20080115.zip132.2 KB

cwright's picture
Demo Screen shot

This is a really boring image, showing Read Pixels to generate a bunch of billboards.

Note the unspeakably bad framerate... I'll have to work on that...

PreviewAttachmentSize
ReadPixels.jpg
ReadPixels.jpg55.75 KB

yanomano's picture
interesting

Something like a macro patch who can render all the thing inside him in a defined ROI would be cool....Don't know if this is what you are trying to do with the read pixel", but something in the open gl context would be great too....

yanomano.

cwright's picture
no plan

I'm not really trying to do anything with Read Pixels other than do some more gl manipulation stuff. We've had some requests to read pixels from the depth buffer, the desktop, and other assorted places (shadow maps), so I'm experimenting with this to see if it's reliable.

What's ROI? (in English it's 'Return On Investment', which is a financial term.... probably not what you were meaning :)

yanomano's picture
region of interest

You define a region where ther render is done

yanomano.

cwright's picture
ahh

I get it. I guess I'm just stupid when it comes to acronyms :)

franz's picture
Render In Image

You are describing the " render in image " patch behaviour.

yanomano's picture
not render in image

in 3D software there are multiple-views but there is no render in image...it stay in open GL.... On the screen of you mac too....:)

yanomano.

PreviewAttachmentSize
Image 14.png
Image 14.png201.95 KB

cwright's picture
ROI in OpenGL

As far as OpenGL's ReadPixels function goes, there's no way to change the perspective to get a multi-view effect.

. o O (unless all views were looking at the same thing, from the same direction, which isn't very interesting...)

So this patch effectively does as Franz suggested; It's like Render In Image, but for the composition itself instead of a subpatch. It's also probably much slower (because it moved graphics data across the bus twice per frame, once for read and once for creating the texture), but this can probably be corrected when I get a chance to reverse engineer some of the image stuff to learn how to use FBO's/PBO's and keep QC happy at the same time.

franz's picture
stippling

Line stippling is really usefull for "architectural sketch" like effects... Could you add this parameter to splines as well ? (or is it not possible the way splines are implemented ?) Thxx

cwright's picture
spline stippling

Unfortunately, splines are composed of many many tiny lines. Stippling them probably wouldn't do what you want.

We could sort-of-stipple by skipping defined line segments, but the line segments aren't guaranteed to be a uniform length, so it wouldn't always look correct. If you want, I can add this to the next beta so you can see how it looks :)

Installation Instructions

Place the plugin file in
/Users/[you]/Library/Graphics/Quartz Composer Patches/
(Create the folder if it doesn't already exist.)

A set of patches for drawing GL primitives and modifying the GL environment.

Source code is available on GitHub.

Credits

Logo by @usefuldesign.au.

Known issues

  • The GL Field of View patch doesn't work properly on Mac OS 10.9 (it produces stretched output).