I was wondering if there is a way to use blender to project a grid unto a model and only keep the points that the projection collides with, basically I want to simulate a Time of flight sensor that emits a laser grid and receives the reflection of that laser which indicates the presense of an object and its distance, ideally slanted objects would reveive the laser but reflect it to a different direction and thus would not show up on the output of the sensor. Would this be doable using a python script? Anything that could set me on the right track would be appreciated.
1 Answers
Not a scripted solution, but you can achieve a similar effect using a particle system.
Create an emitter plane and a particle system. This will have all the particles emitted at frame start = end = 1.000 and a lifetime long enough for the collision.
Set the emission to grid and assign a velocity in the correct direction in the Emitter object box. Leave all the other options to their defaults (Newtonian physics with all the forces = 0) and in Field weights remove the effect of Gravity by setting gravity to 0.
Last, you would like to render the particles as lines. Select Line under Render, set Tail to zero and Head to some value between 0 and 1. Use a high trail count and set Length as long as your particles lifetime. Also, tick Length in frames.
Now, make sure that all the objects that you want to detect have a Collision property (with default values).
(Now you can also add another plane - as a "sensor" - behind the emitter and make it collide with the particles that are coming back, killing them. Then you can render the dead particles as dots on the sensor)
- 12,900
- 3
- 56
- 83

One more problem I ran into was when I try to apply this during an animation the particle reflection behave oddly, like they keep orinating from a point where the target no longer exists isnce it has moved.
http://recordit.co/CGb8sbpEdG
– Alla Jul 06 '17 at 12:38