Kineme PDF Renderer

Range for Crop patch dimensions to fit Screen Dimensions?

usefuldesign.au's picture

Since the size of the image I'm displaying is a larger texture than what the billboard patch can render, I need to crop it to the section I wish to display.

Since I want to pan around the image with mouse, I need to update the crop dimensions as user drags. The crop patch is hard-wired to pixel co-ordinates of the mouse ATM.*

I want to put in a hard limit on how far (how much) the image will crop so that when the image is dragged to the edge of Window the cropping ceases to stop the image from shrinking the way it does in my composition.

In the given example shrinking starts when Crop X <0 or Crop X >360; or when Crop Y <> 0. But I can hard-code those numbers since a window resize or image zoom changes everything. (There is a Zoom control published to Root which you can change).

I'm having trouble discerning what the relationship of the Crop Inputs and the screen edges is.

*At moment it just follows the mouse since I haven't written the 'dragging' code to detect mouse-down and update co-ordinates when users drags but that's not relevant to this problem.

(Kineme) PDF rendering on Billboard bug.

usefuldesign.au's picture

I've been tracking an bug for months now that I'm going to call a Kineme PDF Renderer bug. There's a chance it is just in the QC pipelines. It seems to be associated with multipage PDFs rather than one page PDFs.

Symptoms & things I've learnt about bug:

  1. the bug commonly appears as a 'white-out' of the image area on the billboard or sprite;
  2. the bug occassionally appears as a 'black-out' of the whole viewer on the billboard/sprite layer that is effected;
  3. the bug can appear as RAM noise/glitch;
  4. once the bug is 'on' comp can be run and stop countless times without the bug clearing;
  5. once the bug is 'on' comp QC can be Quit and Restarted without the bug clearing;
  6. the bug appears with no plugins or patches loaded (from any folder) except Kineme PDF Renderer;
  7. I may in the past have reproduced it in the Image Importer patch with extract all images using a multipage PDF but I can't repeat this and that may have occurred because:
  8. the bug can effect billboards in other compositions not using Kineme PDF Renderer in addition to any billboards/sprites in the compostion where a Kineme PDF render patch is;
  9. making the file via AI eps individual files and converting to multipage PDF in Acrobat still gets the bug
  10. I've tried every PDF standard known to the print world (not quite, but PDF1.3-1.7 with many output option combinations) and no discernible diff
  11. when you have an Editor window* partly over a Viewer window that is displaying the PDF image, even if the bug is not occuring in Viewer a glitching always occurs. Region of glitch/break-up being Editor Viewer rendering a PDF. (Hint?)
    *Editor is non-opaque so KinemeCore must be installed for this test;

Why it matters:

Wikipedia wrote:
Images are maintained in their native form for as long as possible before rasterizing for display. This means that it will keep vector images as vectors when cropping, scaling, rotating, or translating. This allows it to work with very large logical image dimensions without consuming large amounts of memory or processing time. Such functionality is most apparent when working with text-based images, or PDFs.

Despite such praise, PDFs from the image import defaults to a set resolution. When using bit map (TIFF, whatever) they scale up poorly when viewer size is increased (yuk interpolation). Less obvious is the fact that QC also scales down bitmaps poorly resulting in jaggies compared to an optimised image size. I guess mipmapping is a possible answer to this issue — only just thought of it.

Kineme PDF Renderer has dynamic resolution and therefore generally gives a much cleaner edge on line art at any Viewer size, even when just set to a high res output and just left there.

I tried a bunch of workarounds like loading single page PDF files into a queue from the Kineme PDF Renderer output but the bug eventually got me there too.

In the end I just queued the Kineme PDF Renderer output at a compromise resolution for typical display size. Made sure no bug. Then saved the file to a plist with Structure to File. Would love to see this bug ironed out! It's being wasting me ;-)