Jump to content

Distance controlled transparency


photo

Recommended Posts

Hello,

Is it possible to have an alpha-blended material whose transparency multiplier/transparency pow are controlled by the distance to the camera?

  • Can we write an expression in the surface material parameters with the camera distance as an input?
  • Or should I go with a new shader? (but how to get the eye distance?)

(note: this is for a loooong cable material. I tried using the LOD fade but the result is not convincing, the transparency+wire inflation turns out really better in the distance)

Thanks!

Edited by Amerio.Stephane
Link to comment

Hi Silent,

I already though about this, but I fear this could be too costly (not tested, though). I have more than 10.000 cables. Won't adding a component/update for each of them be too much?

(I'll try, nothing beats manual timing in the end)

Thanks!

Link to comment

Sounds like some fragment-shader-based approach could both provide muuch better quality (per-pixel distance fade) and performance (batching 10000 instances using same cable material into much fewer batches)

Link to comment
×
×
  • Create New...