harold

Members
  • Content Count

    366
  • Joined

  • Last visited

Everything posted by harold

  1. Ok thanks. Putting it in OnSetRenderInfo.
  2. "Content Aware Resize" is a little effect I've written in a couple of hours that uses Seam Carving to make an image less wide in a way that somewhat respects the content. It probably shouldn't really be an effect because it effectively changes the size of the picture, but there is little choice.. so it just leaves some transparent space, which works well enough. As you can see in the source, I use an ugly hack to render only once. It's fundamentally impossible to render it in parts - it has to calculate the globally least-energy seam, which means it has to look at the entire image all at once (well the entire selection really, but I had no idea how to do that). Once it knows the seam it could theoretically build the output row by row, I suppose. Is there a good way to render just once, preferrably in a way that handles rectangular selections? edit: I know the code is lame and I recalculate far too much for every seam, I'll fix that later.. ContentAwareResize.zip
  3. Clicking it leads to http://searchale[link intentionally broken]com/
  4. OpenCL automatically comes with the graphics driver in nvidia's case (very recently only, older drivers offer no support) ATI and Intel etc seem to be running behind, wikipedia says ATI has their OpenCL support in beta and that they would supposedly support R700/R800 GPUs and SSE3 capable CPUs So that's pretty much a lose. Can we still use it in effects though?
  5. It can fall back to CPU though I'm not sure what ATI is doing with OpenCL atm, do their drivers support it already? If I could get my hands on their OpenCL.dll then I could try to make it work edit: I don't have an ATI gpu so I couldn't test it, oh well.. btw making an actual effect from this is not very easy - is there an easy way to get the entire render region instead of those small 2pixel-high rectangles?
  6. Hm ok box.net requires you to sign up and I was feeling lazy so here is a mediafire link: http://www.mediafire.com/?jomqm3mnikt
  7. Lol sorry, which site do you want me to put it on?
  8. So we were recently given OpenCL, and nVidia was so nice as to provide both a 32bit and a 64bit version. Since GPU programming is cool I made a nice wrapper for it (currently unfinished but (and this is the best part) workable) in C#, and did a couple of tests with it. I found out that (on at least my GPU) there is a smallish limit on the output size, which is a shame, but we could of course come up with some clever tiling scheme. A 1024x1024 mandelbrot render with 250 max iterations takes approximately 23 milliseconds - depending of course on what part you are looking at and your GPU (GTX260 in my case) etc etc, but 23 milliseconds is so incredibly fast that none of the details really matter here. Copying the result back to normal ram took an other 20 milliseconds which is pretty much instantaneously. These kinds of speed won't be beaten by your average CPU. Compiling the OpenCL code takes a while, but this only needs to be done once per session. The wrapper is written in pure C# and works in both 32bit and 64bit modes (although it currently only supports nvidia GPU's and requires their OpenCL capable drivers), and will be released into the public domain as soon as I feel comfortable with it (ironed out some bugs and added some more functionality etc) for now you can link to the binary in your project (but you really shouldn't as it is not finished) and edit the source as long as you don't make it available (but honestly, what's going to happen if you do it anyway?) The reason I'm posting here is that this wrapper may be interesting to plugin writers, at least until Paint.NET exposes something like DirectCompute/OpenCL itself (any plans, Rick?) In the mean time you can all get a copy of the temporary wrapper + test project (mandelbrot) here (mediafire) (too big to upload it to the forum) And yes, most of the error codes are translated to throw new Exception() which sucks, it is not finished. ps: sorry if this is the wrong forum small status update: it looks to me like there is a bug in clEnqueueNDRangeKernel when called with a dimension of 2 (haven't tested 3), it throws a division by zero exception seemingly for no reason (I gave it reasonable arguments), so for now I'm cheating and using code like int id = get_global_id(0); int ix = id % pxwidth; int iy = id / pxwidth; Which works fine but probably costs some extra time (well that's an extra % and / you normally wouldn't have, and since their argument is not a constant they can not be free) It looks like a hack and that's exactly what it is, but until I find out where that odd division by zero is coming from you/I won't be able to use multidimensional kernels.
  9. Cool Would you mind giving me a quick overview of the changes that were necessary to make it work again?
  10. If you have the specs of the format I might be able to make a plugin for them.
  11. This thread is a bit old, but hey, my internet just got a little boost: Upload is a little slow.. Will have 80mbit/s (download, new upload speed is unknown) later this year!
  12. Actually, I would. Sorry! But I pm-ed it to you.
  13. Well feel free to remove it, you're the admin after all
  14. I tried writing a FileType plugin for it, but I got that darned "WindowsBase version 3.0.0.0" error I'll get back to you after I fix that edit: Ok here you go, I couldn't find any way to make PDN use this plugin for 32bit BMP's other than giving it a different extension, so you'll have to rename your BMP's to bmpx if you want to open them with this plugin. It's not very well tested, but it worked with the 32bit BMP's from visual studio - at least for as much as I tested. It shouldn't work on any other type of bmp. Edit: Removed zip. Please post in Plugins section instead.
  15. Cool, I hope it isn't too slow though, it would kinda defeat the purpose if it is..
  16. Would an effect plugin be allowed to launch some exe and talk to it in order to get things done? I'm still battling with running effects on the GPU but I have (still!!) been unable to find a proper way to make it "AnyCPU"
  17. Yea it will reset and die, but before that time someone will have hacked around it - that's just the way of things :wink:
  18. Well the UAC control thing looks like you can turn it off. It acts turned off when you do that, but I'm not sure whether it is really actually off. After all it was made by microsoft, having the setting do something other than its name implies would be very much like them. (remember windows update settings? "let me choose" actually means "nag me until I give in")
  19. Ugh UAC.. Luckily the only downside to turning it off is that you have to be careful, but hey, you have to be careful anyway. So there is no downside. Unless you like using keygens or you watch those video's for which you have to install a "codec" (trojan!) - but then it's your own fault anyway! I actually like this W7 UAC mode that is not yet off, but "less annoying". It's not too bad. Could do with some work though..
  20. No. You can't even upgrade. Nor should you, this is windows, you should always make a backup and then do a fresh install (then apply backup). Gives a lot less trouble. But have a look at this. (source: wiki)This might sound like a good thing at first.. until you realize that most people won't upgrade anyway (why? money.) so those features will just be sitting there, wasting space. Space being cheap is no excuse, much like fast processors are no excuse for sloppy programming (and you don't waste water just because it's cheap either, do you?)
  21. That sounds somewhat like my machine (ok, not exactly, but close enough for this comparison) - how does weven perform on it, compared to XP x64?
  22. You can't make a tool plugin in a way that Rick approves of. So if someone makes one, it won't be available on this forum for long.
  23. Well I didn't really expect you to, but I was hoping you might implement something (as in, the pattern) similar, because it's really quite easy to use - just write a LINQ query and it Just Works, all gory details well-hidden, details that could very well be just about multithreading instead of executing on the GPU An effect of that type also can't really do anything "bad", it could just operate on the pixels.
  24. And it's a necropost, and where does C++ come in? Let's translate "the C++" :wink: