2D Fluid Flow fixed

stoney's picture

I was pleased to see the 2D Fluid Flow patch included with Snow Leopard, but surprised to find that it didn't work properly. All the velocities tended to be towards the lower-right. I poked around in the patch, and discovered that it seemed to be expecting velocity vectors to be signed, but QC doesn't appear to support images with signed channels.

I saw Rinboku's fluid movie, and that clearly works correctly. I assume that was not done with Apple's new patch. I don't see a patch corresponding to that movie anywhere.

So, I spent some time learning OpenCL and more about QC, and fixed (mostly) the Apple patch. Attached is a demo project, derived from one I found on Kineme, with a working version of the 2D Fluid Flow patch embedded. There are still some problems with the pressure, which I think is due to the sampler boundary setting in the pressure calculation, but it works quite well now, so I'm posting it here for comments.

I also enhanced the options so that you can watch the velocity and pressure images, and I changed the way it uses the inputs. It's common to keep the velocity input image running, but not the density input. I've set it up so that if you use a brush image with alpha, it will add that to the density (if enabled). There's also a gradient to velocity converter.

I'm amazed that such a buggy patch could have been released by Apple. Did I miss something?

I would appreciate any comments on this.

PreviewAttachmentSize
2dflow fixed.qtz398.17 KB

rinboku's picture
Re: 2D Fluid Flow fixed

Hi stoney, That was by only new patch.

PreviewAttachmentSize
2dflow02-2.qtz36.79 KB

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Wow! Thank you, Rinboku!

stoney's picture
Re: 2D Fluid Flow fixed

It took me a little while to figure out why Rinboku's patch worked as well as it did, but I concluded that it really did suffer from the unipolar velocity problem of the original fluid flow simulation. It was just harder to see because the velocity image was nearly all black, so it didn't cause the overall bottom-right velocity bias. The brush itself showed that bias, though.

I've rebuilt it to use my fixed fluid flow simulator. I had to modify the brush image so that it contained an alpha mask, and added a rotating velocity generator to it. The result is similar to the original, but is now clearly using a normalized velocity field, as the flow goes in all directions from the mouse brush.

It has a bug where clicking "Reset" at the top level locks it up. It looks like the pressure feedback loop is broken, but I haven't yet figured out how. Hitting stop then start works fine to reset the image.

PreviewAttachmentSize
Rinboku's 2dflow02-2 normalized.qtz57.66 KB

stoney's picture
Re: 2D Fluid Flow fixed

I finally figured out what was going on - the 2D Fluid Simulation requires float pixel images on input in order to calculate internally using float vectors. I've created a new version of the 2D Fluid Simulation that forces the inputs to float and provides pressure and velocity outputs.

Attached is an updated Rinboku patch that uses this new fluid simulator. I added a circular velocity generator so that the color brush would squirt in all directions.

I've also attached a new version of the "2dflow fixed" patch, that uses the new fluid simulator. This is useful because it has a red-green velocity image converter and velocity and pressure output viewer.

PreviewAttachmentSize
Rinboku's 2dflow02-2 V2.qtz58.15 KB
2dflow fixed v2.qtz475.07 KB

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Nice! I'm curious what kind of frames per second other folks are getting on these. With my crippled ATI2600HD gpu I get 3fps on (2dflow fixed v2) and 6fps on (Rinboku's 2dflow02-2 V2). Slooooooow for sure, but not enough to stop me from trying to use these in composition collages. heh.

cybero's picture
Re: 2D Fluid Flow fixed

2dflow fixed v2 - 20 - 19.99 fps

Rinboku's 2dflow02-2 V2 - 2.5 - 19.99 fps

2dflow02-2.qtz - constant 20 fps

running on iMac with

NVIDIA GeForce 9400:

Chipset Model: NVIDIA GeForce 9400 Type: GPU Bus: PCI VRAM (Total): 256 MB Vendor: NVIDIA (0x10de) Device ID: 0x0867 Revision ID: 0x00b1 ROM Revision: 3379

gtoledo3's picture
Re: 2D Fluid Flow fixed

I'm curious...

By velocity bias, do you mean the fact that the fluid kind doesn't drift completely downwards... so that if stuff pools at the bottom, it eventually kind of drifts up as if there is wind? I thought that was on purpose.

This kind of reminds me of the old iterator filter setups where you see yourself in a spiral, and the iterations are setup to make an angle/twist on purpose (and it is an iterator setup, which is kind of interesting to me).

At least that was my initial impression from using it.... I thought the angle was on purpose.

I would also be really hesitant to ever repost something of anybody's with the word "fixed" attached, because they might not think it was broken. Just throwing that out there! :)

EDIT- ah, I've read the discussion on the QC List... and the rest here...interesting.

dust's picture
Re: 2D Fluid Flow fixed

so i really haven't been able to investigate your fix. for some reason the 3 times out of 4 i have tried to look at the fix my system has crashed one time the gpu glitched my monitors out before i got a crash that required a forced restart or i have also gotten a kernel attack as well so, i can't comment on the fix or not. i don't understand i have 2 video cards 9400-9600 together i run 64 bit with max ram on a mbp. it confuses me because with apples 2d flow i am able to do feed back accumulation of a particle system with 2d flow as well as push 2d flow through a 3d height field on the cpu so not sure why the fix crashes me because it seems to be a static implementation.

anyways are you saying the input values are in pixel coordinates derived from the input image. it would be cool to offset the input x,y,z,w, like this but seeing it gets its values from the pixels is it possible to over ride like this. im new to open cl.

PreviewAttachmentSize
2D Fluid Simulation.qtz44.08 KB

leegrosbauer's picture
Re: 2D Fluid Flow fixed

20 FPS vs 3 FPS. hmmmm. Troy? Alessandro? You guys got connections? I'm just a creaky old man of no particular importance, but I'm nonetheless simply seething about this ATI Radeon 2600 functionality exclusion. Apple is going to fix this?

cybero's picture
Re: 2D Fluid Flow fixed

dust, sorry to have to tell you fella , but your virtual macro installed and did nothing.

I'm still getting used to virtual macros, but this one isn't doing what it ought to do and could be concatenating together a heap of disasters, some of which you have already reported.

Possibly an utterly unintended recursive error.

I'm just getting blank empty space - will look into this a little later, just having some fun with the PPC now I've updated my GL Tools on the old workhorse.

Kernel crash, mm. Back to the drawing board, methinks. I think I'd start with looking again at rinboku's excellent example

cybero's picture
Re: 2D Fluid Flow fixed

Post your feature request to Apple, Lee, there are a growing number of apres SL requests relating to your firmware / driver / OpenCL requirements for that ATI card.

Please note that ATI are also going to have to chip in too, pun intended :-), so you might chivvy them a little by shaking their tree.

[for creakiness I recommend WD40, or maybe a plate of eels]

dust's picture
Re: 2D Fluid Flow fixed

no this thing i uploaded wont crash anything nothing is hooked up. i was getting crashes on "2d flow fixed".

i uploaded this as an example so someone would no what im talking about. i guess in theory i was going to try and manipulate the input variables with numbers instead of an image data seeing they are essentially the same thing but was unclear on how to override the image clamping so i could use variables for velocities and densities.

cybero don't install that macro, although it is completely safe and harmless if you have all ready done so. i guess i was looking for open cl help from the author of this thread cybero but yeah be careful with the fixed patches. i was able to get rinbokus to work although the "fix" seemed to drastically hurt performance the other one crashes me (not rinbokus his is fine both of them).

yeah i would not upload a file that gives me kernel panics or even glitches my screen unless it was an intended glitch.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

eels!? ahahaha. But hey, don't be making me laugh when I'm in the middle of being snippy. That's too complicated for geezerly guys like me, don't you know.

A 'feature' request, eh? LOL! You think Apple would politely ask me to 'feature' not ramming this twenty-three hundred dollar piece of eighteen month old defective hardware down their gol dang throats?

I'm not going to do any polite negotiating (read begging). I'm going to call a scam a scam until they fix it.

dust's picture
Re: 2D Fluid Flow fixed

its funny lee apple (i don't know last year or something) used to say final cut pro would only work with a mac book pro and not a mac book because of the requisite graphics card that was negated in the mac book. well someone did a bench mark and the funny thing is that final cut pro actually rendered faster on unsupported hardware (mac book) than it did on the pro. we are talking a very small disparity but all the same it was funny that apple didn't support there own software on there own hardware ? must be one of those bottom line money things i guess. if you ask me Microsoft and apple should give everyone in the world 1 billion dollars then we could all buy the best computers.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Listen dust ... and I'm not the first to say it in here ... Apple knew this was coming. That means it's either in the process of being fixed which no one anywhere has yet acknowledged, or it's a scam. No in betweens.

I'll settle for a recall if they just can't manage a software update. If neither of those is forthcoming, I've been bent over. 'Scuse me if I sound like a fanboy by clarifying that I've never used anything but a Mac ... but I don't get bent over and keep my mouth shut about it too, regardless.

dust's picture
Re: 2D Fluid Flow fixed

im shocked they are not supporting snow leopard for ppc ?

planned obsolescence sucks lee. the automotive industry just started making cars that could run for 100 miles without a tune up, for the century they where making crap on purpose, so you have to buy buy buy.

open cl doesn't work on my server and i spent over 2gs on that just last year.

i love apple, but hate calling them when something is defective. they have a really good automated voice recognition system on 1 800 my apple but once you actually get to a human everything breaks down to chaos an nobody knows how to deal with defective products. actually yesterday my phone call must have went to india and back 10 times. because i gave my serial number and telephone number out to ten different people telling me that they are not the person i need to talk to and routing me to a new person just to give them the same info, which is strange to me because i have 2 apple developing certificates with all my devices registered so that data should be available.

i guess after ending up in new mexico where i originally started my call before going to india and texas 4 times i got a guy who knew the right answers. he told me people don't save the data entry from call transfers incase something goes wrong, that way they don't get into trouble. at one point this was maybe the 5th transfer the guy actually says and i quote "you need to call apple ??????" i need to call apple i dialed 1800MYAPPLE and your telling me to call apple.

i didn't get upset the whole time but i invested 4 hours into replacing a 30 dollar product. to top it all off they told me i had to buy the product again and when i received the new one they would take a hold off my account. this is the last time im going to buy something resale or retail from apple. because this all could have been negated if i bought the product on apples web-site. to my surprise i got the product the next day by fed-x but it was the wrong product which was twice as expensive as the one i bought. im thinking so why did i fax him a receipt if he didn't look at it.

needless to say i got a letter in the mail today and i might try this all over again next week.

stoney's picture
Re: 2D Fluid Flow fixed

I get 30 fps with the "2dflow fixed v2" patch on my Macbook Pro. 2.5GHz Core 2 Duo, 4GB RAM, GeForce 8600M GT, Snow Leopard.

As-uploaded, the "quality" param on the 2D Fluid Simulation is set to 0.01, which produces only one iteration in the fluid solver. 3fps suggests it's being run in the CPU.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Yes stoney. CPU it is. That's what all my hostility is about in other postings in this topic. Apple has apparently end-of-lifed the graphics card on one of their newer top of the line iMacs. Fluid Simulation and Open CL cannot be run on it. You got it.

stoney's picture
Re: 2D Fluid Flow fixed

Your patch with the float4 inputValues added to the Advect Density block is non-functional. While you've added the inputs, the code just uses that variable like a local and writes the velocity pixel value into it. I'm not sure that will run at all.

I'm not clear on what you're trying to accomplish. Messing with the fluid simulation loop is unlikely to result in anything useful unless you know how it works. The math is incomprehensible to many people.

Feel free to explain what you want to do.

stoney's picture
Re: 2D Fluid Flow fixed

Well, bleah. I sympathize completely.

stoney's picture
Re: 2D Fluid Flow fixed

Here's one more example with the "fixed" fluid flow. This one required a mod to the velocity combiner, using addition instead of a "largest" function. I don't think this is quite right, though - I'm inputting a force, not a velocity, but there's no force param. I need to take the simulator apart more carefully to find out where to put a force param. Still, this example produces some pretty pictures.

The basic idea here is that a feedback loop around the fluid simulator uses the current density picture to create new velocity (force). I wanted it to look like hot and cold colors rising and falling, so the force generator creates upward flows from red colors and downward flows from blue colors.

There's a bunch of embedded images to play with. You have to plug them in to see the effect.

PreviewAttachmentSize
Heat velocity.qtz345.23 KB

leegrosbauer's picture
Re: 2D Fluid Flow fixed

S'okay. Not your fault.

I'm obviously guessing, but I suspect that's also the reason that there has been somewhat limited response to your very worthy topic here. Several of us in here cannot run the compositions. To be clear; we have high power, 2.8 GHz, Dual Core, Intel processor Macs. And while most everyone else here has been politely stoic about this unfavorable circumstance, every time the topic comes up I myself haven't refrained from making a major stink. Because I'm outraged. And since nobody likes stinks ... well, you know. :-)

leegrosbauer's picture
Re: 2D Fluid Flow fixed

2.73 FPS. But beautiful! :-)

stoney's picture
Re: 2D Fluid Flow fixed

To clarify, I didn't fix Rimboku's patch as such - I fixed the 2D Fluid Simulator so that it could use signed floats as it was intended. There's no doc on this that I know of.

The "pooling at the bottom" is likely due to a wall there from an occluder. The problem I fixed was that the simulator and its inputs could represent velocities that went only down and to the right. The fix allows it full 2D freedom!

There are repercussions, though. Black image as velocity input used to be zero, but now it is an up-and-to-the-left velocity, so I had to convert the brush image so that it would impart zero velocity everywhere but under the brush shape.

The brush color was being used as a velocity, but you probably saw that it swung through an arc between down and right. Once I changed the simulator, the brush velocity was still biased, so I added a circular velocity generator. I thought it looked cool :-)

stoney's picture
Re: 2D Fluid Flow fixed

One more before I call it a night. You'll need better than 3fps to use this one, since it's interactive.

A variation on Rimboku's patch. The brush paints colors with rotating hue, but the velocity is taken from the mouse motion rather than the color.

PreviewAttachmentSize
Velocity painting.qtz61.47 KB

leegrosbauer's picture
Re: 2D Fluid Flow fixed

4.94 FPS. Very attractive! ;-)

dust's picture
Re: 2D Fluid Flow fixed

yeah the velocity painting is a acceptable frame rate on my end im getting over 30 fps actually this one feels fixed to me more than the initial composition. it works real well if you make really slow strokes actually using a fast velocity with the mouse creates a very big disparity between coordinates and well doesn't look good until the colors collide, im only assuming what this looks like with an 8 core machine running multiple gpu's.

usefuldesign.au's picture
Re: 2D Fluid Flow fixed

leegrosbauer wrote:
I'm not going to do any polite negotiating (read begging). I'm going to call a scam a scam until they fix it.

Was reading this OpenCL benchmarking app thread and came across a comment suggesting ATI 2600 doesn't have what it takes. Not being across this stuff I'm not offering an opinion but interesting discussion:

http://forums.macrumors.com/showpost.php?p=8385913&postcount=10

"If you look on the compatibility page on ATI's site, you'll see in the footnotes that the 2600 series does not support double precision floating point operations...

Now if you're Apple, and you're encouraging people to use this technology, are you going to potentially support something that isn't going to give the exactly same results for calculations that you'd get from the CPU? - NO. …"

I used not to like all in one Macs ('closed architecture' the common refrain) but had been worn down in last few years to point of thinking who ever upgrades GPUs except film editors/post production people (and gamers who all are PC anyhow). Who could have seen OpenCL coming? You have my sympathy though, Lee.

stoney's picture
Re: 2D Fluid Flow fixed

I mentioned this elsewhere, but for continuity, I discovered that I'm not running OpenCL on my Mac Pro's GPU. There seems to be bugs in the ATI HD 4870 OpenCL implementation, so QC is apparently set to not use that GPU.

Still, I was impressed that I could get 20fps out of my 8-core (early 2009) Mac Pro running the fluid simulations. Once I looked, I could see that all 16 hyperthreads were saturated.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

usefuldesign.au wrote:
... Who could have seen OpenCL coming? ...

Apple. Any other questions?

cybero's picture
Re: 2D Fluid Flow fixed

Velocity Painting - In both 32 bit mode and 64 bit mode I'm getting a steady 15.5 fps whilst painting and 20.03 fps when the paint is just moving. Very smooth indeed.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Understood, stoney.

Well, welcome to the club .. sorta. I read your related posting too, btw. Hope you get that fix in 10.6.2. But let me ask .. if the fix wasn't forthcoming in 10.6.2 ... or 10.6.3, or 10.6.x ... What would you think? Would you think you got scammed? Would you stand fast on that opinion? Or would you shrug it off? eh?

Frankly, this is probably a matter for civil court, but I'm too poor to use the courts. That's ... unfortunate, you know? Because I am indeed standing fast and I'm not shrugging it off.

What that probably means is that its not likely that there will be much discussion about OpenCL at this particular venue without some fairly horrid performance data, for recently released top of the line iMacs, being regularly published and discussed.

stoney's picture
Re: 2D Fluid Flow fixed

I don't think I'd be interested in suing Apple over this. I've filed a bug report on it, and if they don't fix it in 10.6.2, I'll have to consider what to do about it. That's likely to be November at best. If it doesn't have the fix, I'll ask them about swapping my ATI card for an equivalent NVidia (assuming there is one).

This suggests that the SDK isn't finished: http://blogs.zdnet.com/Burnette/?p=1323

Apple seems to have been premature about announcing ATI OpenCL support in Snow Leopard.

cwright's picture
Re: 2D Fluid Flow fixed

[note: I'm not being an apologist here, just playing some what-ifs]

While I'm quite sure hey saw it coming down the road, the amount of effort required to even make a khronos-approved spec is quite large. The amount of effort to write tests that certify implementations is gigantic (the OpenCL certification test program takes 7-11 Days to run form start to finish -- that's a lot of tests, and any single failure means you're non-compliant).

Writing a driver that works around hardware bugs, meets or exceeds every single criterion for the multi-day test, and satisfies all kernel driver requirements is extremely daunting. OpenGL sorta has it easy, since it's decades old -- the code's mostly already written. CL drivers are essentially written now from scratch (2 years of dev time at most, vs. almost 20 for OpenGL).

Apple doesn't actually write the drivers for Intel, ATI, or NVidia GPUs -- they have teams that work closely with teams from said companies, but it's a joint effort. Thus, the blame cannot fall squarely on Apple's shoulders (for good or ill). AMD/ATI's been struggling a bit the past few years -- their stock hasn't traded about $10 in over 2 years, and hasn't been over $20 in nearly 3. Intel's been eating the CPU-side of AMD alive since they released the Core2 Duo, and NVidia's been nipping at the heels of the GPU-side as well. That's a lot of fight to deal with, and a small market like Apple probably doesn't get as high a priority as we'd all like it to have :/

leegrosbauer's picture
Re: 2D Fluid Flow fixed

stoney wrote:
Apple seems to have been premature about announcing ATI OpenCL support in Snow Leopard.

Well, that's putting it politely.

I would acknowledge that within the context of general computing it's probably not that significant a disadvantage at this juncture. But it could make a big difference in whether or not one could participate in composition testing and ensuing discussions here at Kineme. Again, I'm not of particular significance in that regard because I'm not a programmer, but we do have some other very capable folks amongst us here that also purchased these recent high-end Macs with non-capable, non-replaceable graphics cards. They too would be out of the discussions unless they invested in additional computers.

You'll ask for a card swap, eh? We don't have that option. Ask 'em for a recall on the iMacs while your at it.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Thanks Chris.

I do understand that, for there to be progress, sometimes things have to be forfeited. Now, I haven't a clue how Apple justifies to themselves any forfeitures that they may have had to make in implementing OpenCL. I'll guess that they might have far greater concerns than who falls by the wayside due to premature end-of-life determinations in some circumstances.

But the company hallmarks are quality and products that can be trusted. In this particular case it would appear that Apple has intentionally forfeited their reputation in that regard, as well as having been brazenly adventurous in testing customer loyalty.

That said, I'll be clear that I'm loyal enough to stick it out and make some noise. Because when all is said and done, if this unfortunate matter isn't resolved, I won't change brands; I'll cease and desist from computing altogether. If Apple can't be trusted, I'm not going to use a computer. I don't need the sense of revulsion that I'm currently experiencing. It's very distressing.

vade's picture
Re: 2D Fluid Flow fixed

Hey at least you can even init the OpenCL kernel programming patch. On my system with 10.6.1 it always fails to init, and Obj-C application samples fail saying I have no compute device.

Feel better ;)

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Jeeeze, comfort in having company is turning out be sadly distressing, too! heh. Maybe we should all just get stanky drunk or something for a couple of years until everything gets fixed. arrrgh. :-)

I made a change to the QC preferences as recommended in the opening paragraph to this topic: http://kineme.net/Discussion/General/GotOpenCLworkingCPUQC

Prior to that it didn't work at all, although I don't know if that's also applicable to your circumstance, vade.

usefuldesign.au's picture
Re: 2D Fluid Flow fixed

Yes, Apple but only somewhat (I was referring to punters like ourselves so it didn't seem like you'd made a poor purchase). As Cwright has pointed out the emergence of OpenCL to a know set of requirements for the GPU hardware arrived towards the end of the standards process not the start as might be the case for other standards.

Apples only move to mitigate backlash seems to have been to shift to Nvidia as preferred supplier for GPUs, in particular in the revenue important MBP area. Possibly what this really proves Apple's been content to run with as low-powered GPUs as it thinks it can get away with for any given Mac for a decade. On the up side QC is one of the few applications to benefit from OpenCL at present and gamers are actually benchmarking speed regressions with SL (10.6.x should be able to fix). I'd sell the iMac and buy 2nd hand with a supported GPU card (preferably upgradeable).

I know you're standing on principle because you feel angered and hurt by Apple's succession planning (or lack of) but I'ld be looking for ways to let that feeling go rather than formulating reasons to hang on to it. Seeing as OpenCL for your card isn't going to happen I'd look at it like any other Mac Hardware purchase where one buys right before a new technology is introduced. Like introduction of Firewire, you'd be pissed if you'd missed that one (and Apple would have known about it for a long time prior to rollout) but on the upside you still have what you paid for and your iMac still does everything it did when you bought it. Most users aren't seeing OpenCL as desirable or even noticeable yet, so sell it if you need to before OpenCL compliance penetrates.

So as much as I sympathise with your argument, my question to you, Lee is do you want to be right and fell like crap for the rest of the year — or be wrong and resolved that you haven't actually be swindled so much as inconvenienced; had some small amount of bad luck which was solvable by replacement of iMac with a more recent 2nd hand model. (New iMac models rumoured end of this year)

leegrosbauer's picture
Re: 2D Fluid Flow fixed

  1. Make me an offer on my iMac. The new one that won't ever run OpenCL.
  2. My wife absolutely will. not. tolerate. the purchase of yet another two thousand dollar Mac that can't be trusted to fully run whatever OS X is current in eighteen months.
  3. Neither will I.

You are suggesting that I 'let it go'? 'Most users aren't seeing OpenCL as desirable or even noticeable yet' you say?

We're not 'most users' here. You and I both know that unless I get a new Mac, and a real good one at that, I'm as good as finished here at Kineme. Crippled fairly significantly, anyway. I paid top dollar for this Mac specifically to avoid circumstances like this. You can couch it all you want in the context of the neverending, nevercaring forward march of technological innovation. That doesn't change the fact that my very expensive, very powerful, very recent model iMac cannot fully run OS X 10.6. Nor does it justify it. That's just some hooey that amounts to 'Hey, there's always going to be somebody that gets burned. Sorry it's you this time, but get used to it.'

If Apple is going to be this adventurous with tech advances, they ought to damn well include the cost of recalls for disabling recently released models in the process. And if they just can't bring themselves to do that .. they are untrustworthy. Simple as that.

gtoledo3's picture
Re: 2D Fluid Flow fixed

I want to make it clear- I'm not being an apologist. Let me share a story.

For years, I loved to record music on analog, "reel-to-reel", tape machines. It was great! If a part of the machine went bad, you just replaced it. You could even have it modded, put in better parts, etcetera. New machines came out, with different features, etc., but the core technology was the same, and if you had a good machine, it was usually pretty easily hot-rodded to newer spec by a decent tech. The only thing that would make you go "crap" is if a new tape formulation came out, or you would doubt what brand of tape you were using, alignment techniques, or how hot you printed to tape, etc. This makes me sound a bit older than I am, but it's just that I got to spend a decent amount of time hovering around this kind of thing as a precocious youth, and then adolescent.

In the early 90's the first "ProTools" card came out. I don't even think it was called ProTools... it's hard for me to remember what they called it exactly, but I just remember thinking the sound was really funky. However, it solved one problem fairly well, which was editing crappy performances. Before that, you would tend to feed your track into a high end digital delay, store the part you wanted, queue the tape, shift the delay to whatever pitch you needed (for note correction in the way that people use autotune now), and then "punch in" back on the analog tape, constructing your edit... or maybe actually break out a razor blade and slit your wrists...no, break out a razor blade and actually splice the tape. You sit there with a grease pencil marking where beats fall as you scrub the track. This whole method of working was tedious. Splicing a "window" in a multitrack tape sucks!

So, you bought your crappy ProTools card and did your editing, and some people would even do some mixing or more substantial stuff with it.

Then the next version came out. Everyone upgraded. This happened again and again. People started going "geez, last year we bought something that was supposed to be as good as analog, but now we have to buy something new, that is NOW as good as analog? WTF?" It still sounds like shit to this day. Not that it isn't usable or highly advantageous in a production environment.

When it really hit the fan was when people were buying VERY expensive ProTools MIX systems and they upgraded to ProTools HD. People don't want to spend around 10 grand or more to have the state of the art equipment, and want to turn around a week later, and see a totally different system, with twice the possible sampling rate for the same price they paid. There was a hardware trade in program that basically just pissed people off. On top of this, there were all kinds of shenanigans in using old plugins with the new system... and we are talking about EXPENSIVE plug-ins. As in plugin suites costing as much as your computer. That you couldn't use anymore. Happy happy joy joy.

Someone with that original PT card has a lump of crap that is probably installed in a computer with a HD that won't even boot, it's so old. Not really serviceable either. Someone with the reel to reel, analog multitrack may have a pain in the butt getting parts from time to time, or even tape (awhile back), but it's considered a classic and is still relevant. That PT card is totally irrelevant, besides as some kind of historical artifact.

And so it goes with digital electronics.

I expect, whenever I buy any digital gear, that it could very well be instantly outdated by the time I get to the car. With older digital electronic gear, if it's something I see myself wanting to use in the future, I try to purchase whatever expendable parts I may need when I see it doing it's spiral into obscurity (SCSI Drive accessories to name one thing...).

There was much more outcry and talk of all kinds of lawsuits, civil actions, etc., in that scenario, but if you buy a system, and it works out of the box, that's about all you can really expect, or all a manufacturer reasonably has a 100% chance of doing successfully.

At some point, a company has to decide to upgrade the software in ways that are going to make the hardware obsolete... or has to make moves and hope that business partners move along with them (that's rough). In my opinion, I think that Apple does this fairly smoothly. I mean, we aren't exactly the "mainstream user" profile here.

My only criticism is a feeling of power users having to actually vet/finish the OS, so that the next version works correctly. It's pretty hard to not "feel" that it's beta, but then again, it's not as if my computing activities are run of the mill all of the time.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

gtoledo3 wrote:
My only criticism is a feeling of power users having to actually vet/finish the OS, so that the next version works correctly. It's pretty hard to not "feel" that it's beta, but then again, it's not as if my computing activities are run of the mill all of the time.

Funny, that's the part I have no problem at all with. In fact I'm rather proud to participate in that regard, funky/half-vetted not withstanding. Siracusa over at arstechnica didn't dwell on it, but he did briefly reference the ten-point-zeroness of the circumstances. Fine. No problem there.

Tech moves on? I know this. I guess you may truly think that folks should tolerate the near immediate obsolescence of very expensive tech hardware without holding manufacturers responsible for more than a year or so of legacy support on something as basic as the operating system. But I doubt you really think that. This business about how 'it's actually normal, don't you know' is bunk, George. It's not normal. Few people would pay two grand today for a Mac that they thought wasn't going to fully run OS X 10.7 in eighteen months or whenever it is that it arrives. It's just not normal behavior or expectations.

cwright's picture
Re: 2D Fluid Flow fixed

Lee, you follow arstechnica as well? you're totally my hero :)

not to pick nits (this topic is fairly old, and everyone's already decided the side that they're on, including us middle-grounders who sympathize with both ends), but "fully run" is hard to quantify. The software itself can run, but there's so much more to a mac than just software.

Other hardware-dependent features are hit or miss -- for example, my MacBook (which I'm still using as my main development machine after all these years ;) will never have geometry shaders. it will never have multisampling. it will never run OpenCL. It's not as new as your iMac, certainly. But are geometry shaders required to fully run Leopard? if so, I've been missing out. Is multisampling? OpenGL 1.3 requires it, yet intel chose to not include it, while simultaneously claiming to support OpenGL 1.4 or 2.0 (for GMA950s or X3100s, respectively). Floating point textures? >8 bits per channel? textures larger than 2048 pixels wide/tall? I admit that some of these are evolutions (texture size, specifically), but others are fundamental technologies as well (floating point textures being the most show-stopping) used by things like CoreImage -- on my MacBook, it'll only ever run in CPU mode, due to hardware limitations.

How about packet sniffing (i.e. promiscuous mode)? -- possible with almost every ethernet card on the planet in linux, yet never really possible in OS X without hacked custom drivers (ala Kismac and friends). Or soft-setting Hardware MAC addresses not being possible on MacBook Pros (except for some 10.5.x updates)?

Snow Leopard says it requires a 64bit CPU for 64bit mode, but that's not entirely true -- to boot the 64bit kernel, you also need a 64bit EFI firmware (which my MacBook does not -- it's 32bit). So can it "fully" run Snow Leopard?

Where's the line? (I ask this in genuine curiosity, not as a challenge or pissing match)

Electronically, I think the 2600 is capable of running CL. IF that's the case, it's a matter of writing software, in which case, it's a joint Apple/AMD issue, not solely Apple. It's interesting to note how they pulled ATIs from almost all of their lineup around when they unveiled OpenCL -- perhaps they noticed the issues (managerial/coordination between companies, not technological issues) and did they best that the could given the situation.

If the preceding paragraph has any validity, it also has some precedents -- the Nvidia drivers for Leopard were absolutely terrible -- at NAB I'd head Boinx, Noise Indiustries, and Bug.TV lead developers all complain about issues with Nvidia on Leopard. This happened due to managerial/coordination effort issues, not technological ones (though there were some technological/physical issues with some Nvidia GPUs in MBPs for a while). You could see manifestations of this with Adrian Ward's awesome "slow fps" post, where 2 very simple animations would grind to single-digit framerates when run simultaneously in the same app (but when run in different apps, there were no performance problems -- clearly a driver issue).

I don't know if the Leopard stuff ever got ironed out -- it got tweaked a fair amount by the time 10.5.8 came around, but by then most development effort was going to 10.6. Hopefully 10.6 is young enough that 10.7 isn't on the roadmap yet, so 10.6 issues like this get resolved.

This doesn't stop the pain, it doesn't lessen frustration. But hopefully it can shed some clues on where/what to look for down the road?

(by the way -- if you decide to try getting the machine replaced with a cl-capable nvidia card-bearing machine, please keep us posted on progress/road blocks you encounter -- I'm sure there are several less-vocal forum lurkers that are also hobbled as you are in this situation)

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Well thanks, Chris. I understand. I was very reluctant to post my own sobby backstory, but since there's precedent-a-plenty in various responses to this topic, here goes:

I'm sixty-three years old. This is the last computer I'm ever going to purchase. I kept using a horridly under powered G3 for many years (and I kept slinging the same BS as all the other Mac users about how it was really just a question of measuring performance differently to see that it was actually a pretty good box after all) until I could save up enough money for a new computer. That whole time, I silently suffered a weak computer that ran many things poorly, including QuickTime ultimately. Jokes about ars aside, you can bet I did indeed consult Siracusa's reviews, amongst other knowledgeable sources, prior to purchasing the computer in question.

That said, I'll repeat that there's not going to be another computer replacing this one. I'm going to live with this computer and with any shortcomings it has just like I did with the G3. But this time around I'm not going to suffer silently. Been there, done that. It's over.

Now listen: When I finally started calling a spade a spade in regard to my previous Mac, people told me pretty much the same things I'm hearing now but they always tossed in the bit about how I should have expected as much with a low-end Mac. And I believed them. So I saved and I saved, and when it came time to purchase, I bought myself the very best that Apple had to offer, short of a Mac Pro. And lo and behold .. it didn't make a bit of difference. The thing was still not capable after less than two years. pfffft.

One piece of previous critique when I was hollering about the ever shrinking capabilities of the old G3 was "looks like Lee can't actually afford to be a Mac user". That comment was probably the most telling and accurate of them all. And perhaps the saddest. Dismissed because I didn't fit the right economic demographic. What a drag.

In regard to the Kineme forums, I'll assure you that as long as I can run the compositions that are offered for appraisal here, I'll be commenting quietly and intermittently about those compositions just as I have in the past. If I can't run them due to OpenCL being crippled on my new Mac, I'll be making statements to that effect and responding to any additional commentary which is forthcoming. And lastly, if a bunch of people start telling me to go get a new Mac to replace my current new Mac .. all I can say is that I'm documenting it. I've heard it all before and frankly, buying new Macs seems to be the wrong advice.

cybero's picture
Re: 2D Fluid Flow fixed

Heat Velocity - a pretty steady 7.5 - 8.46 fps

usefuldesign.au's picture
Re: 2D Fluid Flow fixed

Seems like my comment only annoyed you, Lee. Sorry for that, I'm not being an Apple fan-boy apologist. Just I think the issue is not a technology issue anymore, it's one of what's best for Lee in a bad circumstance (of Apple's making if you look at it that way). If you can get something out of Apple to fix you iMac for OpenCL then more power to you, man. Usually takes a few thousand vocal complainants (guessing) to get a recall or policy shift from Apple.

I'm on a PPC G5 which I bought 2nd hand. Why? Apple doesn't make good mid-range desktops at mid-range prices. That's why older PPC towers kept a fair amount of resale value at time of purchase (video/audio editors don't want iMacs). (I'd call top-of-the-range iMac a mid-range Mac). As previously stated, iMac is a closed architecture when considering monitor and GPU and it's always felt a little sus to me in that regard — esp. monitor/GPU quality and no 2nd monitor option until recent model (even though they are great looking and tidy machines). Furthermore I wanted to be able to add PCI cards if I wished. I've never made mods any of my Macs save new HDs and RAM but maintaining the option was considered worth it.

I'm cautious even now about what Mac I get next (will be 2nd hand prob as they devalue less quickly). Reports of supported cards not actually doing the business for OpenCL and then there's the hit when Adobe actually writes CS5 for Mac in Cocoa and we see which cards are really good and which aren't for graphic designer needs. (Presently Adobe has written their own GPU routines to speed up zoom&pan which I can't use because I'm on a PPC ;) ) . Which cards will support GPU Video encoding/decoding under SL? I can't answer any of these questions so I'm not dropping money I can't afford on a new Mac — which is what I'd like — I'll go 2nd hand till I can afford the risk or it make's tax sense to lease new ;)

As soon as you buy something retail, it is no longer new, it's "as new" and automatically devalued. 18 months in terms of Moore's Law is One complete cycle. Computing is the industry it is largely because of the rapid rate of tech change. Like many things that's a blessing and a curse at once. Your circumstance would have been foreseen by Apple at some point but likely not seen as a large segment of the user base. Mine situation was foreseen re SL (PPC not supported) and Apples attitude was that I'm so far off the performance curve too bad not worth the effort. I don't like it but I accept the business decision and don't fell betrayed. (Not that I'l be doing what Apple thinks I should do and buy a new iMac/Mac Pro). Your case is more borderline I admit.

In end this all depends on one's POV. As gtoledo has said in the past, more POVs are better than one. I've probably just annoyed you further, Lee… but a problem shared and all that. If you make a petition I'll be first to sign it. I already signed the PPC&SL one months ago even though I thought there was buckley's chance of a result (that's Aussie for none). If you do change your mind and buy new will you wait til 2011 for 'Light Peak' connectors they wont be backward compatible either in the sense of adding to your old Mac without a PCIe slot at the least? decisions, decisions,…

SteveElbows's picture
Re: 2D Fluid Flow fixed

Even though I was one of the people who gushed over the future possibilities of OpenCL, I see no signs that OpenCL-based QC stuff is going to dominate in the next year or so. Even if programmers decide to use it a lot quite quickly, I think it will be a generation or two of GPU & multi-core CPU before the performance possibilities of OpenCL really start to shine. And when that happens, even those of us with OpenCL-capable hardware today will need to get new hardware to get the glorious framerates to run whatever wonders people may have come up with for OpenCL.

Im also fairly sure Apple dont consider the iMac to be their pro kit, and even the expense of a Mac Pro could not insulate us from ome of the issues which cause you so much pain, especially as the choice of graphics cards for the Mac Pro is more limited than it should be. Having been into 3D games more when I was a little younger, I avoided anything with integrated graphics because it eventually ends in tears, but when I switched to Apple the prices (especially in the UK) continually made me go for models that were too low for my needs, causing much additional expense later, and even if I went for the very top I know it would still not have brought any certainty in terms of the future.

I dont think its being an Apple apologist to talk about the way the industry works, I have strong feelings about this and I would far rather my wallet not need to bleed so much in order to play on the bleeding edge of technology, and indeed I suspect that there will come a time where things no longer evolve in this way. We live in an era of a strangely grotesque form of plenty, largely brought about by our ability to exploit resources effectively for profit - there are already signs that this era is drawing to a close, and I anticipate that at some point the art of getting more and more out of unchanged hardware will return. The era of profit from disposable hardware will shudder to a close and if society remains on its feet then software improvements will be the order of the day and where I can marvel at progress. The progress probably wont be as much fun but if its more sustainable, harms the planet less etc then I will feel better in other ways. Still if the economic system is still ugly then it will not be too much comfort, oh boy its going to be an interesting and messy few decades ahead, expectations are now so out of whack with the underlying reality, makes me want to hide in a bunker when the time comes for the reality cheque to bounce.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

It's a good response usefuldesign. I find it to be calm, reasonable and appropriate to the considerations at hand.

You mention the existence of many uncertainties. That circumstance seems to be the crux of the issue, doesn't it? Because trustworthyness hinges on reasonable amounts of just the opposite. People don't make major purchases unless they feel fairly certain that their investment will have a reasonable lifespan. I can only surmise that some of the other contributors to the discussion do not feel that two thousand dollar Macs are major purchases.

You mention Light Peak. That's a great example. Given the circumstances today, how likely do you think it is that I will be trusting Apple's commitment to long term Light Peak functionality when and if it arrives?

Your observations about the actual low quality level of top of the line iMacs are duly noted and absorbed. Thanks.

As for me rallying up the voices? No. I'm not the one to do it. I'm in the same waiting list for making petition signatures as you. But thanks for that nod, too.

SteveElbows's picture
Re: 2D Fluid Flow fixed

I dont think its a case of many people not thinking a 2000 dollar iMac is a major purchase, but rather a comination of people being resigned to the way things happen these days, and the crazy credit & consumption era we live in. Im 34, and for pretty much my entire lifetime the idea of making, selling & buying things that are built to last has been absent. I know it used to exist, but these days corporations can barely be bothered to even present the illusion that it exists.

Corporations really dont care, and one of the great horrors of this age is that the ideological, economic & political winds have been blowing so strongly in one direction for so long, with so little apparent hope of dramatic change, that people are more likely to say 'get over it, deal with it, tough, thats just the way it is' than try to overcome it. This happens with really huge global big issues, so I dont hold out much hope that this particular instance is likely to result in a different sort of response.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

ooops. Tried to click points on SteveElbows response and clicked my own response just above it by mistake. Ignore that, if you would.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

Agreed, Steve. Your observations here are insightful and eloquent.

Oh, and in regard to credit; I don't use it much. I pay cash, normally. Did that with my home, as well. It took a reeeaaal long time for me to build it. Yeah, I expect things to last a while and if they don't ... I call 'em scams. Which they are. So do you it appears. Thanks. I appreciate the honesty.

SteveElbows's picture
Re: 2D Fluid Flow fixed

I have no idea how the fluid patch was supposed to behave, but soon after snow leopard came out I cobbled together an itunes visualizer that made use of it. Unsurprisingly it doesnt work well when I use your fixed fluid patch, no doubt because I was just feeding the original fluid patch whatever ended up seeming to work for me, rather than having expectations about what it was supposed to do.

But as I would like to understand the theory of the velocity stuff better, any chance of advising me how I could alter my source input to work better with your version?

My visualizer is here:

http://www.mutantquartz.com/?p=40

Cheers

usefuldesign.au's picture
Re: 2D Fluid Flow fixed

I agree with your observations about the industry, Steve. As for prognostications for the sustainable future not so sure. I want all industries to move to triple bottom line and sustainable practices NOW. That doesn't negate the underlying principle of increase in efficiency and effectiveness that Moore's curve enables for human activity though.

Recent arrival to the real world Tom Friedman is now selling a similar kind of logic, green industry will be to next few decades what ITC has been to last few and all the money's going to be in sustainable power etc etc. I agree that all services and industries must adapt to become sustainable or find themselves irrelevant in near future but the basic cost opportunity that new technology opens shows no signs of slowing down (even as it hits the quantum limits).

If one person on a wage of $30 000 can do the work of one and a half of her colleagues with the addition of a $4000 IT procurement that has a 2-3 life span, it's a no brainer. If additionally she can do work she could never do in the past even better. Sustainability and growth are not mutually exclusive concepts, despite many in the environmental movement emphatically making that case. It's the nuance of growth on what metrics that count. IT offers lots of opportunities to reduce wasted energy and resources. Then again we haven't lived through Energy decent yet, so maybe I know nothing!

If it's cheaper to replace hardware than write software guess who wins? Only driving up hardware costs via carbon tax and disposal fees will change that ratio. And I'd vote for that but in some countries that would make me a socialist cheese munching lunatic ;)

usefuldesign.au's picture
Re: 2D Fluid Flow fixed

I think US$2000 is a lot of money, Lee. I guess for me the critical values are the opportunity cost of replacing with a supported GPU and the use you got in the last 18 months as opposed to staying with your G3 another year or two.

I tried to quantify those two things earlier today but didn't get enough www info to make an answer and now it's time for sleep this co-ordinate of the blue-green orb.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

You know, EarFluid01 is actually displaying an attractive and acceptably active swirling pattern on my Mac. I think I'm going to cry. Jesus.

Frame rate is 5.1 to 6.2. Regardless, it's pleasing to view. Quite beautiful, in fact. I could indeed use this for collage assembly. All controls seem to function (I think ... it's too slow to be certain ) Hi-res frame rate 0.5 to 0.9. in heightmap mode.

ATI RadeonHD 2600 with 'QCDisableCLOpenGLSharing' ticked in QC System Preferences, as advised. 2.8 GHz Intel Core 2 Duo. 2 GB 667MHZ DDR2 SDRAM

SteveElbows's picture
Re: 2D Fluid Flow fixed

Great post, you are certainly right that I should not sound so certain of where the 'interesting times' ahead of us will lead when it comes to IT. My earlier post is based on guessing that the cost of manufacturing computers will increase substantially at some point, and/or a lot less people will be able to afford to buy them so often. I consider that yes in many ways IT will be used to try to plug the gaps that things like a reduction in travel will bring, and whilst the internet uses quite a lot of power I guess it is more efficient for me to buy my music via digital download than on CD & stuff like that, although I dont actually know for sure.

I just hope we manage to have a mostly co-ordinated international approach to climate change, peak oil, etc, as if we start having wars with eachother instead, we could descend rather quickly into a world I do not want to think about.

Still having said that an argument could easily be made that we wouldnt have the technology and internet of this age without wars and the military industrial complex, which is true in once sense, although completely ignores the fact we have no idea what humanity might have done with its efforts to progress if we hadnt had such bloody forces as a catalyst.

SteveElbows's picture
Re: 2D Fluid Flow fixed

When trying to come to terms with how much I spend on computers, I certainly use the 'how much has this cost me per day' approach which invariably makes me feel a bit better. Ive been sort of greatful that we've hit a bit of a Ghz barrier as its made me less inclined to ditch my 2+ year old macbook pro prematurely, although I did get annoyed with how quickly the battery became useless. Im starting to get the itch to buy a new laptop but I suspect if I buy one now then I will get upset within 12 months with the arrival of quad-core processors in notebooks.

gtoledo3's picture
Re: 2D Fluid Flow fixed

I was thinking about this the other day; how much discussion has been going on about 2d fluid sim, looking at the iterator setup in the 2d fluid sim...and then I remembered good ol' 3d fluid sim in Leopard :)

SteveElbows's picture
Re: 2D Fluid Flow fixed

The Fluid OpenCL doesnt give very good framerates when using the occluder input or reasonable image resolutions for input. My composition doesnt use occluders, and the normal res mode is 320x240 (high res is 640x480 and gives poor framerate on my hardware). If you bump the resolution of the render in image patch in my composition down even lower, say 160X120, you may start to get more like 20fps. And you may then be able to add a blur filter or something else after the Fluid patch to improve the looks.

cybero's picture
Re: 2D Fluid Flow fixed

really nice visualizer

with QCDisableCLGPUDevice unflagged [enabled CLGPUDevice] I get a pretty handsome 9 to 30 fps - usually 18 - 20 fps in QC , whilst concurrently running Jelly as the QC visualizer in iTunes.

When running EarFluid directly in iTunes I get a puzzlingly constrained by comparison 10 - 15 fps maximum.

Beautiful visualizer though.

leegrosbauer's picture
Re: 2D Fluid Flow fixed

With low res adjusted to 160x120 I get 9.0 to 11.6 fps. That's a worthy difference. If I use this in my own studies, I'll probably publish some sliders on the source inputs of the number multiplexers that inform the render in image resolution so that I can play with each resolution level in realtime. Thanks!

stoney's picture
Re: 2D Fluid Flow fixed

I eventually discovered that there is apparently an algorithm error in the 2D Fluid Simulation patch. The density advection should use the input velocity instead of the output of the velocity advection block. Fixing that seems to have increased the vorticity of the fluid.

Attached is a new version of the Heat Velocity patch, with this fixed fluid simulation embedded. This version has a "force" input now, as that's what it really is, and uses an addition operation for the force, and an alpha-compositing "over" for the color input (renamed from "density"). Any color you inject into this should have an alpha mask or it will obscure the simulation output.

As with the last version, red colors rise and blue colors fall.

I haven't made any changes to this since last weekend, so I think it's done.

PreviewAttachmentSize
Heat velocity V2c.qtz339.34 KB

cybero's picture
Re: 2D Fluid Flow fixed

stoney wrote:
I eventually discovered that there is apparently an algorithm error in the 2D Fluid Simulation patch. The density advection should use the input velocity instead of the output of the velocity advection block. Fixing that seems to have increased the vorticity of the fluid.

Top marks stoney, well done fella

SteveElbows's picture
Re: 2D Fluid Flow fixed

I think Ive found a bug with Apples original patch and your versions that affects performance when occlusion input is used. The CL kernels that should only run when there is no occlusion image are still running even when there is an occlusion image - I dont know why this is, all I know so far is that if I disconnect the non-occluded openCL patch branch from the multiplexer or delete them completely then I get quite a performance boost.

JamesH's picture
Re: 2D Fluid Flow fixed

Anyone had any luck with the fluid sims on Mavericks?

I'm getting consisted crashes between 700-1200 seconds into the composition.