When editing an image, you usually work with 3-D renders onto which you composite 2-D elements, i.e. fire. When using a 3-D program such as 3DS Max, you render something called a [URL="http://en.wikipedia.org/wiki/Z-buffering"]z-pass, a black and white image that uses shades of gray[/URL] (black = far away, white = close) to tell an editing program, such as photoshop, where objects are in the image. This is incredibly useful, as it saves you from having to manually cut the image into layers. In this thread, I'm going to teach you how to [I]mimic[/I] one of these in Garry's Mod for editing purposes. This is divided up into [B]2 methods[/B] for getting the z-pass, and editing.
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Method1.png[/IMG]
[quote][B]This is the PREFERRED method,[/B] because it is compatible with effects and transparency. This method does, however, require that you have complete control over the scene's lighting.
[URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/BaseExample01.jpg"][IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/thumb/BaseExample01.jpg[/IMG][/URL]
Pose your scene, light it using lamps/lights THAT CAN BE TURNED OFF, and place a camera (this is important, you need to be able to reproduce the screenshot exactly). Using the camera, take your screenshot. Then, disable all lighting so that the screen is [I]black.[/I] Using a fog editor, apply a white fog and adjust it so that the fog start is farther away from the screen, and the fog end is closer. Try to get it so that the closest object is pure white, and the farthest is black.
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Fog01.jpg[/IMG]
Now, using the camera you placed before so as to recreate the exact same angle, take a picture. Your image should look something like this:
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/ExampleZD01.jpg[/IMG]
That's your z-pass, and it's beautiful.[/quote]
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Method2.png[/IMG]
[quote][B]This is the method you should only use when you CANNOT edit the scene's lighting.[/B] It is not compatible with effects or transparency, and is more complicated.
[URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/BaseExample01.jpg"][IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/thumb/BaseExample01.jpg[/IMG][/URL]
Pose your scene, and place a camera (this is important, you need to be able to reproduce the screenshot exactly). Using the camera, take your screenshot. Then, using the material tool and a debug white material, color every object in your scene white. In the console, type "mat_fullbright 1" to make everything as bright as possible. It should look like this:
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/fullbright.png[/IMG]
Using a fog editor, apply a black fog and adjust it so that the fog start is closer to the screen, and the fog end is farther. Try to get it so that the closest object is pure white, and the farthest is black.
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Fog02.jpg[/IMG]
Now, using the camera you placed before so as to recreate the exact same angle, take a picture. Your image should look something like this:
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/ExampleZD02.jpg[/IMG]
That's your z-pass, and even though it's lacking foliage, it is still pretty.[/quote]
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Editing.png[/IMG]
Now for the fun part, editing with the Z-Pass. Open your [URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/BaseExample01.jpg"]base image[/URL] and [URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/ExampleZD01.jpg"]z-pass[/URL] in photoshop. Paste the z-pass into base image's alpha channel. Then [I]paste the z-pass as another layer in your base image and invert it.[/I] Your channels/layers should look like this:
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Layers.jpg[/IMG][IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Channels.jpg[/IMG]
Now, first we can apply DOF to the image. Go to filters>blur>lens blur, and follow the image below.
[URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Blur.jpg"][IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/thumb/Blur.jpg[/IMG][/URL]
This will apply a SDOF like effect to the image. Now, we add our effects. Import whatever element you want to edit into the image. Then, duplicate the inverted z-pass. Using image>adjustments>exposure, clamp the z-pass so that the objects in front of the element are black, and the ones behind it are white. You can see this done in the image below.
[URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/CreateMask.jpg"][IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/thumb/CreateMask.jpg[/IMG][/URL]
Then, copy the z-pass into the layer's mask (learn more about them [URL="http://www.photoshopessentials.com/basics/layers/layer-masks/"]here[/URL]). This is demonstrated below.
[URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/UseMask.jpg"][IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/thumb/UseMask.jpg[/IMG][/URL]
Repeat this process for your elements, match the DOF, shit color correction and bloom and lens flares all over it, etc. Using the z-pass as a new tool allows you to accomplish many cool things in much less time. When you're done (and if you're organized) your image should look something like this:
[URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/TheRest.jpg"][IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/thumb/TheRest.jpg[/IMG][/URL]
Now, add any finishing touches (I like to merge all the layers and do some color-correction), and save your image. This works with the poster command by the way, now you can have 16k SDOF images.
[URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Final/1080p.jpg"][IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Final/720p.jpg[/IMG][/URL]
[URL="https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Final/1440p.jpg"]QHD[/URL] - [url=https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/Final/4k.jpg]4k[/url]
Question...
Where do I find a fog editor?
[B][I]edited[/I]
[/B]Wait I think I found one
Entities->Editors->Fog Editor
Hold down c, right click the editor when it spawns, select properties.
Even though I never edit: nice. It's well written and easy to follow along.
darn kids and their shortcuts
back in me day we had naught but our wits and ol' selection tool thingys
anyway this is cool, i have to try this when i get back in business
This is gonna be super useful, thanks so much.
I often give Winner tags to people around these parts, but this may be the most well-deserved one. Cheers for the tutorial! I'm looking forward to playing around with it when I have the time.
Wow thank you so much for this. Never though of recreating a depth map with fog, that's pretty ingenious.
you can also use fog for very precise greenscreening: just make the start/end point really sharp to isolate your objects and then use the thing you just created as a layer mask (after inverting it so that the fog is black and the objects white, of course)
I dont get it is this basically a method of greenscreening which also gives the picture depth or something? What exactly is the effect achieved by this?
The 'depth map' created by having closer objects lighter and further objects darker, allows photoshop to create artificial depth of field in a scientifically accurate way, instead of a person just going and blurring things with a quick filter.
The science is that there's a focal distance of the image, and the further away from that point objects are, the more blurry they will be. So having a greyscale gradient (the depth map) allows photoshop to accurately reproduce blur similar to how it would be if taken by a camera lens.
Really neat stuff.
[QUOTE=The Combine;43144841]I dont get it is this basically a method of greenscreening which also gives the picture depth or something? What exactly is the effect achieved by this?[/QUOTE]
This doesn't necessarily give the image anything on it's own, it's just a tool that allows you to edit the image faster and more accurately. It takes out a lot of guess work, and allows precise DOF in post, as well as easier compositing of effects (for example lighting an object on fire with a bush in the foreground - usually you'd have to cut out the bush manually to put the fire behind it, which takes a lot of time)
As an example, I was able to put "sneaky text" in the image [I]behind the foliage[/I] with about 1 minute of work.
[IMG]https://dl.dropboxusercontent.com/u/17239680/Facepunch/Photoshop Contests/ScreenshotEdits/Z-DepthTut/Tut/EaseExample.jpg[/IMG]
[editline]dicks[/editline]
Sorry, thought automerge still worked after 3 hours
This is really neat, too bad the Sticky was removed, would fit in there quite well!
[QUOTE=The Combine;43152896]This is really neat, too bad the Sticky was removed, would fit in there quite well![/QUOTE]
Yeah, it'd probably get added if I/others asked a mod. What I'd really like to see is people providing z-passes with their images in the edit my screenshot thread. I see so many beautiful pictures over there that I'd love to edit, but I just don't have the time. This method can literally shave hours off of isolating all the tiny elements of an image, and would make editing someone else's work much easier.
Sorry but How to paste the z-pass into base image's alpha channel ?
[QUOTE=ppabba;48744025]Sorry but How to paste the z-pass into base image's alpha channel ?[/QUOTE]- Copy the Z-pass image;
- Go to the Channels window in Photoshop;
- Click the Add Layer Mask button in the bottom of the window (it's the one with a rectangle that has a circle in it);
- Paste the Z-pass in the Alpha 1 layer.
I ain't even mad about the bump because, to be honest, I'd forgotten how easy the Z-pass method is. I think I'm gonna permanently adopt it for my comic making, should make some things much easier to do!
I thought I'd share a very simple method I discovered yesterday. I wanted to do a z-pass, but didn't remember how to do the layer masks etc so here's a super simple version of this.
Make the object you want to ultimately select as monotone as possible (white for example). I'm selecting the guy in mid here by having a high upclose fog and high contrast setting. Now put these layers on top of each other.
Select with the 'magic tool' (W button) by left clicking your object.
[IMG]http://www.wduwant.com/index_uploads/uploads/a427d6a.JPG[/IMG]
Now click on the original background and press CTRL+C and CTRL+V. This will select the outline on your original of that object and make a copy.
[IMG]http://www.wduwant.com/index_uploads/uploads/0fe10242f433.JPG[/IMG]
Now draw whatever you want on your original background.
[IMG]http://www.wduwant.com/index_uploads/uploads/4033332a8895.JPG[/IMG]
Done. Drunk Hunters being tipsy
[IMG]http://www.wduwant.com/index_uploads/uploads/2f764acc3a20.jpg[/IMG]
[QUOTE=Crazy Knife;48749206]I thought I'd share a very simple method I discovered yesterday. I wanted to do a z-pass, but didn't remember how to do the layer masks etc so here's a super simple version of this.
[/QUOTE]I can still see some jaggies on the end result though, as well as blurring in some parts. That's partly because you went with the Magic Tool, which always gives unsatisfactory results. Color Range probably would've been a better option, here.
How do I do the debug white material thing???
Equip the materials tool, then find the pure white material, click on all the objects in your scene to color them white?
[QUOTE=JadenTheRaven;49365660]How do I do the debug white material thing???[/QUOTE]
Probably should've included this at the time, here's a debug full-bright white material addon that'll appear in your materials tool.
[url]https://dl.dropboxusercontent.com/u/17239680/Facepunch/FullBrightWhite.rar[/url]
I thought I'd share that this z-pass method can also be used to make holograms/ add depth / make your pic three-dimensional like this: [url]https://facepunch.com/showthread.php?t=1498502[/url]
[QUOTE='[LOA] SonofBrim;49369663']Probably should've included this at the time, here's a debug full-bright white material addon that'll appear in your materials tool.
[url]https://dl.dropboxusercontent.com/u/17239680/Facepunch/FullBrightWhite.rar[/url][/QUOTE]
Oh thanks a lot man. I appreciate it. BTW do you know how to do that Light pass or Sun rays thing in this thread video? [url]https://facepunch.com/showthread.php?t=1502985[/url]
Here's a thread on [url=https://facepunch.com/showthread.php?t=1468526]lighting control in post[/url]. I'm not 100% sure which aspect of the image you're asking about, but this covers how to do complex lighting in screenshots.
Sorry, you need to Log In to post a reply to this thread.