DOF in post with glass, refraction and reflection problems

Discussions regarding Materials, Material-Compounds or Shaders, etc.
Kzin
Posts: 432
Joined: 09 Jun 2009, 09:36

Re: DOF in post with glass, refraction and reflection problems

Post by Kzin » 28 Oct 2012, 16:12

http://caffeineabuse.blogspot.co.at/2009/01/custom-depth-pass-in-xsi.html

use this shadersetup for all your non refract/reflect surfaces.
put the other surfaces in another partition with refract/reflect enabled an render this out. but i would create different refract and reflect framebuffer/passes to get more control because i am sure you use reflection with falloff. its better to have refract/reflect as seperate renderpasses to control these two effects individual.

aio
Posts: 36
Joined: 23 Oct 2012, 00:12

Re: DOF in post with glass, refraction and reflection problems

Post by aio » 29 Oct 2012, 08:51

Kzin wrote:http://caffeineabuse.blogspot.co.at/2009/01/custom-depth-pass-in-xsi.html

use this shadersetup for all your non refract/reflect surfaces.
put the other surfaces in another partition with refract/reflect enabled an render this out. but i would create different refract and reflect framebuffer/passes to get more control because i am sure you use reflection with falloff. its better to have refract/reflect as seperate renderpasses to control these two effects individual.
What would be the point of this? the surfaces will refract, reflect wrong values compared to the ray length ?!
For example a surface will reflect something that is in front of it and despite it's farther from the camera it will appear closer.

Something should be possible withe the scalar state node. but i'm not that skilled.

Kzin
Posts: 432
Joined: 09 Jun 2009, 09:36

Re: DOF in post with glass, refraction and reflection problems

Post by Kzin » 29 Oct 2012, 10:10

aio wrote:
Kzin wrote: For example a surface will reflect something that is in front of it and despite it's farther from the camera it will appear closer.
this is a custom depth pass. with the gradient you create a depth rendering of your scene like the depthpass do but its not a depth value, its a color value. you set your depthvalues in the change range node. means start and stop of the depth of your scene. when you now put in a sphere with refraction it refracts these colors of you custom gradient colors which is your depth. so i dont know how something should be closer when its further away. the refraction or reflection will refract or reflect the color values the object has in the scene based on your change range settings.