|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 19.06.2021 um 15:37 schrieb Norbert Kern:
>
> > If you set every diffuse, specular, phong, ambient, emission and reflection
> > value as zero, you get a black material.
> > A white fog turns this to an inverse depthmap. Then you can adapt
> > the color_map of your blurring file or you can invert it via Photoshop
> > and co to get a "regular" depthmap.
> > Here is a depthmap of my last image.
< [Clipka:]
> Some caveats of this approach:
> [snip]
Using fog to create a depth-map is a very clever idea, even with the caveats
that Clipka mentions.
From some quick experiments I just did, I've found what may be a simpler fog
method, that does not require any adjustments to a scene's object textures at
all. They can be left as-is.
1) Turn off any LIGHTS in the scene.
2) In the scene's global_settings block, add ambient_light 0.0 -- which is a
multiplier for any ambient light in the objects' finishes.
3) Use a simple fog statement (default fog_type 1) like
fog{rgb 1 distance 15}
..... or whatever distance value looks correct. This will produce a gray-scale
depth_map with pure white in the distant background, and black *at* the camera,
I think. The interesting point about this set-up is that all of the objects'
COLORS seem to be 'eliminated'-- the entire scene is now just gradations of
gray. Apparently, with no actual light in the scene, and no finish{ambient or
emission}, the fog 'color' is the only color seen; all of the object colors are
suppressed.
Perhaps a ground fog (fog_type 2) may be better-suited to this, but modified--
possibly by setting the fog's 'sky' vector to be the same as the camera look_at
vector(?). The idea being that ground fog has more parameters that can be
tweaked, to possibly 'fudge' some of the depth/distance problems that Clipka
mentioned. Just a guess though.
Also, try srgb 1 for the fog color, which should(?) produce a 'different' type
of exponential fog-color falloff. Maybe.
Post a reply to this message
|
|