I have studied the answers to @Duarte's question here, and can't get any of the driverless answers to work, either in recent 2.79, or 2.8.

This was after trying my own set-up with a 0-sized point/spot lamp, whose local coordinates are shown.

enter image description here

Using these nodes to shade the lamp..

enter image description here

The Incoming vector should be from the lamp to the lit point which fired the ray. Its X and Y should be the projection of the world onto a sphere around the lamp. To correct the spherical distortion,the vector is divided by [its own Z / some K], to find the X and Y of the incoming ray in the plane Z = K in whatever space we've chosen.

This works in World space. I had hoped that by using the Vector Transform node, we would evaluate 'Incoming' in the lamp's space, so when we rotated the lamp, the projected texture would rotate with the lamp around the world.. but it doesn't work:

enter image description here

when the lamp is rotated, the projected texture sticks to the world.

Have the fixes mentioned in the previous answers been 'unfixed'.. or am I missing something obvious? Can anyone make those answers work, or come up with another way to make a rotatable projector from a lamp, without using drivers, now?

  • 2
    $\begingroup$ I might have misunderstood something, but the setup using the Normal works for me, the texture rotates with the lamp. (i.stack.imgur.com/dINvL.jpg) $\endgroup$ – Robert Gützkow Aug 31 '19 at 18:29
  • 1
    $\begingroup$ @rjg Ahhh.. thank you! (Dooohhh) You haven't misunderstood anything. It's even dictated for that in the manual. I'd love to know what's wrong with my math, though. I've used 'Normal' or 'Incoming' from the Geometry node. In my slightly wonky mind, for a lamp, which is notionally a sphere, those should all be the same, if converted from World to Object space.That seems to be so, for a mesh-cube. Maybe there's something different about lamps? Trying again in the (GMT) morning.. $\endgroup$ – Robin Betts Aug 31 '19 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.