Just released Box2D plugin, that I'll use for an upcoming show.
Feature set is quite minimal at the moment, but I expect to expand it over the next few month.
Thanks for releasing this. When I saw it on your blog yesterday I was licking my lips, and started looking at a way to put it together myself. I've been wanting some kind of box2d stuff in qc for years. My fav is the fretehand draw physocs stuff.
On 10.6.6 I found that whilst honoured and listed in the Patch Library in 32 bit mode QC, once I had generated a crash with the plugin in 64 bit mode QC, it simply disappeared from the Patch Library window in 64 bit mode QC, whilst still available in 32 bit mode QC.
Thanks for sharing , really nice.
BTW, the crash probably is directly related to the use of an Iterator, which doesn't cause such a fuss in 32 bit mode.
It does some wicked stuff when iterated :-). Scale to 0.1 in a 3d Transform reveals much too. Can be successfully audio visualized.
One final look before shutdown and even your demo composition doesn't open up in QC 64 bit.
Perhaps clearing the QC cache will make a difference.
I know you don't recommend placing the Box2d within an iterator, but it does seem to do some spectacular things when placed into such a process patch.
Using a higher iteration rate than 3 does really give a pretty gross performance hit.
Besides, upon further examination of what can and can't be 'safely' achieved with the box2d plugin, I'm now wondering , apart from affecting , by way of accelerating the rate of box propagation, what else can be usefully achieved by placing that plugin patch into an iterator.
I really like the way it just keeps on popping up boxes.
it will create one box per frame, so at 60FPS, you'll have 60boxes per seconds.
I'll modify it and publish a RATE input, so you can have more.
(and publish friction and bounce param. as well)
due to the bouncing value I hardcoded.
Will also publish this parameter for tweaking.
The problem with these parameters is that they are object-level, not global, so it will happen at the creation of an object, you can't change them live.
Once the object is created, you're done.
(waiting for a few remarks/features, then eventually implement them, if they're not too much of a hassle. But so far I'm ok with it right now, it will be perfect for my performance ---boxes controlled by sound---)
Weirdly enough - plugin appeared in 64 bit QC, was working in that QC, then crashed and no longer appeared. Perhaps I ought to try de-installing the patch and see if I can reproduce that, but I'm having too much fun with it in 32 bit QC to try that to be honest :-).
Also placing the box2d render patch inside any macro seems to affect the way it's working.
Funnily enough I've found that my Iterator based Box2d comps seem rather more stable than when simply wrapped in a plain macro and that's using pretty much the same core construct. See IteratedBox2D_1.qtz attached below, doesn't use AC Signal. Also needs an audio file for audio throughput. Have attached the audio file used for completeness.
Must see if the patch works nicely with Kineme Audio Tools.
Furthermore, constructs outside of a macro , at stage level 0 as it were are crashy , yet will render when wrapped in a plain macro.
See attached 008 - at level 0, 008a , within a macro. 008 crashes for me, whilst 008a renders . BTW both of these use AC Signal, shall swap out for the private patch Signal and see if that helps out with 008.
Definitely a lot of fun to work with, but seems a trifle delicate, especially if signalling true / false to the switching inputs . [see comment above though about switching Booleans]
After further experimentation, I'm finding that almost all the Boolean inputs are actually pretty stable on switching on and off, except for the Move switch input.
& after further experimentation, I'm finding that it's the way and the periodicity with which one feeds the values to the Boolean seems crucial.
I'm not trying to build an Angry Birds comp but would it be possible to have the controls as none globals? I tried to place a second set of boxes to act as obstacles (without movement/gravity etc) but it seems these values are being read anyway from the other box instance. See attached.
Very very good! super addition to the already impressive collection of 1024 plug-ins. hope you develop this. the 2DBox engine is nice!
feature requests:
polygons, image input (of course) and joints
can't explain the non-linear thought process, but nam june paik and the iggy pop song tv eye come to mind. guess this makes me want to fill the screen with tv eyes or something....
So far as I can make out your comp's 2nd Box2d patch isn't even having elements attached as the Boolean value is not being entered. Consequently no 2nd set of boxes results. There does seem to be a 'sharing' of information after a fashion between the two patches when both are required to Add Elements, like Gravity and Mouse position.
What you need to do is Spotlight on Quartz Composer, Select Quartz Composer application icon, Command + C to copy the application, Command + V to replicate the application,Command + i to get info on the duplicated application, set to 32 bit in the Info panel and rename to QC 32 bit or something similar, open Box2d applications only in this duplicated, 32 bit version of Quartz Composer and you'll never see those worrying messages again :-)
_1024 Box2d is not fully 64 bit compliant. I haven't found version 1.1 cropping up once in QC 64 bit like version 1.0 did once [and once only, then crashed, then I got those messages you have reported above]
Version 1.1 plays nicely with some of the older children like Matrix Mult and Polygon Mode. Within an RII, additional elements need additional nudging rather than a one off switch to true. Curiously enough, any of the Boolean inputs will do some kind of nudging.
Thanks so much for this new one ! I love your plugins.
Don't know if it would be possible but, apart of dreaming of an enabled image input, I would like to be able to drag few of the boxes with the "Move" input, like I did with a "brush" on your Bezier Plugin (see http://kineme.net/forum/Discussion/Programming/1024GLBezierSurface#comme...).
So I can make the shadow move precise boxes VS using gravity like in the vids posted below... :-)
Thanks again for sharing your (hard) work ! Hope you're happy with this "Euphorie" I had the pleasure to see in Le Cube.
Maybe not/maybe so. I do see the pic that shows only one box2d plugin, so you may be right on, but this probably bares mentioning:
I upgraded, and was getting restoration problems (in 32bit) until I realized that the old plugin didn't get appended w/ "old" (talking about kinemecore functionality now).
There are two plugins now; one with a .1 appended. So, when you "upgrade" with something like k-core, the old one doesn't get pushed out. When QC loads, it will most likely load the first one instead of the second, because of the dates (I believe).
So, one needs to manually remove the old box2d plugin. I can't remember exactly what you can/can't change to make sure the old one's get pushed out w/ k-core. I think the fact that the plugin has a dif name, even though the class is the same, may have been the impasse.
As you've looked at this, do you think it would be possible to output a useable structure instead of directly rendering?
(I know you never publish source, but I would really like to implement the box2D free draw stuff. If you ever see fit to publish or share the proj, I would certainly try to get that going and pass it back to you as time permits.)
Draft version... :-)
I deleted the shadow videos in there, but you can track any color for creating boxes (one box each time the color X changes with a "Signal" patch).
Well spotted about the retention of the prior version and partial lack of Kineme Core functionality.
However, those messages reported by Rick, I only get when I open a _1024 comp in QC 64 bit. BTW, I've updated the Box2D MultMatrix , just to ensure it has the version 1.1 functionality.
I did get a slightly different but similar failure to fully fly message right after the upgrade and yes, removing the old plugin removed that partial failure in QC 32 bit , but it didn't actually stop the rendering from happening, despite being preceded by that message.
woot, woot. great idea. taking a class in programming physics right now. very interesting stuff. just made it to free falls, trajectories, and drag or friction problems right now. would be sweet if i could just use this plugin for the free fall problem but i have to show how i am compensating for non uniform gravity and things like that although i am able to use qc. i'm thinking this class will help me improve my angry birds score.
One of the coolest box physics examples lets you draw shapes freehand, which you can then interact with, toss around etc. If you draw a long curve, it has a kind of springiness, for example.
Thanks for releasing this. When I saw it on your blog yesterday I was licking my lips, and started looking at a way to put it together myself. I've been wanting some kind of box2d stuff in qc for years. My fav is the fretehand draw physocs stuff.
On 10.6.6 I found that whilst honoured and listed in the Patch Library in 32 bit mode QC, once I had generated a crash with the plugin in 64 bit mode QC, it simply disappeared from the Patch Library window in 64 bit mode QC, whilst still available in 32 bit mode QC.
Thanks for sharing , really nice.
BTW, the crash probably is directly related to the use of an Iterator, which doesn't cause such a fuss in 32 bit mode.
It does some wicked stuff when iterated :-). Scale to 0.1 in a 3d Transform reveals much too. Can be successfully audio visualized.
One final look before shutdown and even your demo composition doesn't open up in QC 64 bit.
Perhaps clearing the QC cache will make a difference.
great stuff - I was hoping for ages that someone might integrate something like the Bullet physics engine into a QC plugin!
this is so brilliant! looking forward to when the 'image input' is enabled ;-)
Mask support with Images would be nice too. Would the Box2d lib support that? i.e. collisions would take into account the mask.
the plugin is NOT 64bit friendly. There's some 64bit related issues in my B0x2d lib. Currently 32 bit only.
Also, placing the Box2D in an iterator is not recommended.
Thanks for the feedback, franz.
Great work BTW :-).
I know you don't recommend placing the Box2d within an iterator, but it does seem to do some spectacular things when placed into such a process patch.
Using a higher iteration rate than 3 does really give a pretty gross performance hit.
Besides, upon further examination of what can and can't be 'safely' achieved with the box2d plugin, I'm now wondering , apart from affecting , by way of accelerating the rate of box propagation, what else can be usefully achieved by placing that plugin patch into an iterator.
I really like the way it just keeps on popping up boxes.
Works nicely in a GL Polygon Mode patch too.
it will create one box per frame, so at 60FPS, you'll have 60boxes per seconds. I'll modify it and publish a RATE input, so you can have more. (and publish friction and bounce param. as well)
The only thing I'm having happen that I consider "weird" is that all of the boxes bounce every few seconds.
due to the bouncing value I hardcoded. Will also publish this parameter for tweaking. The problem with these parameters is that they are object-level, not global, so it will happen at the creation of an object, you can't change them live. Once the object is created, you're done.
(waiting for a few remarks/features, then eventually implement them, if they're not too much of a hassle. But so far I'm ok with it right now, it will be perfect for my performance ---boxes controlled by sound---)
Weirdly enough - plugin appeared in 64 bit QC, was working in that QC, then crashed and no longer appeared. Perhaps I ought to try de-installing the patch and see if I can reproduce that, but I'm having too much fun with it in 32 bit QC to try that to be honest :-).
Also placing the box2d render patch inside any macro seems to affect the way it's working.
Funnily enough I've found that my Iterator based Box2d comps seem rather more stable than when simply wrapped in a plain macro and that's using pretty much the same core construct. See IteratedBox2D_1.qtz attached below, doesn't use AC Signal. Also needs an audio file for audio throughput. Have attached the audio file used for completeness.
Must see if the patch works nicely with Kineme Audio Tools.
Furthermore, constructs outside of a macro , at stage level 0 as it were are crashy , yet will render when wrapped in a plain macro.
See attached 008 - at level 0, 008a , within a macro. 008 crashes for me, whilst 008a renders . BTW both of these use AC Signal, shall swap out for the private patch Signal and see if that helps out with 008.
Definitely a lot of fun to work with, but seems a trifle delicate, especially if signalling true / false to the switching inputs . [see comment above though about switching Booleans]
Would blending support be possible?
After further experimentation, I'm finding that almost all the Boolean inputs are actually pretty stable on switching on and off, except for the Move switch input.
& after further experimentation, I'm finding that it's the way and the periodicity with which one feeds the values to the Boolean seems crucial.
Box2d with Audio
I'm not trying to build an Angry Birds comp but would it be possible to have the controls as none globals? I tried to place a second set of boxes to act as obstacles (without movement/gravity etc) but it seems these values are being read anyway from the other box instance. See attached.
Or am I doing something wrong here?
Very very good! super addition to the already impressive collection of 1024 plug-ins. hope you develop this. the 2DBox engine is nice!
feature requests: polygons, image input (of course) and joints
can't explain the non-linear thought process, but nam june paik and the iggy pop song tv eye come to mind. guess this makes me want to fill the screen with tv eyes or something....
1024 rocks.
So far as I can make out your comp's 2nd Box2d patch isn't even having elements attached as the Boolean value is not being entered. Consequently no 2nd set of boxes results. There does seem to be a 'sharing' of information after a fashion between the two patches when both are required to Add Elements, like Gravity and Mouse position.
1.1 release, download from the same place.
Now has a "Add Static Box" option, and a few other tweakable parameters, like friction, bouncing, simulation quality, blending....
Note: this patch is not intended to have 2 instances within the same QTZ.
check the new version for obstacles
Thanks for the clarification and many thanks for the update.
[From here on, no more than one Box2D patch per single QC comp :-)].
Hello All, Please help, after installing (as usual) to / library / graphics / quartz composer plugins
I still get this (below).
thanks.
(null): Patch with name "QCPlugInPatch:_1024_BOX2DPlugIn" is missing
BOX2D Cannot create node of class "QCPlugInPatch" and identifier "_1024_BOX2DPlugIn"
BOX2D Cannot create connection from ["outputResult" @ "Expression_1"] to ["inputMove" @ "PlugInPatch__1024_BOX2DPlugIn_1"]
BOX2D Cannot create connection from ["outputSignal" @ "Pulse_1"] to ["inputAddStatic" @ "PlugInPatch__1024_BOX2DPlugIn_1"]
BOX2D Cannot create connection from ["key_0063" @ "Keyboard_1"] to ["inputClear" @ "PlugInPatch__1024_BOX2DPlugIn_1"]
BOX2D Cannot create connection from ["outputY" @ "Mouse_1"] to ["inputY" @ "PlugInPatch__1024_BOX2DPlugIn_1"]
BOX2D Cannot create connection from ["outputResult" @ "Expression_3"] to ["inputAdd" @ "PlugInPatch__1024_BOX2DPlugIn_1"]
BOX2D Cannot create connection from ["output" @ "Multiplexer_1"] to ["inputGravY" @ "PlugInPatch__1024_BOX2DPlugIn_1"]
BOX2D Cannot create connection from ["outputX" @ "Mouse_1"] to ["inputX" @ "PlugInPatch__1024_BOX2DPlugIn_1"]
BOX2D Cannot create connection from ["output" @ "Multiplexer_4"] to ["inputColor" @ "PlugInPatch__1024_BOX2DPlugIn_1"]
Macro Patch State restoration failed on node "Patch_1"
(null) State restoration failed on
What you need to do is Spotlight on Quartz Composer, Select Quartz Composer application icon, Command + C to copy the application, Command + V to replicate the application,Command + i to get info on the duplicated application, set to 32 bit in the Info panel and rename to QC 32 bit or something similar, open Box2d applications only in this duplicated, 32 bit version of Quartz Composer and you'll never see those worrying messages again :-)
_1024 Box2d is not fully 64 bit compliant. I haven't found version 1.1 cropping up once in QC 64 bit like version 1.0 did once [and once only, then crashed, then I got those messages you have reported above]
Version 1.1 plays nicely with some of the older children like Matrix Mult and Polygon Mode. Within an RII, additional elements need additional nudging rather than a one off switch to true. Curiously enough, any of the Boolean inputs will do some kind of nudging.
Thanks so much for this new one ! I love your plugins. Don't know if it would be possible but, apart of dreaming of an enabled image input, I would like to be able to drag few of the boxes with the "Move" input, like I did with a "brush" on your Bezier Plugin (see http://kineme.net/forum/Discussion/Programming/1024GLBezierSurface#comme...).
So I can make the shadow move precise boxes VS using gravity like in the vids posted below... :-)
Thanks again for sharing your (hard) work ! Hope you're happy with this "Euphorie" I had the pleasure to see in Le Cube.
Maybe not/maybe so. I do see the pic that shows only one box2d plugin, so you may be right on, but this probably bares mentioning:
I upgraded, and was getting restoration problems (in 32bit) until I realized that the old plugin didn't get appended w/ "old" (talking about kinemecore functionality now).
There are two plugins now; one with a .1 appended. So, when you "upgrade" with something like k-core, the old one doesn't get pushed out. When QC loads, it will most likely load the first one instead of the second, because of the dates (I believe).
So, one needs to manually remove the old box2d plugin. I can't remember exactly what you can/can't change to make sure the old one's get pushed out w/ k-core. I think the fact that the plugin has a dif name, even though the class is the same, may have been the impasse.
As you've looked at this, do you think it would be possible to output a useable structure instead of directly rendering?
(I know you never publish source, but I would really like to implement the box2D free draw stuff. If you ever see fit to publish or share the proj, I would certainly try to get that going and pass it back to you as time permits.)
Sorry, I should have said also : I did a rapid click on the boolean to produce the obstacle boxes.
Oups... I forgot posting the comp'
Draft version... :-) I deleted the shadow videos in there, but you can track any color for creating boxes (one box each time the color X changes with a "Signal" patch).
Well spotted about the retention of the prior version and partial lack of Kineme Core functionality.
However, those messages reported by Rick, I only get when I open a _1024 comp in QC 64 bit. BTW, I've updated the Box2D MultMatrix , just to ensure it has the version 1.1 functionality.
I did get a slightly different but similar failure to fully fly message right after the upgrade and yes, removing the old plugin removed that partial failure in QC 32 bit , but it didn't actually stop the rendering from happening, despite being preceded by that message.
1.1 is awesome!
I'm not sure of the technical word for it, but this comp blows up on me - it goes red.
Any ideas how to avoid that + get it working?
woot, woot. great idea. taking a class in programming physics right now. very interesting stuff. just made it to free falls, trajectories, and drag or friction problems right now. would be sweet if i could just use this plugin for the free fall problem but i have to show how i am compensating for non uniform gravity and things like that although i am able to use qc. i'm thinking this class will help me improve my angry birds score.
That worked and thanks!
Thank You All, for the hard work and inspiration.
Did you install the 1.1 plugin WITH deleting the 1.0 one ? It seems that it matters...
Thanks, I ended up just reimporting the Box2D plugin into the comp which sorted things out.
Inspired by :
is a 'Cruiseship on Stormy Seas simulator!'
As usual, click 'S' to place the tables/fixed furniture and 'D' for passengers... ;-)
This is awesome.. Has anyone had any luck linking an image with alpha/transparency?
doesn't work yet. It's in the tube....
:-))) Yes, I'm working on Haruki Murakami right now and his novel about the Kobe Earthquake !
Just wondering if there's any chance that the following could be implemented in your great Box2D plugin?
i) 2 Image support; one image for the fixed box and another for the bouncing boxes.
ii) Could the alpha channel of images be taken into consideration for collisions? i.e. boxes would not collide on the transparent part of images
i- it's in the works. image structure input. problematic at the moment however.
ii- no, that's impossible, due to how box2d work internally.
and could it support circles?
One of the coolest box physics examples lets you draw shapes freehand, which you can then interact with, toss around etc. If you draw a long curve, it has a kind of springiness, for example.
how can i do this, pls? http://vimeo.com/35798395 how can i use more types of words in one composition? thx for help. d.
with the published plugin you can't. Adrien is using a heavily modded, super-hackish version of _1024_BOX2D ...