Paint sharp rectangular stroke on object/shader


I have a scanner orbiting around a sphere. The scanner shoots a ray in form of a pyramid at the sphere and where the ray hits the sphere I want to paint a stroke on the object. I would need a shader solution since I want to create a mask for composinting and I might have bump and displ later on.

Here is an animation that basically does what I want I just need the c4d version of it (minnute 1:37 -1:50)

I tried the proximal shader with the tracer but the proximal shader does not give me sharp edges.
Second was a shader plugin but it renders very slow in high quality:

Do you guys know of a way painting a dynamic stroke like this in a c4d shader?



Maybe not the easiest approach, but …
I used a boole for the red poly loop and a plane for the ray.
I used a cube to boole the poly strip with it’s axis set to 000, then rotate the cube.


Hi David,
thank you for chiming in. The problem is that the scanner rotates 360 degrees around the object and has a consistent beam width at every point. That is my problem at the moment. Please see the rays the satelites paint in the video I linked. And I would need a shader solution since I it has to work with bump and displacement maps and it also needs to have multiple strokes overlapping each other.

Thank you!


You could animate the slice of a tube with a cloner and random effector …
nesting multiple tubes under the cloner



If those scanned areasare going to be long stripes running around the globe like those seen
in the clip you attached, and they are going to serve as mask for
future post …you could use just Sweeps with animated End Growth.
Scanners end point would be constrained to it.