Looks like the constant battle against comment spam has turned into a losing one. I’m going to turn them off for a while, but feel free to contact me directly at Dale at the site url or ping me on twitter using the icon in the corner. Sorry about this.
Just posted the source on github to a small demo app demonstrating using an SCNProgram for alternate lighting models in SceneKit. GLSL shaders for Phong Point Light, Blinn, Edge Fuzz, EnvMap, Glossy Wet Highlight, Gooch, Hemishpere, Lamb Skin, Thin Film and Velvet lighting models included. Based on a Quartz Composer conversion of NVIDIA Samples from toneburst(machinesdontcare.wordpress.com).
Starting to make nice progress on integrating Scene Kit and Motion. I’m now able to use Motion’s 3d transforms, light and camera data.
A couple of gotcha’s, the matrix transform from the FxPlug Fx3DAPI needs to be remapped to work with a CATransform3D with something resembling the following.
void GLtoCATransform3D(double layerMatrix , CATransform3D *t)
t->m11 = layerMatrix ;
t->m12 = layerMatrix ;
t->m13 = layerMatrix ;
t->m14 = 0.0;
t->m21 = layerMatrix ;
t->m22 = layerMatrix ;
t->m23 = layerMatrix ;
t->m24 = 0.0;;
t->m31 = layerMatrix ;
t->m32 = layerMatrix ;
t->m33 = layerMatrix ;
t->m34 = 0.0;
t->m41 = layerMatrix ;
t->m42 = layerMatrix ;
t->m43 = layerMatrix ;
t->m44 = layerMatrix ;
and when using Core Animation in an FXPlug the
.usesSceneTimeBase needs to be YES on the CAAnimation to work correctly in plugin time. That also means the
duration property is in frames, not seconds
[vimeo clip_id=’71203195′ width=’500′]
I’m having a lot of fun hacking on Scene Kit, a relatively new 3D framewok for OSX. Scene Kit is a nice high-level object graph, but it lets you drop down into shaders and OpenGL as needed. Because it plays nicely with Cocoa conventions you get a
SCNRenderer that speaks
NSTimeInterval and fits in quite nicely in an FXPlug host. I still wish FCPX/Motion 5 hadn’t taken such a step back on user scripting and workflow tools, but you can see the bricks being built back up with a good solid foundation.
I often need to wrangle web pages for publication and quite often copy/paste is littered with referer info and session junk. Luckily, many websites can generate a clean url by just stripping everything after a ? in the url. This Safari Extension does just that, opens a url in a new tab with everything to the left of the ? symbol retained so you can check if your new url is usable for publication. The extension is installed as a context menu used while hovering over an anchor link.
I’m starting to migrate some of my code to github and I’ve started with a script to export an Adobe Illustrator path to Core Graphics code in an Objective-C class. This is mainly useful for iPhone development, but also might be useful for anyone looking to parse EPS style graphics.
[vimeo clip_id=’43645725′ width=’500′]
This is a small plugin for FCPX/Motion 5 that will allow you to import a CSV file to create text plates for things like slates, lower thirds, and titles.
FCPX continues to be a work in progress and I have the same reaction as most people. Seems powerful, but where’s x, y, and z? In the short term we seem to have lost a lot of data in xml transfers so I was looking for a way to populate slates in my projects without a lot of typing and this seemed to fit the bill.
This is the first public release so don’t use it in sensitive production projects until the plugin is battle tested because the project format for arbitrary data seems somewhat fragile and it seems easier to corrupt FCPX project files then you would ever find ideal. I’ve got a list of features as well as bugs to file and if there is interest this might become a useful production plugin, so please help me by trying it out and reporting any problems you might find. This will only work in the latest version of FCPX 10.4 and above.
06-09-12 1.0 Initial Public Release
06-14-12 1.1 30% Speed increase by using GLSL/FBO for Quartz Composer composite, stability fixes
[vimeo clip_id=’35717847′ width=’500′]
When working on custom projects I develop a lot of single use plugins for things like data visualization. Although I’m becoming more comfortable with OpenGL, my comfort zone for drawing is really using the tools available on OSX like Quartz 2d. After Effects is my favorite compositing environment and it took a while to build a working toolkit for OSX drawing in an After Effects plugin with things like build phases, importing frameworks, Objective-C++, CGContextRef, PF_EffectWorld, PF_Handle, etc. To help folks trying to get that toolkit together I thought I’d share a starting point XCode project as well as the base drawing code for one of the data viz tools I’m working on.
The XCode project can be a useful starting point for a developer interested in these kinds of projects. It includes linked frameworks, a reasonable memory allocation scheme (I think, more experienced devs feel free to point out any gotchas), a working example of how to use both CGContextRef and NSGraphicsContext and some useful drawing code.
The sample plugin is a Quartz Composer style laces plugin which can work nicely for connecting nodes or data visualizations. The included version is pretty bare bones, but if there is interest I am thinking about developing it in to a more full featured general purpose plugin.
This setup has worked for my needs and has been cursorily checked for bugs, leaks and crashers, but if you are going to use it for production work I’d make sure to attempt some pre-renders at the size, bit depth, etc. you are using to make sure there is not something I didn’t account for.
If you end up using the code in something you release, I’d appreciate a credit in the release notes. Tip of the hat to Edouard FISCHER for the original laces drawing code. Next up is a deeper dive into OpenGL, Quartz Composer, textures, and all kinds of fast drawing GPU goodness.
A new year and a chance for fresh starts. Luckily, Chris Green wrote something worth pointing to with Boethos, a code generator that generates JSX code for Adobe apps in conduction with the jsLinb UI Builder. It’s very nice way to generate a slick UI with a minimum of hassle and cut down on the broiler plate code writing. What more can a dev ask for?
I needed to zip some flash files that had changed in the last 3 days across a set of subdirectories. This is the one liner that I came up with. This is mainly for future me as this comes up all the time.
find /in/directory/ -mtime -3 | grep fla | xargs zip foundFiles
find /in/directory/ -mtime -3 finds all of the files changed in the last 3 days. -mtime has a nice set of options.
grep fla finds the flash files. Regular expressions can get really complicated. This one isn’t, so it’s possible that it might match unintended files. Run up to this part to see if it will grab your files of interest so you don’t zip a bunch of unnecessary files.
xargs zip foundFiles xargs is a handy utility that takes arguments from a pipe and hands them to another program – in this case zip.
After you run this you should have a zip in your home directory named foundFiles.zip or whatever you chose to call the files.