Jump to content
Hash, Inc. Forums

What is this?


jason1025

Recommended Posts

  • Hash Fellow

Black caterpillars aside, that all looks uniformly blurred rather than blurred depending on distance. I have done a test somewhere here showing both DOFs working in their own way, but I don't know what your settings are.

 

 

Is the caterpillar a one frame thing? on every frame? Same spot in the frame every time? On the same spot in a model every the time? Moving on a spline in a model?

 

If I saw it in motion more would be known, possibly.

Link to comment
Share on other sites

Try rendering with Soften OFF in the Multipass settings.

It might also help to render separate foreground/background passes.

Also, before rendering an animation, always do a test run by rendering only every 100th (more or less, to suit your taste) frame. That doesn't always show all the rendering issues, but it will show enough of them to make it worth the trouble if you do a lot of rendering.

Link to comment
Share on other sites

  • Hash Fellow
Does this mean that depth of field does not actually work in AM?

As far as I am concerned A:M's depth of field has never been worth the render hit. You need so many passes and even then it never looks right.

 

 

I agree A:M's DOF is quite time consuming. If you are using a compositing app like Aftereffects, creating DOF via a depth map and appropriate blur filter will be much more flexible and quicker.

Link to comment
Share on other sites

How do you create depth maps? Is it generated by using open exr and buffers?

 

Yes, it can be created by that.

 

However you have level the resulting Depth-Map, because it is 16 or 32 bit and will show as a black image if you dont do that.

 

*Fuchur*

Link to comment
Share on other sites

How do you create depth maps? Is it generated by using open exr and buffers?

 

Yes, it can be created by that.

 

However you have level the resulting Depth-Map, because it is 16 or 32 bit and will show as a black image if you dont do that.

 

*Fuchur*

 

 

I don't understand, could you make a tutorial?

Link to comment
Share on other sites

How do you create depth maps? Is it generated by using open exr and buffers?

 

Yes, it can be created by that.

 

However you have level the resulting Depth-Map, because it is 16 or 32 bit and will show as a black image if you dont do that.

 

*Fuchur*

 

 

I don't understand, could you make a tutorial?

 

The way I make my depth maps is:

 

1: Turn on null shader in the camera plugin shader settings (for all of them)

2. Set fog color to white

3. Adjust fog to simulate where infinity focus (pure white) is and where close focus is (no white)

4. Set to 1 pass

5. Render!

 

It can be a pain sometimes to get the fog correct, but it does work for me.

 

As for the EXR I have never gotten a Depth buffer that wasnt pure black.

 

Photoman

Link to comment
Share on other sites

  • Hash Fellow
If using it for DOF, how would you use it to focus on something in the middle of the scene, leaving the near and far out of focus?

 

A proper compositing app interprets the values in the map as distance values and that drives the DOF blur filter to blur/not blur the range you specify.

 

Proper DOF simulation via a depth map will not work well with the typical blur filters in most apps (like Gaussian blur). A proper DOF blur filter understands that the blur of an out-of-focus background object should NOT overlap an in-focus middleground object and that the blur of an out-of-focus foreground object DOES overlap anything behind it and yet retains this sharpness of in-focus middle ground objects seen thru that blur.

Link to comment
Share on other sites

I'm still not understanding your explanation. How would you keep objects out of focus very close and very far away, with the middle in-focus? Fog will only give you very close focus and gradually going out of focus the further away the objects are from the camera (or the other way around).

Link to comment
Share on other sites

What program are you using the depmth map in to create the final image?

I'm just curious.

 

I've played a little with Gimp and Paint.Net. They don't, as Robert pointed out have a proper blur using a depth map. You can't choose the grey value for the infocus depth. So I understand your experimenting to move the white to the area you want to be in focus. But as he also points out, there are problems for some programs to not blur the in focus objects. Like the trees taht are at the same focal depth as your infocus rock. The truck near the ground is infocus, but as it gets thinner and is against the blurred backgournd, it ends up getting blurred. In theory, it should still have sharp edges except where something in the foreground passes in front of it.

 

Gimp seems to leave an unwanted edge on the out of focus objects (at least on my experiments).

Paint.Net (with the Blur map plugin) uses a grey scale (or alpha or RGB or ARGB or...) as a blur map with white being in focus and black being blurred. It seems to handle the sharp edges of the in focus objects against a blured background.

Link to comment
Share on other sites

  • Hash Fellow
I'm still not understanding your explanation. How would you keep objects out of focus very close and very far away, with the middle in-focus? Fog will only give you very close focus and gradually going out of focus the further away the objects are from the camera (or the other way around).

 

An exr depth map contains distance values from 0 to infinity (not values from 0 to 255). Where 0 is the camera lens and infinity is... infinity.

 

If you want to focus on a distance 100 cm away, 100 is added to subtracted from all values. The DOF blur algorithm then interprets all pixels with values

 

Pixels with values >0 are farther away and are blurred also but their blurs will be overlapped by pixels of objects that are nearer and less blurred.

 

I presume the DOF filters work by starting with the pixel that is farthest away, blurring that and storing that result on a layer, then moving to the next closest pixel and blurring that. By working from back to front the correct overlaps can be imaged. That's probably oversimplified.

 

The simple blurs in most image apps wont' be able to handle this. If you move your white zone to a mid round distance, they have no way of distinguishing the the gray zones in front and behind it for different treatment.

 

There are some situations in which a simple blur will give approximately correct results but it wont' work in all.

Link to comment
Share on other sites

Thanks Robert. The one thing I didn't understand was that you can select the color to be in focus.

 

Glenn, I'm using Gimp with the focus blur plugin, which you can't select the color for focus. I'll have to look at the paint.net.

 

The one issue with using fog is, hair with images. For my landscape scene, I can't remove the images for the leaves and foliage, I would have to covert all of them to white images. So fog is not an option for me. I'll keep experimenting to see if I can come up with an easy reusable solution.

Link to comment
Share on other sites

Thanks Robert. The one thing I didn't understand was that you can select the color to be in focus.

 

Glenn, I'm using Gimp with the focus blur plugin, which you can't select the color for focus. I'll have to look at the paint.net.

 

The one issue with using fog is, hair with images. For my landscape scene, I can't remove the images for the leaves and foliage, I would have to covert all of them to white images. So fog is not an option for me. I'll keep experimenting to see if I can come up with an easy reusable solution.

 

Use the null shader in camera plugin shaders. It worked for my scenes which had particle leafs (hair system) and particle grass.

 

Photoman

Link to comment
Share on other sites

Paint.Net (with the Blur map plugin) uses a grey scale (or alpha or RGB or ARGB or...) as a blur map with white being in focus and black being blurred. It seems to handle the sharp edges of the in focus objects against a blured background.

I can't seem to find the blur map plugin, can you give me a little help?

 

Never mind I found it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...