Questions on Alpha12

15 views
Skip to first unread message

Hunter McCurry

unread,
Apr 7, 2011, 6:50:37 AM4/7/11
to field-de...@googlegroups.com
Hi Everyone,

It's been a while since I've posted to the list but starting soon, you can expect a little bit more noise from me. I've just downloaded the most recent alpha 12 release and I have to say it looks pretty slick. Having upgraded from Field beta 11a, I just have a couple quick questions:

1. Is there still a way to zoom on the canvas? I noticed that holding down option while scrolling no longer works. Clearly, I can zoom programmatically if I write something like:

_self.enclosingFrame.sx = 1
_self.enclosingFrame.sy = 1

but is there still a way to do this using a mouse and/or a shortcut key?

2. The OpenCV tutorial is no longer up on the site. I'm guessing this has something to do with the fact that the OpenCV tutorial needed to run in 32 bit mode? Anyway, assuming that OpenCV isn't a good option to peruse at the moment, can you suggest a straight-forward way of getting camera input into field and messing with it / processing it? Ideally I'd be hoping to get things working with Field's main renderer but if there's been success with it, I'd still consider working with the Processing renderer.

3. I had an older sketch I was working on in which I brought in image file onto a fullscreen canvas where I was then applying some image filters. Some of my code has stopped working properly in Field 12. Specifically, when running a box with the following code:

from CoreGraphics import *
canvas = getFullscreenCanvas()
_self.lines = canvas.lines()

myImage = image(_self.sheetDataFolder+"anyJPG.jpg")
myImage *= Vector2(0.1, 0.1)

_self.lines.clear()
myImage.show((-50,-50))

everything appears to run properly, except I never see the image displayed on the canvas. However, I can verify that the canvas is still working because then running the lines:

line = PLine().moveTo(0,0).lineTo(10,10)(color=Color4(1,1,1,1))
_self.lines.add(line)

shows a line as one would expect. At any rate, when I run all of the above code using the older Field (beta 11a) everything works. Can you think of something that might have changed with the latest version?

That's all for now,
Hunter


--
P. Hunter McCurry
Masters Student in Music, Science and Technology
CCRMA, Stanford University
www.huntermccurry.com

Marc Downie

unread,
Apr 8, 2011, 1:46:10 AM4/8/11
to field-de...@googlegroups.com, Hunter McCurry

Hunter,
 
1. Is there still a way to zoom on the canvas? I noticed that holding down option while scrolling no longer works. Clearly, I can zoom programmatically if I write something like:

_self.enclosingFrame.sx = 1
_self.enclosingFrame.sy = 1

but is there still a way to do this using a mouse and/or a shortcut key?


Command-minus and command-= should zoom out and in. Shift, middle mouse button drag will zoom (middle mouse by itself will pan). f1 will reset if you get lost.

 
2. The OpenCV tutorial is no longer up on the site. I'm guessing this has something to do with the fact that the OpenCV tutorial needed to run in 32 bit mode?

Yes. Field 12 basically doesn't have a 32 bit mode. Even though OpenCV works just fine when compiled as a 64 bit lib, none of the popular bindings to Java seem to have been recompiled to support it. Worse, that project itself seems to be going through a bit of a transition right now with respect to it's bindings to other languages.
 
In any case, if the lack of 32 bit Field is holding you (or anybody else) back here's an experimental build:


There's a problem that this build has resizing the canvas which we know about and probably other problems that we don't know about. I expect to have Field 13 distributed in two flavors.

Following along in this vein:


Is a build of Field that appears to work on Intel GMA/GMX graphics hardware. Again there are some issues. This will be a command line / preferences option in Field 13.

Testing requested!

Anyway, assuming that OpenCV isn't a good option to peruse at the moment, can you suggest a straight-forward way of getting camera input into field and messing with it / processing it? Ideally I'd be hoping to get things working with Field's main renderer but if there's been success with it, I'd still consider working with the Processing renderer.

Right now for live input that just needs to be processed by OpenGL be using Syphon. For live analysis I hack my own parts of OpenCV into Java using JNA or JNI. Yuck.
 
3. I had an older sketch I was working on in which I brought in image file onto a fullscreen canvas where I was then applying some image filters. Some of my code has stopped working properly in Field 12. Specifically, when running a box with the following code:

from CoreGraphics import *
canvas = getFullscreenCanvas()
_self.lines = canvas.lines()

myImage = image(_self.sheetDataFolder+"anyJPG.jpg")
myImage *= Vector2(0.1, 0.1)

_self.lines.clear()
myImage.show((-50,-50))

everything appears to run properly, except I never see the image displayed on the canvas.

This sounds like a bug.  Can you send me (off list) the sheet?

best,

Marc.

Marc Downie

unread,
Apr 8, 2011, 6:06:01 AM4/8/11
to field-de...@googlegroups.com, Hunter McCurry
3. I had an older sketch I was working on in which I brought in image file onto a fullscreen canvas where I was then applying some image filters. Some of my code has stopped working properly in Field 12. Specifically, when running a box with the following code:

from CoreGraphics import *
canvas = getFullscreenCanvas()
_self.lines = canvas.lines()

myImage = image(_self.sheetDataFolder+"anyJPG.jpg")
myImage *= Vector2(0.1, 0.1)

_self.lines.clear()
myImage.show((-50,-50))

everything appears to run properly, except I never see the image displayed on the canvas.


This has now been fixed in the repository (rev 58). That said, while it's nice that canvas.lines() behaves just like _self.lines does, it's a pretty inflexible way of drawing an image in the main renderer (for example, it's not using the current shader, it always uses a "vanilla" one that just draws images). If you are heading towards anything sophisticated take a look at the Image / FBO stuff here

best,

Marc.

Reply all
Reply to author
Forward
0 new messages