Hi Christian,
You can do this, but I do see issues with the various approaches.
The first problem is that you need to have the materials the same as
your actual scene - so that pretty much rules out doing a one size
fits all material that just reflects to N depth.
So I'd suggest writing a passthrough node for the surface that each of
your materials go through. I'm not sure if you can delete samples from
framebuffers, but if you can that's what you want. Then take the sum
state->dist while state->parent != NULL. and push that into a
framebuffer (removing any samples at the same position - this way the
largest always gets through). Failing that you'll need to output to
your own fileformat and process it later on to convert it into a
grayscale image.
Though there's still one major problem with the idea in general and
that is partial reflectivity - this is no correct answer for what the
depth value returned should be on a 50% reflective surface (should it
be half way between the total length and that point? - no because that
suggests the length is a point halfway between).
I can't say what will look good enough, but the lack of a correct
answer means you're down to experimentation to see what tricks the eye
into believeing it - I'd be interested to see what you come up with in
the end.
Cheers,
Alan.
On 8/14/06, Christian Götzinger <cg(at)pension-goetzinger.de> wrote:
Well, I'm not even trying to launch a discussion about Maxwell here.
Let's come back to my initial question because I still think it
might be a
good approach to convincingly fake DOF in post.
There must be a way to let mental ray translate reflection ray
lengths into
a grayscale image, no? Or am I making no sense?
Ray 1 travelled infinetly far (hit the environment) -> make that pixel
black
Ray 2 travelled 100 scene units (this is the longest ray) -> make that
pixel black also
Ray 3 travelled 80 scene units -> make that pixel a dark gray
Ray 4 travelled 50 scene units (half as far as the longest ray) -> make
that pixel 50% gray
Ray 5 travelled 20 scene units -> make that pixel a light gray
etc. etc.
Gent Krasniqi schrieb:
well md_aperture gives convincing results if you use enough samples
and if
you're willing to accept the rendertimes. Let's not forget that with
maxwell you're looking at ~ 20 hours (on an up-to date system) for
the noise
to clear up on reflective surfaces such as in this case.
This is a typical scene where a renderer like Maxwell will turn out
largely
'undisputed' superior renders, because it is what's it advertised to
be.. a
simulator. But you'll have to pay in someway with every renderer, in
maxwell's case its rendertime.
Though I think that for fields such as product visualization etc, that
require highly realistic stills, it probably is the best choice.
On 8/14/06, Christian Götzinger <cg(at)pension-goetzinger.de> wrote:
> Hi,
>
> I didn't try md_aperture, but last time I checked it didn't really
give
> fully convincing results. I might want to give it another try,
though I
> think it may be too slow.
>
> As for the reflections in the rings - I saw your image in the CGTalk
> thread. If you compare that to ThomasAn's image directly above it
> becomes obvious that the reflections in the two rings are not blurred
> because of blurry reflections. You can clearly see out-of-focus
> highlights that are caused by the depth of field. These are missing in
> your 2D solution which is why your version looks flat.
>
> Furthermore, the challenge rules state that both rings are supposed to
> have "high gloss reflections" - only the main bodies of the coins are
> supposed to have very blurry reflections. But as you have seen,
even by
> bypassing the rules and making the reflections blurry you cannot
> simulate the rich look of out-of-focus highlights.
>
>
> Gent Krasniqi wrote:
>
> > Did you try md_aperture? There is a spdl somewhere at cgtalk. It's
> > still slow (like 3d dof in 'most' renderers) but has more control
like
> > aperture shape etc.
> > BTW, alot of the 'sparkle' in the reflection of that gold ring is
> > caused by the gold ring not being perfectly reflective (alittle
> > roughness) and high gloss. Doing a render of that scene right
now and
> > will post a mental ray result here.
>
>
>
> Apparently it originates from Maxwell Render. If I recall correctly
> however, I've seen similar quality come out of VRay in this thread.
> I don't want to majorly dwell on this particular image however, as it
> was just supposed to be one example for an area where I can't seem to
> get convincing results out of mental ray.
>
> By the way, I did try X-DOF on this scene back in the day, and the
> results were absolutely horrible, they screamed "post DOF".
> This is especially annoying because X-DOF's Lens Shader seems to
> calculate everything correctly (the reflections become way more
> defocussed than the ring surfaces), however the X-DOF Output Shader -
> which is supposed to wrap everything up - doesn't care about this and
> incorrectly adds the final blur based on Z-depth, not on ray length.
>
>
> Steven Caron wrote:
>
> > hey christian what renderer did this image originate from? just
curious...
> >
> > steven
>
>
>
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text
in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
unsubscribe xsi