Lidar effect
Asked Answered
T

1

0

Im trying to create a lidar effect similar to this:

But I dont know how to approach the problem. To learn shaderscript is too daunting atm, so I prefer to work with the visual shader graph.
Im new to godot, any hint appreciated.

Tzar answered 22/2, 2024 at 12:36 Comment(0)
O
0

Tzar

  • calculate the world space vector from lidar origin to the pixel
  • calculate the inclination angle of this vector in respect to horizontal plane
  • multiply this angle with wanted line density and step its fractional part to get discrete lines

This should give you something close enough. For the full "shadow" effect you'll need put an omni light at lidar's origin and include a light() function in your shader that subtracts the shadow attenuation from the diffuse lighting.

Oeuvre answered 22/2, 2024 at 16:21 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.