DOF help

Started by cyphyr, November 12, 2009, 02:34:34 PM

Previous topic - Next topic

cyphyr

Hi gang :)
I'm trying to add some DOF to an image I recently made following the dof tutorial om the nwda site and I'm running into some issues. I've kept the camera settings the same (disabled shadows, atmosphere and lights) and replaced the colour channel with a distance shader. The results I'm getting are just plain weird and I'm stumped for a reason.
Attached images.
cheers
Richard

ps the tree line has actually been disabled as I only need the dof info for the foreground, they would render black anyway.
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

littlecannon

Sorry.... I have no idea. Doesn't look quite right though, does it? ???
I just need to tweak that texture a bit more...

RArcher

Really tough to say what is going on without a project file, or at least some node network screenshots of how you have the distance shaders set up.

cyphyr

With all the objects in there it would be impossible to upload the entire project file (and they're partly XFrog defaults). I'll upload the tgd file sans the objects, you should still get an idea of whats going on.
The distance shader is the only shader on the coloured surfaces tab (theres a displacement for the mound) All the objects are shaded in the same way to the same shader (assign shader).
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

RArcher

I can't really test this to make sure it works with your scene, but try changing the distance shader in your objects to be before the multishader/partsshader and not a specific node for each part on your object.

Here is an example scene that should show you where I put the distance shader for objects.

RArcher

A bit more info about why your scene is turning out funny.  When you set the distance shader as individual parts of the objects it screws up their geometry by ignoring the masks that they normally use.  Attached are a couple images, one with the file I uploaded and another with the way you had it set up in your file.  As you can see the tree loses the opacity mask information and the leaves render as simple polygons.

cyphyr

#6
OK I figured it was something along these lines. So where would you put the distance shader so as to include the alpha masks. Thats what I've been trying to do. ALso this dont explain stuff showing up where there is no geometry! The sphere about the hilt of the sword for example.
cheers
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

dandelO

I say you should just wait on the next TG release, Richard... ;)

Kadri

Quote from: dandelO on November 12, 2009, 03:58:59 PM
I say you should just wait on the next TG release, Richard... ;)

::)

(sometimes i love this smileys more then ever)

;D

cyphyr

You saying that it cant be done in the current release and that this is a known bug that has/will be fixed in the next release?
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Mandrake

You don't have the Reverse PR thing enabled right?

RArcher

Richard,

Simply put the distance shader before the parts shader or multishader.  I don't think there are any bugs at work here.  See attached picture for further clarification.

dandelO

Quote from: cyphyr on November 12, 2009, 04:15:24 PM
You saying that it cant be done in the current release and that this is a known bug that has/will be fixed in the next release?
Richard

No, I'm not saying it can't be done in this release, it clearly can with TU's method.
Just that I noted in some posts a little time back here that were to include DOF in the camera settings for the next release. No more messing around with distance shaders. I'm pretty sure that's what I read.

Henry Blewer

I seem to remember that Jo, or Oshyan said that DOF may not be in the next release. But I could be wrong... It might be difficult to implement. Maybe that's why they are re-writing the renderer.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

dandelO

I might be mixed up, I'm half-sure it was posted here, though. I remember being excited.

You know how people tend to run with things and remake them in their own fashion, though, maybe I've just done that. Sorry if that's the case. :D