|
![](/i/fill.gif) |
Am 21.09.2012 19:10, schrieb handos:
> Hi everyone,
>
> I had written a povray patch for obtaining depth per pixel of an image some time
> ago. I had used povray-3.7 and modified the tracetask.cpp in
> (source/backend/render/tracetask.cpp) in the function TraceTask::Run() where I
> was using all the time SimpleSamplingM0() and in this function I replaced the
> line
> trace(x, y, GetViewData()->GetWidth(), GetViewData()->GetHeight(), col);
> by
> trace(x, y, GetViewData()->GetWidth(), GetViewData()->GetHeight(), col,
> depthVal); to obtain the depth.
That change alone wouldn't do much good, because it wouldn't compile;
you must have changed other stuff besides, at least the function
operator in TracePixel:
void operator()(DBL x, DBL y, DBL width, DBL height, Colour& colour)
> I have been using Jaime's office scene for
> rendering and obtaining depth-map but I only observe that there are
> discretization artifacts I observe in the depth. I have kept the image and the
> depth file here at www.doc.ic.ac.uk/~ahanda/scene_and_depth.html . I am
> wondering if this is due to very simple sampling method used for tracing? I am
> not using any AntiAliasing options and jitter etc. to render that scene and
> simply picking up the depth values returned by the trace function that's called
> by SimpleSampleM0().
This is interesting: It isn't just some color banding - each band is a
gradient of its own. I'm pretty sure you're doing something wrong there.
You're obviously translating the depth value into a color; are you sure
that algorithm works properly? An error in some code intended to
interpolate between colors from a table might fit the bill.
Post a reply to this message
|
![](/i/fill.gif) |