Irradiance Caching

Ideas, enhancements, feature requests and development related discussion.

Re: Irradiance Caching

Postby sascha » Fri Jul 31, 2009 10:57 am

For REYES it's easy to subdivide and dice until each micropolygon is smaller than a pixel (and thus the surface looks extremely smooth). The renderer knows how large each primtive will be on the screen, and based on that knowledge it can decide either to subdivide it, or to dice it (and set the dicing-rate such that each micropolygon will be sub-pixel sized, but not much smaller). There are some issues with ditching adjacent primitives that have been diced at different levels without creating holes in the surface, but all in all the algorithm is quite straightforward.

Raytracing is different. You have ray/bounding-box collisions, and after that have to decide the subdivision level. This is relatively easy for primary rays: if a standard perspective projection is used the renderer has the same information as a REYES renderer and can set the subdivision level based on the estimated screen size . For secondary rays (shadows, reflections) things are more complicated, the renderer needs to know the width of the ray (see beam- or cone-tracing). I think the most feasible approach here is using ray-differentials. You need this information anyway (and especially for primary rays) to do shader-antialiasing (or even mip-mapping). So I think ray-differentials are a must, both for a stand-alone raytracer and for the raytracing part in a hybrid REYES/raytracing solution.

A REYES renderer could handle a Wal-Mart, with shelves, the 10,000 or so different items of merchandise in quantities of 1-100 each, without any trouble at all. POV-Ray would be thrashing my hard drive somewhere about 10% of the way through parsing, unless I replaced each object with sprite versions.

D'accord. All I was trying to say is that it's futile to discuss such issues on the povray newsgroups ;-)
Seriously, to handle massive amounts of geometry, both approaches (scanline and raytracing) fall back to cheating, be it different models for each level-of-detail, instantiation, displacement mapping, baking, layered rendering, etc.
Both REYES renderers and raytracers have been used in the production of feature films, and I'm quite sure that it's possible to teach something like mental-ray to render your wal-mart scene within a reasonable time. POV-Ray is fun, educational, useful for scientific visualizations, and I really, really like it a lot, but it's NOT a production renderer. It lacks a lot of features that are mandatory even for the most basic animations, but unfortunately the POV-team is quite ignorant about that (and some of the users on news.povray.org too), so I have shifted my focus away from POV-Ray and towards Renderman.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Irradiance Caching

Postby pndragon » Fri Jul 31, 2009 11:13 am

which version of JPatch are you using? Could you point me to a link?
http://www.jpatch.com/temp/jpatch20060523.zip
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Re: Irradiance Caching

Postby dcuny » Sat Aug 01, 2009 5:38 am

Thanks!
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Irradiance Caching

Postby John VanSickle » Tue Aug 04, 2009 1:32 pm

sascha wrote:POV-Ray is fun, educational, useful for scientific visualizations, and I really, really like it a lot, but it's NOT a production renderer. It lacks a lot of features that are mandatory even for the most basic animations...

I think you are using the term mandatory a bit too loosely here. I've done dozens of animations with POV-Ray, and I'm interested in knowing how I overcame the lack of these mandatory features. :-)
John VanSickle
 
Posts: 189
Joined: Sat Feb 16, 2008 2:17 am

Re: Irradiance Caching

Postby dcuny » Tue Aug 04, 2009 4:30 pm

That reminds me of a thread I ran across last night discussing the Reyes algorithm, complaining that it lacked features required of a production-quality renderer, like raytraced shadows and reflections. ;)
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Irradiance Caching

Postby sascha » Wed Aug 05, 2009 8:41 pm

I've done dozens of animations with POV-Ray, and I'm interested in knowing how I overcame the lack of these mandatory features.

That's indeed quite an interesting questions, and thinking about it, I've made several animations with POV-Ray too (and two for the IRTC.) ;-)
But on second thought: I've used MegaPov for one of them, because I had the choice between using some incredibly complex lighting-setup for rim- and back-lights (that would have slowed down rendering and caused some unwanted shadows, because POV-Ray thinks that when you turn off shadows it has to turn off specular hightlights too, I mean, what else would you excpect?) or using Mega-POV and faking the rim light with its angle-of-incidence feature.
For the other animation I needed a 3D procedural texture that moved with the object, again something POV-Ray can't handle (the missing feature is called "reference geometry" and RenderMan is flexible enough to let you do that and much more). So I grabbed David's Inyo sourcecode and added the feature in about two hours, and I still don't know why nobody can add this to POV-Ray.

But of course you're right, POV-Ray is cool, and it's easy (and funny) to learn and use. It's still a pity that some features that would be mandatory^H^H^H^H^H^H^H^H^H incredibly useful for animation (and easy to implement) are missing. If something would speed up rendering times the usual povray-newsgroups consensus is "uhh, no way, but this wouldn't be p