Sticky: Changes and Additions

This article contains numerous corrections and additions to existing posts. Those are mentioned here, in a separate place, simply because they are not included (yet) in the PDF downloads and because I like to keep my main posts and the PDF in sync.

Poser the Program – 6. Library

Dockable Library

The manual states that the Library Window, in a 64-bit Poser Pro, cannot be docked. This is indeed the case with Poser Pro 2010, where the General preferences, Library tab, Lauch behavior is greyed out.

However, in Poser Pro the “embedded’ option can be checked when one has the 64-bit version of Flash installed as well. This might be still in beta, but nevertheless.

(thanks to Wim van de Bospoort)

Library File Types

I have stated incorrectly that when you’re in say Characters, you only can see Characters (cr2/crz) items in the Library. Not correct, you can see and use all types of items. This means that you can put dress, accessoires, materials, poses and the like all in one folder, and subfolders. This prevents the scattering around of all sorts of files which you wan to stick together.

(retest as suggested by GeneralNutt and BagginsBill).

But…

  • when you’re in say the Characters environment, you only can add Character items to Favorites. Not the Poses. So from Props, you can add the dress but not the mats. It’s inconvenient, in my opinion.
  • when the dress has say 20 mats in one folder, you have to add those mat items individually to Favorites, you cannot add a shortcut to the folder itself. It’s cumbersome, in my opinion.
  • and the only way to save say Hair is selecting the Hair option in the Library. Add to Library then enforces saving in the main Hair folder. No way to save the mats then in a Mats subfolder in the Hair environment (thanks to ElZagna).
    Of course the files can be moved afterwards using Explorer or so, but nevertheless.

For me, P3dO is the content manager of choice.

Poser the Program – 8. Strategies

People using Poser, or Poser Pro in a 32-bit environment, cannot profit from rendering in Queue. Especially for them, but probably for other users (and other uses) as well, the Scripts menu, in Partners, Dimension3D offers the Render Scenes and Render Content (in a standard scene) scripts.
Plus the Render Firefly script with all options in one pane, and the possiblity to go beyond the Poser max settings. So one can set max Raytrace Bounce to 100, if needed.

Poser Render Passes

In the preliminary versin of the tutorial, I have not discussed working with the Ambient pass. In those cases where the Ambient of materials is used to present glowing elements of clothes or buildings or alike, those layers can be used to create an additional glow to the image.

However, when Ambient is used to correct for lighting issues in the scenes, or for emulating surface scattering as might be done with human skin, the Ambient layer is hardly worthwhile to process separately. Your image, your call.

Managing Poser Scenes (04. Camera Lens Effects)

In real life, a camera consists of an advanced lens system, a diaphragm and shutter mechanism, and an image capturing backplane. The diaphragm (relates to focal blur of Depth of Field), and the shutter speed (relates to Motion Blur or 3D Blur) were discussed already, and the role of the backplane is played by the rendering engine (which will be discussed in other sections of these Missing Manuals).

Something to note when emulating realistic results, is the relationship between things, which is not looked after by Poser itself. Doubling the sensitivity, speed or ISO value of the backplane increases the visibility of noise / grain in the result, and for the same lighting levels in the result it also doubles the shutter speed (is: halves the net opening time), or reduces the diaphragm opening (or: increases the fStop with +1), or reduces the Exposure (in Poser: halves the value, in Vue: reduces with -1.00).

Hence, when I show pictures of a dark alley, people expect more motion blur (longer shutter time) and/or more grain. When I show a racing car or motor cycle at full speed, people expect a shallow depth of field, and grain too. And so on. Poser is not taking care of that. I have to adjust those camera settings and post processing steps myself.

The other way around, portraits and especially landscapes can do with longer exposure times, and will show nearly no grain in the image and hardly any focal blur (infinite depth of field). And most lenses have their ‘soft spot’ (sharpest result) at fS=5.6 (sometimes 4), by the way.

This leaves us with the lens system. In real life a physical thing, with some weight as well. Physical things have imperfections, and these will “add” to the result. Since the lens system sits between the scene and the image capturing backplane, those additions are added on top of the image. In other words, those imperfections can be added in post, on top of the render. Again, the imperfections are required to make a too perfect render look as being captured by a real camera, adding to the photorealism of the image. When you don’t want photorealism, don’t bother at all.

In the first place, the lens system is a tube and therefor it captures less light at the edges. This is called vignetting. A dark edge on the picture, very visible in old photographs. Modern systems on one hand have better, brighter lenses, and on the other hand the lenses are just a bit wider so the vignetting takes place outside the capturing area.

Vignetting is a must – like scratches – on vintage black and whites.

Second, the lens system consists of various glass elements. This introduces reflections, either within the element (scattering) or on the elements surfaces. The internal, scattering reflections blur the small bright areas of the image, known as glare. The external reflections generate the series of circles or rings, known as flare. The flare shapes can be pentagonal (5-sides), hexagonal (6-sides) or more to circular, this is determined by the shape of the diaphragm.

Glare, the light areas are glowing a bit

Flare, making rings around the bright spots

Flares always exist from a very bright light within the scene towards the middle of the image. The more elements are present in the system, the more reflections we’ll see. Note that fixed length lenses have far less elements than flexible zoom systems.

Another effect, called bokeh, appears when a very dark, blurred background contains small strong highlights. While they take the shape of the diaphragm (like flares) they scatter around in the lens system. Normally they would not be visible, but they are since they are quite strong and the background is dark and blurred. While flare usually occurs in shots with no focal blur (or: infinite depth of field, outer space is a typical example), bokeh requires the background blur due to depth of field / focal blur. In most cases there is an object of focus and interest in the foreground. So, one cannot have flare and bokeh in one shot.

Bokeh Star flare

Third, the diaphragm itself can be the source of distortions: star flare. This usually happens when there are strong highlights in (partially) bright images, where the diaphragm is about closed due to a high fStop number. This tiny hole in the wall refracts light along its edges. A six-piece diaphragm will create a six-pointed star.

Note that the conditions for flare and star-flare contradict: flare needs an open diaphragm due to the dark background (like outer space) while star-flare requires a closed diaphragm due to the bright environment (sun on a winters day). The well-known sci-fi flares (Star Trek), having circular flares ending in a starry twinkle, are explicit fakes for that reason alone. One cannot have both in the same shot.

All these effects can be done in post, after the rendering. Sometimes you need Photoshop for it, perhaps with a special filter or plugin. Vue can do glare and both flares (but not bokeh) as part of the in-program post-rendering process.

Note: some people use flare as a container concept: everything that is causing artifacts due to light shining into the lens directly. Glare, flare, star-flare and bokeh are just varieties of flare to them. No problem, it’s just naming.

Next >>

Managing Poser Scenes (05. Camera Stereo Vision)

Once I manage to get images out of my 3D software like Poser or Vue, I might ask myself: “can I make 3D stereo images or animations as well, like they show on 3D TV or in cinema?” Yes I can, and I’ll show you the two main steps in that process.

Step #1 is: obtain proper left-eye and right-eye versions of the image or animation
Step #2 is: combine those into one final result, to be displayed and viewed by the appropriate hardware

Combining Left- en Right Images

In order to make more sense out of step 1, I’ll discuss step 2 first: how to combine the left- and right eye images.

Anaglyph Maker

For still images, this can be done in a special program like the Anaglyph Maker, available as a freebee on the internet http://www.stereoeye.jp/index_e.html. It’s a Windows program. I unpack the zip and launch the program, there is nothing to install. Then I load the left and right images

And I select the kind of 3D image I want to make, matching my viewing hardware. The Red-Cyan glasses are most common, as Red and Cyan are opposite colors in the RGB computer color scheme. Red-Green however presents complementary colors for the human eye but causes some confusion as Magenta-Green are RGB opposites again. Red-Blue definitely is some legacy concept.

When I consider showing the result on a interleave-display with shutter-glasses, or a Polarization based projection scheme, Anaglyph Maker can produce images for those setups as well. Those schemes do require special displays but do not distort the colors in the image, while for instance the Red-Cyan glasses will present issues reproducing the Reds and Cyans of the image itself. This is why images in some cases are turned into B/W first, giving me the choice between either 2D color or 3D depth. Anaglyph Maker offers this as the first option: Gray.

I can increase Brightness and Contrast to compensate for the filtering of the imaging process and the viewing hardware, and after that I click [Make 3D Image].

Then I shift the left and right images relative to each other until the focal areas of both images coincide. The best way to do that is while wearing the Red-Cyan glasses, as I’ll get the best result immediately.

Now I can [Save 3D Image] which gives me the option of saving the Red-Cyan result

Or the (uncolored) left and right images, which are shifted into the correct relative positions.

Photoshop or GIMP or …

Instead of using special software, I can use my imaging software instead. For single stills this might be tedious but for handling video or animations it’s a must, as there is no Anaglyph Maker for handling all movie frames in one go, while Premiere or so are quite able to do that. And then I’ve got my own 3D stereo movie.

  1. 1. Open the Right-eye photo (or film)
  2. 2. Add a new layer on top of it, fill it with Red (255,0,0) and assign it the Screen blending mode
  3. 3. Open the Left photo (or film) on top of the previous one
  4. 4. Add a new layer, fill it with Cyan (0,255,255) and assign it the Screen blending mode
  5. 5. Merge both top layers (the Left + Cyan one) into one layer and assign this result the Multiply blending mode. Delete the original Left+Cyan layers, or at least make them invisible
  6. 6. Shift this Left/Cyan layer until the focal areas or the Right/Red and this Left/Cyan combi align
  7. 7. Crop the final result to lose separate Red/Cyan edges, and save the result as a single image.

Please do note that I found that images with transparency, like PNG’s, present quality issues while non-transparent ones (JPG’s, BMP’s) do not. Anaglyph Maker supports BMP and JPG only. I can swap Left and Right in the steps above, as long as the Right image is combined with a Red layer (both start with ‘R’, to easy remembering), as all Red-Cyan glasses have the Cyan part at the right to filter the correct way.

Obtaining Left-eye and Right-eye images

Although in real life dedicated stereo cameras can be obtained from the market, this is not the case for 3D software like Poser or Vue, so I’ve got to construct one myself. Actually I do need two identical cameras, a left-eye and a right-eye one, at some distance apart, fixed in a way they act like one.

(Image by Bagginsbill)

The best thing to do then is to use a third User Cam, being the parent of both, and use that as the main view finder and if possible, as the driver of the settings of both child cameras.

Such a rig guarantees that camera movements (focal length adjustments, and so on) are done in sync and are done the proper way. Like rotations, which should not take place around each individual camera pivot but around a pivot point common for both eye-cameras. In the meantime, the User Cam can be used for evaluating scene lighting, composition, framing the image and so one before anything stereo is attempted.

Les Bentley once published a Stereo Camera rig on Renderosity. You can download it from here as well, for your convenience. Please read it’s enclosed Readme before use.

Now I’ve grasped the basic principle, the question is: what are the proper settings for the mentioned camera rig? Is there a best distance between the cameras, and does it relate to focal length and depth of field values? The magic bullet to these questions is in Berkovich Formula:

SB = (1/f – 1/a) * L*N/(L-N) * ofd

This formula works for everything between long shot and macro take, is great for professional stereoscopists working in the movie industries, and helps them to sort out the best schemes for anything from IMAX cinema to 3D TV at home, or 3D gameplay on PC. It relates the distance between both cameras, aka the “Stereo Base” SB with various scene and camera settings:

  • * f – focal length of the camera lens (as in: 35mm)
  • * a – focal distance, between the camera and the “point of sharpness” in the scene (as in: 5 meters = 5000mm).
  • * L, N – refer to the nearest and farthest relevant objects in the scene, as in: 11 resp 2 meters. On the other hand, both can be derived from Depth of Field calculations, given focal distance and f-stop diaphragm value.
  • * ofd – on film deviation, as in: 1.2mm for 36mm film. What does it mean? When I superimpose the left- and right-eye shots on top of each other, and make the far objects overlap, then this ofd is the difference between those shots for the near objects. Or when I superimpose the shots on the sharp spot (as I’m expected to do in the final result), then this ofd is the deviations for the near- and far objects added together. This concept needs some translation to practical use in 3D rendered images though. I’ll discuss that later.

So for the presented values: SB = (1/35 – 1/5000) * 11*2/(11-2) * 1,2 = 0,083 meters = 8,3cm which coincides reasonably with the distance between the human eyes.

For everyday use in Poser or Vue, things can be simplified:

  • * the focal distance a will be much larger than the focal length f as we’re not doing macro shots, so 1/a can be ignored in the formula as it will come close to 0
  • * the farthest object is quite far away from the camera, so L/(L-N) can be ignored as it will come close to 1
  • * the ofd of 1.2mm for 36mm film actually means: when the ofd exceeds 1/30th of the image width we – human viewers – get disconnected from the stereo feeling, as the associated StereoBase differs too much from the distance between our own eyes.
  • * It’s more practical to use the focal distance instead of the distance to the nearest object, as focal distance is set explicitly for the camera when focusing.

As a result, to make the left and right eye images overlap at the focal point, one image has to be shifted with respect to the other, for

(Image shift) = (Image width) * (SB * f) / (A * 25)

With image shift and image width in pixels, StereoBase SB and focal distance A in similar units (both meters, or both feet), and focal length f in mm. For instance: with SB=10 cm = 0.1m, f=35mm and A=5 mtr a 1000 pixel wide image has to be shifted 1000 * 0.1 * 35 / (5 * 25) = 28 pixels.

For a still image, I do not need formulas or calculations as I can see the left and right images match while nudging one image aside gradually in Photoshop. But in animations, I would not like to set each frame separately. I would like to shift all frames of the left (or right) eye film for the same amount of pixels, even when focal length and focal distance are animated too. This can be accomplished by keeping SB * f / A for constant, by animating the StereoBase as well.

Next >>

Poser Render Passes (1 Intro)

Don’t do things in 3D when they can be done in 2D.
Render passes save a zillion trial and error test-renders, and make results interactively adjustable.

Download this tutorial in PDF format (1.4 Mb).

Introduction

While working in Poser, I can build a scene, and start tweaking the lights, shadows, atmospheres, specular and reflection strength, and more. And I might like to add special effects, like depth of field (focal blur), volumetric lights, etcetera.
Especially with multiple objects, multiple lights, the use of raytracing and IDL (Indirect Lighting) and alike I have to face renders, re-renders, re-re-renders and all of them having serious waiting times even on my – pretty fast – machine.

Professionals facing a deadline, with a limit on the hours they can spend on the job, or with a customer that shows a lot of variance in his requirements, this is not very desirable. But even hobbyists might face deadlines (the image must be done before Christmas or another event), might find themselves quite flexible in the result they want to achieve, and certainly don’t have the time to spend all forthcoming hours on perfecting that single image.

This is why Render Passes are invented. Each Pass (image) addresses a specific facet of the result, then all passes are combined as layers in a single Photoshop (or GIMP or else) image handling kit, and then the layer parameters are manipulated instead of re-rendering the scene over and over again. In practice, this is not only much faster, it’s also far more interactive.

In this article, making and re-combining render passes is presented, as far as Poser and Photoshop are concerned. Vue will be added in a later stage, or in a separate article. I presume almost all Photoshop steps can be performed in other, similar image handling kit as well. Just the screens might look different.

Step 1 will deal with separating the darks: handling shadows. Step 2 will deal with separating the lights. Both steps can be made in just Poser, and can be combined in: separating darks as well as lights.

Step 3 will deal with the tools available in Poser Pro, and step 4 deals with the Advanced Renderer toolkit.

Poser Render Passes (2 Shadows)

Separating the darks

In this first elementary step I’ll present some basics: just dealing with the shadows in the image. To do so, I need one render result without shadows, and one with shadows only. This can be done in the Render Settings, the Manual department.

First: I uncheck the Cast Shadows option, render, and export the result.
Second: I check both the Cast Shadows as well as the Shadows Only options, render and export the result.

This gives me two images:

Without shadows Shadows only

Now I’ve got to combine those two in Photoshop. Actually the color pass is the base layer, but since I exported it with a transparent background (PNG, or in Poser Pro: EXR) I’ll added an extra white layer underneath. On top of that I add the shadow layer, and I set the Blend mode to Multiply (“Vermenigvuldigen”, in my Dutch version). Right now, I can adjust the shadow strength by reducing the opacity of this layer to 70%.

=>

This gives me the same result as reducing the shadow-intensity of the light in Poser, but without the re-render.

In reality, all considerations that reduce the depth (darkness) of the shadows will also lead to blurred edges. Deep shadows have hard edges, while shallower shadowing comes with blurred edges. However, it’s a bad idea to use Photoshop blur un the Shadow-layer, because this 2D approach does not take the geometry of the scene into account.

So I re-render the scene, for the shadow-pass only, with a very blurred shadow setting. Note that just tenfolding the blur radius (from default 2 to 20) might give very blodgy shadows, so I tenfold the Samples (from default 19 to 200) as well. Render and export as a new “soft shadows” image.

In the meantime, I’ve created a layer group for the shadow layers, put the already present Shadows only layer into it, and assigned the Multiply blending mode and the 70% opacity to the group while resetting the layer itself to Normal blending, and 100% opacity.

Now I can add the new Soft Shadows layer to the file (and to the shadows-group), Normal blending, 100% opacity too. Then I can start experimenting with the opacity of the top shadow layer. It’s a matter of taste whether to use the hard or the soft shadows layer on top. I prefer the hard ones, as using low opacity values for that layer gives me better control and nuances over the final result.

0% hard shadows 50% hard shadows 100% hard shadows

As a result, I’ve got one slider (group opacity) to set the shadow intensity and one (top shadow layer opacity) to set the shadow edge blur. Completely interactive, without the need for a re-render. I can stop right here, or I can use this method to establish the best settings for my final render. For instance, I might conclude that I’ll have to set shadow intensity to 70%, and shadow blur halfway (say radius 10, samples 100) for my final Poser render.

Note: if you look at the car closely, you’ll notice that there is some shadowing under the tires as well which is not dealt with. This is the result of the Ambient Occlusion setting of the light, I’ll discuss it in the next chapter.

Poser Render Passes (3 Lights)

Separating the lights

In a scene with multiple lights, I’ll have to balance those lights for color and intensity. This too can be done the Render-Pass way, to either achieve the desired result or to achieve the preferred settings for the final render.

The first thing I’ve got to do is to set my Render Settings. In the first run, I uncheck Cast Shadowsand Shadows only to get my shadow-less results. I don’t render, but just Save Settings instead.
Then my help is in the menu: Scripts \ Rendercontrol \ Renderpasses:

And all I have to do is to click the presented folder path to set a better path for the results. It’s well advised to make an empty folder for each run in order to avoid overwriting files. Then I click [OK] which gives me – for a two light scene and both the extra ambient and occlusion passes checked – with four (PNG) files.

Now I alter the Render Settings, check Cast Shadows and Shadows only, Save Settings, go for the RenderPasses script, select a new “Shadows” folder (which I’ve created first), and click [OK]. Same files, but:

  • The files call Light 1 and Light 2 are the shadows of those lights, so I might rename them to Shadow 1 and Shadow 2 respectively and add them to the previous collection with the Light files.
  • The Ambient pass and Occlusion pass files can be discarded. Even better, the y can be checked OFF in the dialog box. With shadows only there will be no meaningful Ambient result while the Occlusion result will be the same as in the previous run. I will not use Ambient in this chapter, though.

Notes:

  • For all lights, switch OFF their Occlusion settings, and set all of them to 100% intensity, full white, 100% shadow.
    I prefer raytraced shadows for better quality and I have raytracing switched ON in the Render Settings. But that’s a personal preference only, shadow maps will work as well.
  • Following the routine from the chapter on shadows, I perform the shadow-run twice.
    First, all my lights have hard shadow setting (radius 2, samples 20).
    Second, all my lights have soft shadow setting (radius 20, samples 200).
    Next to the Shadow 1 and Shadow 2 files, this gives me Soft Shadows 1 and Soft Shadows 2 as well.
  • When you’re using Poser Pro, be sure to switch OFF Gamma Correction for the first, shadowless renderpass. Otherwise you’ll end up with a too much bleached result. For the shadow passes, it’s better to leave GC ON.

Okay, now I’ll have to combine the intermediate files to Photoshop layers. Like in the previous chapter, I make a white background layer to handle the transparencies from the PNG files, and I bring in both Light layers. The first one is set to normal blending (with the background) and the second is set to Screen blending. This blending mode acts if you’re projecting a slide on a wall, which is exactly what happens when we’re adding lights. To reduce the intensity of the second light relative to the first, I can reduce the opacity of that light-layer. If I want to intensities just the other way around, I have to swap the Light layers (and their blending modes).

Then I add the shadow layers. Occlusion – or: self shadowing – has its own blending mode and opacity, the other Hard- and Soft shadow layers per light can be grouped. Each group has Multiply blending and its own opacity, and within each group hard and soft shadows can be balanced separately.

Now it becomes so easy to play.

Softer shadows (group opacity to 50%, hard shadows opacity to 15%), a brightness boost using a curves adjustment on the light-layers, and a color balance adjustment to both lights: more green to Light 1 (right/back side), more red to Light 2 (left/front side).

Poser Render Passes (4 PoserPro)

Featuring Poser Pro

Poser Pro, from version 2010 up, presents some additional features for generating render passes, and high quality results.

In Render Settings, the right bottom corner, you”ll find the Auxiliary Render Data. Just check a few, render, and export the image (as, say, Multipass.png).

In this example I’ve checked six options, and hence I get seven files:

  • My Multipass.png final render result
  • Multipass Custom 1, 2 and 3.png results
  • Multipass P, Z and objectID.png results

It does so for each image format, JPG, TIF or whatever I select. Unless I select the PSD format, this gives me one Photoshop file with seven layers. Blending modes nor opacity is set yet, layers are switched off and the final render result is presented as the background layer, with a transparency mask.

For the High Definition results (16 or 32 bit per color) file formats HDR and EXR things work exactly the same, you’ll get all files in one export. Please remind to check the “HDRI optimized output” box before rendering when you want to go the HDR route. EXR is Poser internal format, use it when you can afford it.

Let me show you what can be done now.

Custom 3
Assuming that nothing else is arranged for (*), this image or layer stands for: Shadow. So the blending mode should be set to Multiply. And as a bonus we can forget about that previous Separating the darks chapter, because this is catered for already.

Custom 2

Again, assuming that nothing else is arranged for (*), this image or layer stands for: Specular. You might be aware that each direct light is represented by a Specular and a Diffuse channel, as can be seen in the Material Room. Now the Light layer which was one single item in the previous chapter, gets split in its two components. As this is a Light layer, blending mode should be: Screen.

To make the maximum use of this, I push the specularity in materials and lights to their limits while keeping the proportions between the various materials. Then I can reduce the shine in the scene by controlling the opacity of this Specularity / Custom 2 layer.

Custom 1
Again, assuming that nothing else is arranged for (*), this image or layer stands for: Diffuse. This is the other – and effectively most relevant – portion of the lit scene. This layer should be in Screen mode too.

(*)

Each PoserSurface in the Material Room has three extra slots, where anything can be plugging in what you like. The result of that will not appear in the render result, but will end up in the appropriate output file or PSD layer to help you to establish specific masks for special effects. When not filled, Diffuse, Specular and Shadow take the place of Custom 1, 2 and 3 respectively.

ToonID or ObjectID
Each material gets its own ID (or you can assign the same ID to more materials, but why should you do that?), and in this layer each area with the same ID is represented by its own unique color. So, especially when I set the range of the Photoshop colorpicker to 1×1 (point) resolution, I can make selections in the image by just picking a color. This way, I can build masks ans working selections very efficiently. Hence, this layer is a helper, not part of any result as such.

Z-Depth
The greyscale in this image or layer represents the distance from the camera into the scene. Nearby is bright, far away is dark. This helps me to place some fog in the scene.

  • I make a working copy of the layer, and replace all transparencies by black: these areas are really far out
  • Then I invert this layer, so near becomes black and far away becomes white
  • With Ctrl A, Ctrl C is put a copy on the clipboard
  • I add a new layer, and fill it with some cloud structure (Filter, Render, Clouds)
  • I give this layer a mask, open the mask (Alt-click), and with Ctrl V I put the inverted Z-Depth into the mask
  • Voila, fog increasing with distance
  • And now I can alter the brightness and contrast of the mask to change the fog density and fall-off rate.

Or, use a dark teal color instead of the clouds, and you’re in a deep sea environment. Take your pick, instant atmospherics.

Another popular thing to do with Z-Depth is creating a Depth of Field effect, or: focal blur. I start with a single layer copy of everything else in the image, Crl+Alt+Shift E does the job in Photoshop merging all (visible) layers into a new one. I put it on top, and give it a serious amount of blur. Then I give it an empty Mask, and copy-paste and invert the Z-Depth into it exactly like I did when making fog. Or otherwise: Ctrl+click the mask of the Fog layer, this will turn that mask into a selection, and then assign a mask to the Blurred layer, which turns my selection into a mask again. Whatever suits you best.

Now the blur is strong at the back (mask is white), intermediate in the middle where I want the sharp focus (mask is grey) and absent at the front (mask is black). But I need it black in the middle (no blur) and white upfront as well, that creates the focal blur effect.

So I Alt-click the mask, and start applying the Curves adjustment. By clicking the drivers chair a dot on the curve tells me how grey it is (105 out of 255 in this example below), and then I raise the extremes and lower that 105 midpoint. That’s it.

=>

Position
This a bit like Z-Depth, but now I can find the X,Y,Z positions in the respective R,G,B channels of this Photoshop layer. You can dream up your own applications for this, one I use often is: use the green (Y, height) channel for making height depending ground fog.

I gave the P(osition) layer a black-to-white gradient background (layer 1) because I had to get rid of the transparency, created a new combi layer (Alt+Ctrl+Shift E) – layer 3, switched to channels, selected and copied to Green channel to the clipboard, pasted this into the mask of the cloudy Ground Fog layer, and inverted it as ground fog is dense (white) at the ground. With an extra blue background, this is a first result.

For a better result, the ground fog density should be distance dependent too, shouldn’t it? So the final cloud mask has to be the multiplication of this height-dependent mask, and the previous depth-dependent mask.

So I create two layers, each containing the masks, set the bottom one to Normal blending and the top one to Multiply, I combine the layers (Ctrl E), and select – copy – past the result into the cloud mask.
See the result; a brownish cloud hue puts the car in a nice sand storm.

Do note that I just demonstrated the use of the height and depth information over a simple background. Instead of this background, the Diffuse, Specularity and Shadow layers should be combined in proper proportions. Then the fog layer should be on top of them, in Normal mode.

So, with this method I don’t need the first Separate the Darks – method. But I still can use the second Separate the Lights approach. Since this method produces seven files per render (as I ticked six layers plus the total render), and makes a render for each light (I’ve got to in this case) plus the two options (Ambient and Occlusion) checked, I end up with (6+1) * (2+2) = 28 intermediate PNG results.

A lot of those are duplicates, or of no use, and can be discarded. The ones I need are:

  • For Light 1.. N the Custom 1,2,3 (Diffuse, Specular, Shadow) layers, and perhaps the final results as well
  • Only one set of ID, P(ositon) and Z(-depth) layers, as they are all the same for the various lights
  • The ambient pass and the occlusion pass.

And when I want a hard-shadow and a soft-shadow version, I’ve to alter the settings per light, and rerun without the need for an extra Ambient or Occlusion. And I make sure to rename the first Custom 3/ Shadow layers first, otherwise I won’t get anything new. From then on, I can put all the required layers in one Photoshop file and start coloring and dimming the diffuse, specular and shadows on a per-light basis, and so on.

Some notes:

  • Existing files are NOT overwritten, the new outputs are just not saved. So please do save in empty folders or rename existing files if you want to make any real progress.
  • As the Diffuse / Specular / etc layering aims at exporting the image in PSD format, the split is available when saving to other image formats as well, but limited to the 8-bits per color formats only. PSD, JPG, TIF etc are fine, but the split does not work when exporting to HDR or EXR (32 bit per color) format.
    Of course, switching lights on/off and blackening Diffuse and Specular channels per light can be done manually or in a new script. That’s tedious though.
  • The script which does the per-light split is written for PNG only. Perhaps someone can build a file-type selector, but in the meantime I’ve created just a few duplicates. The “png” buzzword appears three times in the script as a SaveImage parameter, and can be replaced by other buzzwords. “tif”, “jpg” and others are fine according to the PoserPython manual, but the (undocumented) “psd”, “hdr” and “exr” work fine too.
    Again, in combination with the layer-setting, choosing any 8-bit per color format gives the fine split on diffuse etc on a per light basis, while the 32-bit formats do not give the layered results but still make results on a per-light basis.

Poser Render Passes (5 Advanced RS 2)

Advanced Render Settings 2

Yes it does exist. The script that gives me instant access to all relevant Firefly parameters AND the ability to make render passes with even more options than before AND on a per-light basis AND with time-stamped filenames so I cannot overwrite previous files accidentally AND in full combination with all file types AND without the superfluous, redundant output files.

So now I can make EXR files for Diffuse, Specular and Shadow. But even for Z-Depth and Altitude.

A few notes:

  • PSD files come out as single layers results, so each pass gets its own PSD file.
  • Some obscure passes (like Wireframe) don’t combine well with HDR or EXR output format. But who needs that anyway, and the author is looking into it.
  • Options which are not supported by Poser itself might not show up. Like HDR and EXR file export, or the Render in background or Queue, or Gamma Correction, which are all Poser Pro 2010+ only.

Advanced Render Settings 2 (*) is one of those great tools created by Basil Gass (Semidieu), and can be purchased for less than $20 at www.RuntimeDNA.com or go directly to http://www.runtimedna.com/Advanced-Render-Settings-2.html .

(*) ARS (see http://www.runtimedna.com/Advanced-Render-Settings.html ) is for Poser 7 / Poser Pro, while ARS 2 is for Poser 8 / Poser 2010 and up, even supporting the new SubSurfaceScattering options in Poser 9 / Poser Pro 2012.

And it comes with some extra tools (which nowadays can be found in Poser 9 and PoserPro, at least partially, but not everyone has those already). And a good manual that finally tells you where all those render options are for, plus some good tutorials on how to use the tools in combination with Photoshop.
Very recommended, when you want to deploy render passes to the fullest, especially in combination with high resolution imaging, or with (non-Pro) Poser versions which don’t have the PSD-layering build in.

But beware…

Up till now I’ve discussed relatively straightforward scenes, with direct lights, and results concerning Diffuse, Specular, direct Shadow and indirect Shadow or: Occlusion, and Ambient for some lighting elements. Various tools and procedures might present similar results, differing mostly in the amount of effort to get the details out.
Full-fledged Poser scenes however might be more complicated. Indirect lighting (IDL), objects – like SkyDomes – explicitly used as lighting elements, texture maps assigned to reflection, and more, all can support or hamper the way each tool produces the required results effectively or not at all. This is where we get differences at the content level, in the produces passes themselves.

That is what the next chapters will be about.

Poser Render Passes (6 Material Details)

Considering Material Details

This Render Passes article is not about the details of the Poser Materials, but it is worthwhile contemplating them a bit. As you have noticed in previous chapters, aspects like Diffuse, Specular and Shadow can be diverted to separate layers or images. This gives me the possibility to handle color, highlights and darks in details, even on a per-light basis.

But Poser supports other aspects, like Ambient and Reflection, and also supports Indirect Lighting (IDL). How do these relate to the split (in Poser) and glue (in Photoshop) approach? And what are then the best ways to get the required results out efficiently?

My suggestion on doing Render Passes, which applies to all cases that PoserPro is used, is to switch off Gamma Correction. Because:

  • Rebalancing highlights and lowlights can be done in post, based on the available layers
  • When required the fine details in shadows can be secured by making a Shadows Only render, and then using Gamma Correction or – even better – exporting that result in high definition (EXR) format. But since the nuances in the dark usually appear in situations with dark colors combined with shadows, and render passes present those separately and make you the chief of the combination, it becomes questionable whether separate techniques are required to get those details in the individual layers themselves.

Just FireFly

When using just Firefly I can make a shadows-only and a shadow-less result as described in chapter 2 Separating the Darks. Unless I’ve got Poser Pro 2010+, I can select sub-passes in the Auxiliary Render Data list in Render Settings, as described in chapter 4 Featuring Poser Pro.

  • Custom 1
    presents Diffuse, Ambient, Refraction and – given the chance – Shadows. And in the case of IDL: plus color bleeding and all consequences of using too much light (like loss of shape and depth), especially when a SkyDome is introduced as an additional omnipresent light source. All in one result. Too loose the shadows I’ve got to uncheck Cast Shadows.
  • Custom 2
    presents Specular and Reflection, both in one result. Whether or not Cast Shadows is checked does not matter.
  • Custom 3
    presents Shadows, if Cast Shadows is checked, otherwise it’s blanc. In the case of IDL, shadows will get reduced by the surplus of available light, which becomes especially noticeable with a SkyDome around the scene.

The other sub-passes behave as described earlier. So, I just make a run with Cast Shadows checked without Custom 1 elected, and another run with Cast Shadows unchecked, with only Custom 1 selected. And I do have to save to an 8-bit per color format (PNG) as those sub-passes don’t apply to the high definition (HDR/EXR) formats.

The Render Pass Script

As described in chapter 3 Separating the Lights, this script generates separate passes per direct light in the scene. And then, when Poser Pro is used, is also saves these light-passes with the sub-passes described above. Then the case of using IDL and SkyDomes becomes interesting: at each light-pass, the SkyDome lighting is present too, but somewhat reduced compared to the final, total render. I don’t know how they do it, but when the Light-passes are combined in Photoshop using Screen blending mode, the IDL lighting appears properly. I imagined there could be a problem, having IDL present in each Light layer, but there isn’t.

The script also offers Occlusion and Ambient. Both come as rendered with all lights off. Without IDL, the Ambient pass presents a combination of Diffuse and Ambient but I don’t know what to do with it, while the Occlusion – Custom 1 pass offers the Ambient alone and the Custom 3 pass offers the neat self-shadowing. With IDL however, the Ambient pass presents a neat ambient while Occlusion still presents the self-shadowing, but goes wild in the Custom 1 sub-pass. That is: since all direct lights are off, a SkyDome with its color in Diffuse will not contribute either and leaves the Ambient channel of the ball, plus some color bleeding. But when the color of the Dome is in Ambient, the Occlusion- Custom 1 subpass presents us some IDL-only like version of the scene.

Are you still with me? Or are you feeling a bit like: let’s shut on and off IDL, let’s shut on and off shadow catching, let’s switch on all auxiliary sub passes, let’s render, and then let’s pick everything that might contribute to the result. Can’t blame you, sometimes that my approach too.

So, where are we?

  • I can get Occlusion (self shadow) separately.
    I just use the RenderPass script and check Occlusion.
  • I can get Shadows, separately, even per light.
    Either by rendering with Shadows Only or by selecting the Custom 3 sub-pass (PoserPro, 8-bit per color output (PNG, not EXR), and preferably IDL off), and by using the RenderPass script for a per-light result.
  • I can get Reflection and Specular, but only together. And per light separately
    That is: by selecting the Custom 2 sub-pass which requires PoserPro, 8-bit per color output (PNG). IDL does not matter, and I can use the RenderPass script for a per-light result.
    Not bad, as both are different sides of the same medal: reflection deals with surrounding objects while specular deals with the direct lights. In real life, these always come as one. The downside is that I have to find the right balance in Poser itself. But as long as raytrace nodes are used instead of reflection maps, I might render with raytracing switched off to get Specular only. And I can render while having all specular channels of the lights switched off, manually (or with a script). This might give me Reflection only, but without the reflection of the specularity in the surrounding objects.
    Does it matter whether I use reflection by raytracing or use a reflection (texture) map instead? No.
  • I can get Ambient, separately
    I just use the RenderPass script, check Ambient and set IDL on. Or I leave IDL off, check Occlusion and use the Custom 1 subpass which requires PoserPro and 8-bit per color output (PNG).
  • I can get Diffuse but only in combination with Ambient and Refraction.
    It requires the Custom 1 subpass which by itself requires PoserPro and 8-bit per color output (PNG), and preferably set Cast Shadows OFF. When using the RenderPass script it comes even per light. When the final result requires IDL, leave it on here as well but do note that a strong IDL SkyDome may wash out most object-shape and scene-depth.

Advanced Render Settings 2

Do I need an additional tool, as most of the passes can be made without it? I think I do, since it not only can do more and better but also saves me most of the hassle.

In the first place I can get Z-depth and Altitude (the Y-part of Position) and Alpha MAT (the equivalent of Toon/Object ID) without the sub-passes, and hence without the need for PoserPro or with PoserPro, it works for the high definition output as well.

Second, I can get Shadows, and everything else shadow-less, in one go: I just check the Shadows option and I uncheck the Cast Shadows for rendering, as the shadow pass is generated even when they’re off in the rendered result (tip: save the settings before rendering). I can ask for separate light-passes as well (even separate figure passes). I must render without IDL though, hence I can get it without the need for PoserPro or with PoserPro, it works for the high definition output as well. Note that I can get separate shadows in an IDL render as well, but that requires the Custom 3 subpass, and why should I follow the hard way?

Third, I can separate Reflection and Specular, provided that I render without IDL and that I use the Custom 2 pass. So that requires PoserPro and 8-bit per color. The reflection then can be found in the Color \ Custom 2 pass.
Specular comes on a per-light basis, when requested so by ticking that option. Note that if I don’t crank out the reflection as described, I can still get the Specular + Reflection combination in the Custom 2 sub-passes of each light. I can’t get Reflection out separately when using just Poser, or when exporting to EXR.

Forth, I can get Diffuse and Ambient out separately, I just tick the boxes. Diffuse can come per light, as requested. In the meantime, the (per light) Custom 1 sub-passes give me Diffuse + Ambient + Refraction, and those sub-passes require PoserPro and 8-bit per color (PNG) output. I’ve found no way yet to get out the Refraction separately. But at least I can alter the effect by adding or subtracting Ambient and/or Diffuse from this layer, which is nice anyway.

Poser Render Passes (7 And more…)

And more…

Adding shadow or light

Reducing effects was simple, I just had to turn the opacity slider down for a shadow or light, or ambient or reflection or else. But how about enforcing an effect? More light, stronger shadow, more reflection?

Well, each layer or group in screen mode acts like an additional projector beaming an additional image onto the result, and each shadow layer in multiply mode does something similar for the lack of light. So, I only have to add copies of the layers to add an extra light or shadow, or a stronger reflection of something else.

And for creating say 1.5 times the effect? Well, I just add a duplicate layer and set its opacity to 50%, so I’ve got 1.5 layers for that effect. Now, let’s reconsider re-combining the passes to one Photoshop result.

Combining Shadows and Light

It was stated earlier, that adding a shadow to a shadow-less layer required a Multiply blending mode for the overlaying shadow layer. But what to do when there are more of those layers, say on a per-light basis?

Actually, in that case the relevant sub-passes should be grouped on a per-light basis, having the shadow on top within the layer (multiply mode), and having the group itself in screen mode to blend it properly with the other light-groups. So underneath the shadow sub-pass we’ll find the diffuse, specular, reflection and all other sub-passes for that light. The bottom one in Normal mode, the others in Screen mode.

Now, I’d like to reduce the intensity and alter the color of that light. This should not be done at the group level, as that will alter the shadow as well. And dimmed reddened lights still produce non-dimmed black shadows. But as long as the group really addresses one single light, and don’t include additional IDL from other sources, all the other passes for that light must change. So either I can alter them in sync (tedious), or I can put them in an additional “illumination” subgroup. See the image.

When I want to alter the color and intensity of the light, I can put a filter in front of it. This will make a new layer, on top in the Illumination group. Like I did with a Red, 50% brightness layer. And since it takes light out, it’s set to Multiply blending. Note that reducing the Opacity of this layer just reduces the filtering: the light gets less red and less dark. I also can put in a Red, 100% layer, and reduce the Opacity of the Illumination group. Take your pick.

Some engineering stuff

Let’s look at the Photoshop layering presented in the chapter on Light: the examples put all shadowing at the top and all lighting under them. For total light L, total shadow S, light and shadow L1, S1, L2 and S2 from lights 1 and 2, the math goes:

L * S = S1 * S2 * L thanks to the Multiplying of shadows,
and (1-L) = (1-L1) * (1-L2) or: L = L1 + L2 – L1 * L2 for the Screening.
This combines to : result L * S = S1 * S2 * L1 + S1 * S2 * L2 – S1 * S2 * L1 * L2

Now, let’s look at the layering just presented above.
( 1 – L * S ) = (1 – L1 * S1) * (1 – L2 * S2) so result L * S = S1 * L1 +S2 * L2 – S1 * S2 * L1 * L2

So in the first approach, the contribution S1L1 from light 1 is additionally reduced by S2, and vice versa for the other light. In other words: there is too much shadow in the first approach.

First approach,
one light is not softening the   shadow of the other light.
Second approach,
one light is softening the shadow   of the other light.

Breaking combinations

Some render passes or sub-passes give a combined result, like Diffuse + Ambient + Shadows, and a separate Ambient pass, but no separate Diffuse pass. Hence the question: can I create one? Not for the sake of it, but for enhancing that particular aspect of the image.

Well, since shadows are added to the result by multiplication, and since Photoshop supports a Divide blending mode, taking shadows out is a no-brainer. Add the shadow layer (B) on top of the compound layer (A), set the shadow layer to Divide blending, and done (D). Unless you’re experiencing edge-effects (C). This indicates that the shadow layer does not line up exactly, and you might move it a pixel vertically and/or horizontally. BTW: this happens all the time to me, I don’t know if its Photoshop or the render pass creation itself but in general, passes move one pixel (to the left and down) when putting them together. Moving them back gives me the desired result.

A B
C D

This intermediate shadow-less result still is the combination of Diffuse and Ambient. Since this combination is made in Poser, it’s the result of a plain addition. And since Photoshop supports a Subtraction blending, this is what I have to do to get the Ambient (E) out to get the required Diffuse-only (F). Again, watch the edges and if necessary, move the layer a bit.

E F

So Multiply and Screen are the ways to combine passes into a result, while Divide and Subtract are the ways to break combined passes into singular ones. Note that Photoshop supports Subtract-blending and Difference-blending. You need the first, not the second.

With a remark: Subtracts works well on Poser results because Poser itself uses plain addition (instead of screening) to make its results. When other applications (Vue perhaps) use screening instead, one has to find a way to un-screen. Photoshop does not support this un-screen blending mode directly. The trick: if you want to un-screen Ambient out of a Diffuse & Ambient combination, then you’ve got to Subtract and then to Divide by the inverse of the Ambient layer (in Photoshop: Ctrl+I). So you need the Ambient layer twice, first in Subtract blending, then its inverse in Divide blending.

The math:

  • Say, C is the combination of Ambient A and Diffuse D, by Screen blending. That means: ( 1-C ) = ( 1-A) * (1-D ) – multiplication of the inverses, that’s the definition of Screen blending
  • So, by rewriting, D = 1 – (1-C)/(1-A) =(*) [ (1-A) – (1-C) ] / (1-A) = (**) [ C-A ] / (1-A) and this last statement says: subtract Ambient from the Combi, and divide the result by the inverse (***) of the Ambient.

(*) substitute the first 1 by (1-A)/(1-A) (**) just rewrite (***) the inverse of A is: 1-A, black turns white, red turns cyan, blue turns yellow, etc on a per-pixel basis. Ctrl+I does the job.

For more perfection: be aware of color bleeding when dealing with images rendered under IDL lighting. When you take the Ambient out, then also the color-bleeding of the Ambient must be taken out so you need to look for a pass that offers the Ambient plus its color-bleeding. In some cases, this pass is available as a Custom1 sub-result of the Occlusion pass from the RenderPasses script when used in PoserPro; it might be required to render that pass without a SkyDome in the scene.

So when you’ve got a combined Specular & Reflection pass, and a separate Reflection Pass, you can separate out a Specular pass as well. Now you know how to do it: when they come from Poser – just Subtract.

Material complexity

Splitting aspects of a scene by considering properties of materials is an almost infinite process, as materials and render technology becomes more and more complex. What happens, for instance, with the Alt_Diffuse and Alt_Specular channels of a Poser surface? What happens when nodes like Velvet are used that combine diffuse, specular and ambient? Or nodes that combine Refraction and Reflection, like Fresnel? Which kind of split occurs with the shader trees generated by EZSkin, VSS or MatMatic? What is the effect of SubSurfaceScattering, as introduced by Poser 9 / PoserPro 2012? Will Smith Micro or Semidieu or anyone else bring us new tools (say, after reading this tutorial J )?

I don’t have the answers to all this, but I keep on experimenting, finding out, telling you and updating this article. Feel encouraged to do the same, and tell me about it. In the meantime, I’ve found out:

  • That everything which is put in Alt_Specular ends up in the Specular pass, and that everything that’s put in Alt_Diffuse ends up in the Diffuse pass. In some cases, Advanced Render Settings can do something with its Color and Color_Alt passes, but that seems pretty limited. SubSurface Scattering ends up in the Diffuse pass as well.
  • That complex nodes like Velvet are not separated out. Although the node offers ambient (Ka), Specular (Ks) and Diffuse (Kd), when the node ends up in Alt_Diffuse, all the information is presented in the Diffuse pass. At least, as far as Advanced Render Settings and the sub-passes (Custom 1, 2 3 etc) are concerned. The Ambient pass in the RenderPass script however manages to keep some aspects separate.
  • That when the contents of a pass are about absent, Advanced Render Settings seems reluctant to perform the pass. For instance, when Ambient color is about black and/or Ambient value is about null, there is no ambient pass, even when there is ambient in the Alt_Diffuse or alike.
  • That with respect to all this, complex algorithms like EZSkin, VSS and MatMatic behave conform expectations. But do note that when for instance MatMatic puts the total shader-node-tree construction in Alt_Diffuse, it leaves less aspects to split into separate passes. Every pro has its cons, and this is one of them.

Comparing Post-work to Poser results

In some cases there are differences, in some cases there are not. Shadows in Poser are obtained by a multiplication mechanism similar to Photoshop. But the effects of lights, and the effects of material aspects like Diffuse and Ambient are – in Poser – combined by plain addition instead of screening.

In Poser this generates over-lighting situations quite easily, as a 60% brightness plus another 60% brightness add up to 120%, which then is clipped to 100%.
In post, screening would give: C = 1 – (1-60%)*(1-60%) = 84%, there is no way to over-light a scene. So there will be no clipping either. But this also implies that bright areas in post will look less bright than in Poser. Poser seems to work as a camera which does not adapt itself to higher lighting levels, in post we seem to work with a camera with an automatically reduced film-sensitivity (or shutter time, of diaphragm opening, whatever you prefer).

So post-worked results will differ from Poser. Equally deep in the shadows but softer in the highlights, and without clipping.

Another difference comes with the use of correction methods. Poser supports Exposure Correction, while Poser Pro supports Gamma Correction as well. Those corrections are mainly required to soften the effects of shadows and highlights as well. Deep shadows can hide the nuances of dark textures on objects, which are visible in real life due to the scattering of light in our environment and due to the adaptive working of our eyes when looking into dark places. See the Understanding Corrections tutorial on the details. Strong highlights will cause over-lighting and clipping, as noted already.

When rendering out passes, we do not need those corrections. We’ve got other ways to soften shadows (just blur the shadow layer and reduce its opacity), and over-lighting is almost preventing automatically. So, please, do switch those corrections OFF when rendering out passes for post-production. When you need a generic correction on the image, you can always put one in as a Curves or Levels adjustment. I bet you hardly don’t.