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.
Lidar effect
Asked Answered
- 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.
© 2022 - 2025 — McMap. All rights reserved.