We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › tips for optimizing high-resolution rendering?
Page Index Toggle Pages: 1
tips for optimizing high-resolution rendering?? (Read 1319 times)
tips for optimizing high-resolution rendering??
Feb 12th, 2009, 3:46am
 
Hi,

I am wondering if anyone has "expert tips" when doing very high resolution renderings in Processing ...

For instance, on a Mac Pro laptop with 4 GB of RAM, what is the optimum memory size to choose?

I want to do the initial rendering at 3X or 4X the final target resolution so I can do some Gaussian filtering and down-sampling to overcome the moire' pattern and aliasing that result from many fine lines close together.

Incidentally, the default Processing renderer (is it P2D, or JAVA2D?) gives visually better results than the OPENGL renderer.  Are there some OPENGL tricks I could be using to speed things up and/or get better anti-aliasing performance?
Would rendering directly to PDF help with the quality and/or speed?  There are many many many curves drawn.  I don't know if that would pose a problem for PDF.

Rendering time is also a concern:  When my target resolution gets beyond 5000x4000, the rendering really starts to bog down.  I was hoping I could get closer to 9000x9000, but that seems impractical right now.

By the way, my Processing sketch looks like a translucent silk scarf.

http://www.flickr.com/photos/dxjones

If anyone has practical experience with very high resolution renderings (for producing large printed images), I would love to learn what helpful tips you have discovered along the way.

thanks in advance,
 David Jones
Re: tips for optimizing high-resolution rendering?
Reply #1 - Feb 12th, 2009, 7:27am
 
Looks great, how did you do them? particles, springs, perlin noise? Tell me a bit more about it. i really like them


I guess PDF export is not an option here. Have you ever tried, Marius Watz, Tile Saver ? Worked great when i was working on an artwork with 12.000.000 lines... was rendering 10.000x7000

youll find it at the librarie section...
Re: tips for optimizing high-resolution rendering?
Reply #2 - Feb 12th, 2009, 2:41pm
 
I took a quick look at "Tile Saver".  Unfortunately, it requires the entire scene to be re-rendered for each tile.  This would take far too long for me, ... plus the added complexity of restoring the same initial conditions for the random number generator to retrace the exact same steps in the long sequential rendering computation.

As for my technique, ... yes you are on the right track.  I use a chain of particles, physics, bezier curves, perlin noise.

By the way, one of my frustrations is that Processing (currently) implements the "old" version of Perlin Noise, which suffers from visibly noticeable "second order discontinuities" at integer boundaries.  This defect is particularly ugly when using noise() to control movement.

Ken Perlin published his "Improved Noise" paper at SIGGRAPH 2002, and his reference implementation in JAVA is available online:
http://mrl.nyu.edu/~perlin/noise/

I wish we could "upgrade" the Processing noise/noiseDetail functions to incorporate this "new and improved" code.  I don't know what would be involved in doing this.  I realize Perlin's code can't simply be dropped in, since there is an extra layer of "noiseDetail".  Does anybody know who write the version noise/noiseDetail currently in Processing?  Perhaps they could do the upgrade.

-- djones
Re: tips for optimizing high-resolution rendering?
Reply #3 - Feb 12th, 2009, 3:03pm
 
True, like i said, it has to be rerendered for every single tile. But it doesnt take that long... you easly render it in your screen resolution and hit a key and it does the highres output within some minutes... not perfect for testing but for a final highres version for printing, i guess its still the only good solution. Does anybody know any better way by now ?

And maybe just using some noiseSeed/randomSeed would do the other job...dont know your code though.but it worded with mine.

Re: tips for optimizing high-resolution rendering?
Reply #4 - Feb 12th, 2009, 7:11pm
 
The current version of perlin noise in Processing "works", but has a defect when parameters cross integer boundaries, where it becomes less "smooth".  Ken Perlin has fixed the problem with "improved noise", and he even provides Java code.

If I get some free time, I will post a simple applet that illustrates the phenomenon.  I looked at the noise code inside Processing and it looks like it was written by "toxi".  Perhaps he might be persuaded to do the update.

-- djones
Re: tips for optimizing high-resolution rendering?
Reply #5 - Feb 12th, 2009, 11:20pm
 
If your not using OPENGL features like line gradients or blend stuff, pdf is your choice. For the noise stuff take a look at toxiclibs, maybe this noise version is up to date.
Re: tips for optimizing high-resolution rendering?
Reply #6 - Feb 13th, 2009, 1:05am
 
Hmm, did you take a look at his work?
Would you try to to do it with a pdf ?
Dontk now how much lines there are but looks like alot. Only thing i can say, i produced pdfs arround 250mb and it was absolutly impossible to open them withought crashing Acrobat, Illustator and so one.
But i would be thankfull for any hint
Re: tips for optimizing high-resolution rendering?
Reply #7 - Feb 13th, 2009, 7:02am
 
thanks to eskimoblood for the pointer to toxiclibs ... I will check it out and look for an updated Perlin Noise there, ..

I do like the gradient/blending that OPENGL does, but overcoming the moire/aliasing is my main goal.

I have been experimenting with rendering to PDF.  I had thought that many thousands of bezier curves would make PDF barf, but Acrobat handles them well, and Photoshop can load and rasterize the PDFs easily.

I'm still trying to figure out which workflow gives the best tradeoff of visual quality, cpu time, and human effort ...

-- djones
Re: tips for optimizing high-resolution rendering?
Reply #8 - Feb 13th, 2009, 8:04am
 
Ah that sounds good. Maybe it looked more complex than it was. How big are your PDF files getting at most ?
thats how most of my images looked like : http://projekttriangle.com/images/content/news/images/Burda_news.jpg, was just not possible with pdf export.

but like you say, its important to get a good workflow, cause testing by rendering and exporting and opening in photoshop to check cost alot of time.
Re: tips for optimizing high-resolution rendering?
Reply #9 - Feb 13th, 2009, 4:12pm
 
This was the larges piece I've done with pdf renderer and it takes about 7 minutes to render. http://www.flickr.com/photos/eskimoblood/424457232/in/set-72157600002919018 on a g5 imac.
Re: tips for optimizing high-resolution rendering?
Reply #10 - Feb 13th, 2009, 4:21pm
 
Link seems to be broken... anyway. rendering was never the problem. I always had problems to open larger pdf files bigger then 30-50mb. always crashed photoshop/illustrator.
Re: tips for optimizing high-resolution rendering??
Reply #11 - Apr 28th, 2009, 7:29am
 
Just a brief thing about the perlin noise implementation in Processing. There was a bug report this last year and ben decided to "fix" it for later. For a bit more background about this current implementation look over here: http://dev.processing.org/bugs/show_bug.cgi?id=731

That said, for the past 2 years I've been mainly using the even more recent "simplex noise" (also by ken perlin). This is also part of my toxiclibs libraries and the download also has a demo for this class.

http://code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/examples/core/SimplexNoiseTest/SimplexNoiseTest.pde

This implementation itself is looking like this and doesn't show any artefacts whatsoever:

http://code.google.com/p/toxiclibs/source/browse/trunk/toxiclibs/src.core/toxi/math/noise/SimplexNoise.java
Page Index Toggle Pages: 1