PDA

View Full Version : Problems with Depth of Field (built in to camera settings)


milqman
07-19-2003, 04:38 AM
if you look at this render, you'll see some nasty aliasing... particularly around the left cow's left horn.

I'm using the camera's built in depth of field settings in Lightwave and even on Extreme Enhanced AA, they are still there.

How might I fix this aside from taking it into GIMP or Photoshop?


http://milkman.Christianmp3.org/hv-e-mc-c.jpg

Triple G
07-19-2003, 04:43 AM
That's why I rarely, if ever, do DOF within Lightwave. I don't own X-DOF, but if I did, I'd use that. Usually, I'll either render the elements separately and then blur them individually in post, or I'll render the whole frame/sequence out as RLA or RPF files and bring them into AE, where you can use the z-buffer to add your DOF.

I don't know if it'll help, or even if you're already using it, but you might try experimenting with LW's Digital Confusion to see if that makes it look any better.

milqman
07-19-2003, 04:45 AM
digital confusion utterly destroys my image.

Triple G
07-19-2003, 04:46 AM
Now that I look at your pic, you'd really be better off rendering the elements separately. The general rule of thumb that I use when deciding if I should do DOF in Lightwave or in post is that if I need to see DOF over the course of one object (i.e. one object which needs to be partly in and partly out of focus), I'll try to do it within LW. If one complete object needs to be in focus, and another separate object out of focus, then I'll do it in post.

milqman
07-19-2003, 04:56 AM
okay.... so how might i do this?

render the cows, ground, burgers once, then make a new render with the clouds and mcdonalds? and combine them in GIMP (its all i have) with a screen thing?

Triple G
07-19-2003, 05:23 AM
The easiest way is to just go into your spreadsheet editor and select everything that you don't want to show up in the render, and label them all "Unseen by Camera", "Unseen by Rays" and "Unseen by Alpha" (Also "Unseen by Fog", if you happen to be using fog in your scene). Do this for each element (not necessarily for every object...you could maybe do one for foreground objects, middle ground, and background for example) Save different versions of your scene file for each of the separated elements, then load up all your scene files in LWSN Controller (http://www.flay.com/GetDetail.cfm?ID=1081), let 'em render, and then composite them when you're done.

milqman
07-19-2003, 05:29 AM
i cant find this anywhere in the spreadsheet editor but i can find them in the item properties for each object...

edit: nevermind :)

milqman
07-19-2003, 05:20 PM
Argh. I'd get X-Dof but the only way I can get it is if they had an academic price for it... but they don't seem to be emailing me back.

milqman
07-19-2003, 06:03 PM
Ok when I render out all the different passes... actually I just did two, one for the left cow and then one for the rest (clouds, mcdonalds, burgers, fatcow)

For the render with the cow on the left, should the background be black?

Heres what I get when I put my two renders in to the GIMP, with the left cow with the black background layer on "Screen."

http://milkman.Christianmp3.org/p3.jpg

The left cow is realllly faint.

Rumors
07-19-2003, 06:16 PM
Don't screen the cow layer, but use the alpha you made and cut him out.

If you save your render out as a 32 bit TGA the alpha will be embedded. Just use that as a selection.

-Jeff

milqman
07-19-2003, 06:30 PM
ugh... this is all over my head. i don't know what "alpha" means. time to RTM

edit: actually I can't seem to find what "Alpha" means in the manual

edit again: what's the alpha channel?

Triple G
07-20-2003, 01:46 AM
The alpha channel is an extra channel (besides the normal R, G, and B) which contains black and white information. Where it's white, your object will show, and when composited, will block whatever's behind it. Where it's black, it's essentially "transparent", and will allow whatever's behind (underneath) it in your composite to show through.

When you're rendering, render to a format that is 32-bit (24-bit RGB, plus the 8-bit alpha channel). TGA32 is my favorite. When you composite them, keep your layer types set to normal, tell Gimp to use the alpha. Not sure exactly how, since I don't have Gimp, but in Photoshop, you'd basically use your alpha channel as a selection, then create a mask from that to block out everything that's black.

milqman
07-20-2003, 02:16 AM
well I found the alpha channel in gimp and i got the outline of my cow selected inside the alpha channel... it is as you said, a black and white image...

ugh, wish there were some gimp users on here cause i cant figure this out

adrencg
07-20-2003, 05:58 AM
Originally posted by milqman
if you look at this render, you'll see some nasty aliasing... particularly around the left cow's left horn.

I'm using the camera's built in depth of field settings in Lightwave and even on Extreme Enhanced AA, they are still there.

How might I fix this aside from taking it into GIMP or Photoshop?


http://milkman.Christianmp3.org/hv-e-mc-c.jpg

Besides an aliasing problem, did anyone else notice the other flaw in the picture?

COWS CAN"T POINT!!! other than that it looks good.


Mike

dzogchen
07-20-2003, 07:51 AM
Besides the anti-alias problem, what is the centre of focus in your pic? The cows, the burgers or Macdonald building? Everything seems like a blur. I dun understand why you say digital confusion destroy your pic. Did you turn off adaptive sampling? I think digital confusion works great even if it is not that fast. Here is a test render with digital confusion several months back with low aa.

adrencg
07-20-2003, 04:59 PM
Originally posted by dzogchen
Besides the anti-alias problem, what is the centre of focus in your pic? The cows, the burgers or Macdonald building? Everything seems like a blur. I dun understand why you say digital confusion destroy your pic. Did you turn off adaptive sampling? I think digital confusion works great even if it is not that fast. Here is a test render with digital confusion several months back with low aa.

I stopped using digital confunsion because of the same problems he's getting. There are also other issues, such as problems rendering with fog --- the scene needs to be pretty basic with no extra stuff thrown in.

If you want good DOF, just add a null, parent it to the camera(ParentinPlace off), go into DOF settings on camera panel. Turn focal distance down to 0 and hit the E button. Go to modifiers when the graph editor pops up and add Channel follower. Find your null and double click on z position. Make sure your display options show the focal ring in orthographic views. Now just set your focal null to where you need your focus to be(z axis only). animate it for rack focus shots. Turn the fstop up and down for bluriness amount.

The anti aliasing needed will not take much longer than Digital Confusion does and it will look nice...maybe not as smooth as DC, but at least you wont have headaches.

By the way, I set this up for every scene I render at my job -- and it takes no more than 30 seconds each time. An Lscript that does this would be nice. And remember you can preview the DOF using Shift f9 in OpenGL. The antialiasing level will show in the openGL...saves lots o time.

Mike

milqman
07-20-2003, 06:42 PM
The cows are supposed to be the focused object, however, I can't get this camera DOF to work right. Thanks though, adrencg, I'll definately try that.

Here's a test render with Digital Confusion for you, using the left cow as the focus object.

http://milkman.Christianmp3.org/messedupdc.jpg

milqman
07-21-2003, 02:57 AM
Alright, no matter WHERE i move my focal null, it NEVER changes my image. Something is wrong here. I did exactly what you said, adrencg.

jeremyhardin
08-05-2003, 08:11 AM
i had similiar probs and wrote an Lscript that simplifies it for me.

loads a scene with DOF already attached to null.
http://www.geocities.com/reverend_777

video tutorial for using script here:
http://www.geocities.com/reverend_777/irstut

hope this helps.

CGTalk Moderation
01-15-2006, 04:00 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.