PDA

View Full Version : EI z-depth in Photoshop?


buggsy
04-25-2006, 11:04 PM
Can anyone here tell me if I can use photoshop to composite z-depth EI files. I know you can use After Effects.

Have a look at this excellent rendering! Reidar says that he used photoshop for the depth of field!

http://forums.cgsociety.org/showthread.php?t=328799&page=8&pp=15&highlight=jewelry

Many Thanks
Buggsy

matthoff
04-26-2006, 06:14 PM
This would come down to the abiity to use the .eiz file as a blur layer. I know you can do this in AE with the .eiz file. As I recall the latest version of the .img plug-in for Photoshop http://telegraphics.com.au/sw
supports the .eiz "flavor" of the .img file.

Here are the old instructions for doing it in AE:
DOF in AE very easily and quickly.

1. Render a normal EI image.

2. In the Render control panel, change the format to Planar Z-depth.

3. Render another image with the same name, but with the extension .eiz.

4. In AE, import the .img file. Don't import the .eiz file; AE won't let you anyway. Drag the .img file into the Make New Comp icon.

5. Right click on the .img layer and select Best quality so you can see the real effects of the blur.

6. In Effect->3D Channel, select Depth of Field.

7. Move the sliders back and forth to set the depth of field and the amount of blur. The units correspond to EI distance units.

buggsy
04-27-2006, 12:06 PM
Matt, I'll try the new plug-in you gave me the link to. Thanks for your help, it's much appreciated.

Buggsy

WmH
04-27-2006, 02:37 PM
Matt, I'll try the new plug-in you gave me the link to. Thanks for your help, it's much appreciated.

Buggsy

Instructions for using EIZ depth of field blur in Photoshop

As Matt said get the Telegraphics plugin.
Import the image file and the planar z depth rendering file into PS.
There are basically two ways to do it. First you can copy the zdepth image, then create a new channel in the image file (call it DOF) and paste it (zdepth image) into the new channel. Move back to the RGB channels, apply the lens blur filter and select the (new) DOF channel as the depth map source.
The other way, is to use the zdepth file to generate selection masks (select by color) of what you want blurred (two possible one for BG blur and one for FG blur) save each as a channel and copy them into the image file (create channel(s) in the image file)
Use the selection sets to mask the standard (Gaussian) blur. This is a much more freeform technique and it requires you to set the limits of what you think should be blurred and how fast the blur ramps up. (you can even overlap BG and FG blur so nothing is in focus!!!) Because of that it is easy to get very wrong (or surrealistic) depth of field blurring. Also be aware that you can use any filter (not just G-blur) with this technique so you can generate very surreal depth effects (like using noise or saturation rather than blur to set POI).
This (particularly the second method) can be confusing till you get the hang of it. If you have any questions just ask.

antnee
04-27-2006, 03:14 PM
there is another type of blur called camera blur (under the same menu in PS- CS) and you can use the zdepth mattes in this to produce a more realsitic blur!

WmH
04-27-2006, 06:14 PM
I had not done depth blur (in PS) in a while, (mostly motion video) so I was playing with the blur filter. Couple tips...
When you paste the depth mask into a channel of the image file it (obviously) flattens the image from a 16bit to 8 bit so... before you copy use set levels to clamp white and black points to where there is really data, that way your 8 bit GS DOF channel is using it's range to the best possible use.
Also the lens blur filter has a cool trick I didn't know of (I discovered by accident) While you have the filter open you can click in the preview to set the focus point (any thing in fron or behind will be blurred)
Here is the pic I played with

Original (unaltered render)
http://idisk.mac.com/holderness/Public/Concept/Original.png

With the PS lens blur filter (overblurred for example) (base of cylinder in center is center of focus)
http://idisk.mac.com/holderness/Public/Concept/Depthblur.png

And with the application of filters (Crosshatch & Graphic Pen) inside and outside the focus zone (surreal POI)
http://idisk.mac.com/holderness/Public/Concept/DepthFilters.png

If anyone should want the original's (.img and .eiz) I will post them

WmH
04-28-2006, 02:33 AM
there is another type of blur called camera blur (under the same menu in PS- CS) and you can use the zdepth mattes in this to produce a more realsitic blur!

I don't have that filter, is it a third party plugin? Are you sure you don't mean lens blur?

antnee
04-28-2006, 08:38 AM
yes, lens blur it is, sorry! wrote that in a hurry! :-)

buggsy
04-28-2006, 11:23 AM
Thanks for the relpies. Everyone has been very helpfull.

I also found that you can adjust the "Image", "Adjustments", "Curves" of the z-depth file in Photoshop to shift the point of focus.

WmH I don't quite see the value in the second technique with selection masks. Could you give a little more detail on this. I have seen a similar usage described but didn't quite grasp it either.

Buggsy

WmH
04-28-2006, 01:44 PM
Thanks for the relpies. Everyone has been very helpfull.

I also found that you can adjust the "Image", "Adjustments", "Curves" of the z-depth file in Photoshop to shift the point of focus.

WmH I don't quite see the value in the second technique with selection masks. Could you give a little more detail on this. I have seen a similar usage described but didn't quite grasp it either.

Buggsy



The second technique of making "infront" and "behind" selection masks allows the use of other (any) filters. This would be necessary on high depth files (the lens blur filter only works on 8 bit files) or (in the case of my example image) the use of filters other than blur to set point of interest. (a surreal depth of field) (One of the ways depth of field is used creatively (both CG and traditional cameras) it to force the users point of interest. Our eye will always gravitate to the in-focus portion of the image. This is how focus pulls are used to shift the viewers interest from one object to another) Making front and behind masks (the second technique) is more labor intensive but is more flexible. If you want a simple DOF on an 8 bit file (ie EI rendering) create a single DOF channel and use the lens blur filter.

Lance did a article in his blog a while back, it will give you some good background info on using depth files to generate DOF.
http://www.3dny.org/?p=17

reidar
04-28-2006, 03:25 PM
Hi all,

I did use the lens blur filter for the rendering Buggsy is referring to. I hope some z-buffer technique like this will be built into EIAS some day. It is not perfect, but there is nearly zero processing time required. And in these GI-times, multi-frame DOF is, well, you know!

:-) Reidar

WmH
04-28-2006, 04:17 PM
Hi all,

I did use the lens blur filter for the rendering Buggsy is referring to. I hope some z-buffer technique like this will be built into EIAS some day. It is not perfect, but there is nearly zero processing time required. And in these GI-times, multi-frame DOF is, well, you know!

:-) Reidar

Is is interesting that it was never incorporated. Perhaps because it is easy to do separately (with the depth file) and that many times you would rather to do the DOF in post (I do very little still work, I use Buena's depth cue suite in AE which has a really nice rack focus plug and having ultimate flexibility with DOF for CG (virtual) sets has saved me more than once)
You do occasionally run into some unwanted artifacts but those are normally much easier to handle in post rather than if you had rendered the depth of field blur in the original image. Maya offers fast DOF blurring (post render, based on a depth file) however few use it because once the image is rendered with the blur incorporated there is no way to correct if you develop an artifact (or someone changes their mind) when comping, you just have to go back and re-render (not great for deadlines)

The (one) major drawback is that other renderers can claim fast DOF without "photoshop'ing" the image. However this is basically a semantical argument, because the DOF is being added as 2d post-processing (based on a depth file) in either case (not straight from the math of the 3d render engine)

Edit....
Perhaps Matt or the Igors can answer... (if they are reading, or another programmer who is familiar with the current render engines) Does any renderer (AKA does any math exist to) do true 3d DOF blurring without the huge render hit of mlti-frame rendering. (even multi-frame require 2d post blurring unless you have an huge number of multi-frames)

matthoff
04-28-2006, 05:21 PM
What is "True" DOF? The goal is to have an image or animation appear to be depth blurred in the same way a camera lens would "see" the scene.

I think a combination of a depth map and a pixel coverage map (what percentage of the pixel is contributed by each object) could yield a DOF effect that is equal to that captured by a lens. There are quite a few papers on doing DOF as an effect. Clearly, it would be useful if Camera could spit out a variety of sperate layers each containing separate information that was usable in post.

WmH
04-29-2006, 03:02 PM
Matt, I think you misunderstood my question. I like doing blur post render (in comp). If it were available as a render option I would likely still do it in comp (unless the results were noticeably better.)
My point was many people look down their nose at using photoshop to do DOF blur when in fact their render engine is likely doing the same thing internally ->2d blur based on a z depth mask (Maya's renderer as an example) Question is (was) do any renderers implement the DOF blur in 3D (like multi-frame) in a reasonable time or is it all basically done post render in 2d using a depth based blur mask.

Also I am unsure of the value of combining the depth and visible renderings in layers a single file. Would you chop the z depth to 8 bits (Ok for DOF blur but not a good idea if you are using it for z placement in a comp, particularly if objects intersect) or pad the 8 bit rendering to 16 bits (and double the size) or have a hybrid (8/16) that wouldn't be compatible with image processing programs (PS, AE, ect) internal formats anyway. I like the flexibility of 2 separate files. It might be nice to have a checkbox in the render dialog for "also render z depth file", so a rendering would render 2 files automatically.
What would be nice is to have the the option to separate the visible rendering layers (shadow, glow, reflections, ect) separated into layers in one file (as long as that file was an easy import into comping applications (AE, PS, Shake, ect..))

Igors
04-29-2006, 07:00 PM
Hi, William
Question is (was) do any renderers implement the DOF blur in 3D (like multi-frame) in a reasonable time or is it all basically done post render in 2d using a depth based blur mask.As we understood, you ask can multi-framing DOF rendering be much faster than a series of usual renders that are mixed then. We don't know how it is in other renderers, but tasks sorta this (partial render with using previously accumulated results) are popular in theory but not in practice. It's always very complex and unsafe to detect what's changed and what needs to be recalculated. With DOF it's also ungrateful cause it would be hard to prove that "true DOF" is better than "not true" that's at least always faster. In any case the DOF is a classic post-processing task.

FelixCat
04-29-2006, 09:01 PM
As Wmh says, to have the option to separate the visible rendering layers (color, shadow, glow, reflections, zdepth, etc) separated into layers in one file, ala C4D does, and being easy to import the resulting file into comping applications like AE, PS, Shake, etc. could be a great, great improvement in workflow. I donīt know how feasible it is for Camera.
Jus crossing the fingers...

FelixCat

Reuben5150
04-30-2006, 08:25 PM
Can anyone here tell me if I can use photoshop to composite z-depth EI files. I know you can use After Effects.

Have a look at this excellent rendering! Reidar says that he used photoshop for the depth of field!

http://forums.cgsociety.org/showthread.php?t=328799&page=8&pp=15&highlight=jewelry

Many Thanks
Buggsy

I like frischluft plugins for PS and AE very much !, lenscare does great DOF and it works with .EIZ, just copy the z-depth into the alpha channel and bingo :)

http://www.frischluft.com/

Reuben

WmH
04-30-2006, 10:07 PM
I like frischluft plugins for PS and AE very much !, lenscare does great DOF and it works with .EIZ, just copy the z-depth into the alpha channel and bingo :)

http://www.frischluft.com/

Reuben

I think anything works with .EIZ given the telegraphics plug, or is there something special that I am missing?
Anyone looking (for a more realistic depth blur than the stock adobe filters) should also take a look at Buena's depth cue (suite of AE depth plugs, the rack focus plug is very similar to lens care) it has has more capabilities (then blur) and the entire suite is $169

http://www.buena.com/depthcue.shtml

CGTalk Moderation
04-30-2006, 10:07 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.