[Bf-committers] Realistic Materials (Farsthary)
echelon at infomail.upr.edu.cu
echelon at infomail.upr.edu.cu
Thu Feb 26 22:13:29 CET 2009
Thanks for the help, yes I have realized already all that.
sampling is the heart of the path tracing, and will be the part where I
will be slowed down much of the time because here I´m activelly making
researches/testing code and is the part that need the best implementation
since it will determine the final flexibility of the path tracer.
Other tasks like shading normals/integrators and so are simply secundary
stuffs (I don´t saying easy either :)
Off course, particular cases are easy to handle, like perfect specular
reflections (I have done it last nigth and will upload to my site some
test images). But I´m targetting to a general sampling implemenation
that could easily handle black boxes BxDF functions, and I started to
doubt if such implementation exist due to some fundamentall principle.
What I´m aiming is the Holly Grail of all the Monte Carlo methods:
reduce variance improving convergence and several tecniques have being
proposed over the years or are activelly researched nowadays, some of
them better suited for graphics than others:
Stratified sampling, Importance sampling,Multiple importance
sampling,Latin hypercubes,biased methods, and so
Currently and for make the first test build I should implement only one
of those, the best suited to my project are importance sampling but again
there´s the ghost of "there´s no sampling method that works for all
distribution types" or do exist?
All the papers and implementations I have visited seems to divide the
BxDF in its caracteristics parts (specular,reflection and so) and treat
them separatelly sampling acording to it.
for example some implementations say:
and so, basically it divides the implementation in as many contributuion
part as can be done and samplig them according to some random criteria.
But that way it could be difficult to add any-shape BxDF and sampling
other effects like refractions and so.
But then again that strategy is BXDF dependant... so I need to research
a generalized way...
the interface of the BXDF is what I´m asking for, purelly sampling
acording to the bxdf value except for full diffuse is worthless since
you don´t get the rigth effect.
A path tarcer that treats purelly diffuse,specular or refractive
materials could be written in 3 days and could have 99 lines of code
like some project in the web. But I´m not targetting that, I want a
flexible system that could handle potentially arbitrary BxDFs, so I´m
asking render experiened writers: I that possible? If is not due to
some fundamented mathematical principle then I should design a path
tracer tailored to several BxDF implementations and release that, and
then if someone need to support a new BxDF model then important parts
of the sample methods will need to be adjusted.
If there´s no evidence of a limitting principle and in fact exist such a
method then I will take my time in research it :) because the sampling
startegy is the very foundation of the Path tracer.
About sampling ligth therm and not BxDF that´s relative, there will be
cases where sampling ligth improve convergence but there will be others
where performing BxDF importance sampling will be better, that´s why
several multiple importance sampling methods have arised, they use a
mixture of several cases and somewhow weigth them, again, that could be
addressed more easily once I have impemented a general sampling
The good thing about path tracers and in general Monte Carlo methods is
that they could be as simple as you want or as complex as you want :)
Thanks for the feedback, I really need that
More information about the Bf-committers