Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Depth Fade

Is it possible to control the depth fade if used as an alpha in a lerp via camera vector rather than its initial default. I have tried and failed or I am not implementing it correctly. Any advice would be muchly appreciated. My material itself looks fine from the ground stationary but moving certain ways makes the depth fade move to unwanted results. Ive tried using a scene depth and pixel depth in the material as well. Not sure if I am getting closer to the result i want.

Product Version: Not Selected
more ▼

asked Jul 14 '14 at 10:49 AM in Rendering

avatar image

68 5 8 82

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I think I know what you are talking about. I had this problem working on the imulsion material for gears 1. I was using depth fade as the texture coordinate of a gradient texture for where the pool intersected the ground. In order to make the gradient wider, I made the slope of geometry under the translucency fairly flat.

Initially, the thickness of the band fluctuated way too much based on viewing angle. At first I considered it an artifact but it is just due to how the ray of intersection travels much further at glancing angles when the two planes in question are parallel.

I refer to the correction below as "perspective corrected depth fade" as you will be counteracting that long ray at glancing angles.

Basically you do a dot product of the camera vector and vertex normal, and either clamp or constantbiasscale that into the 0-1 range and use it to lerp between two different depths, each a scalar parameter. You will have to fiddle with the numbers a bit as this isn't perfect.

more ▼

answered Jul 15 '14 at 07:55 AM

avatar image

2k 56 24 118

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question