Object Coordinates are broken in Eevee

I’m in the process of creating an Earth with lights that change depending on the rotation of the sun. Unfortunately, object mapping appears to be broken. I created a file to demonstrate the problem. Open it up, switch to rendered view using Cycles, and rotate the empty. You’ll see that the gradient texture rotates along with the empty, which is expected behaviour. Now switch to Eevee and try the same. It doesn’t work.

Thought I’d bring this to people’s attention as it’s kinda important.

Object-coords.blend (737.1 KB)

This is currently listed as a known limitation.
https://docs.blender.org/manual/en/dev/render/eevee/materials/nodes_support.html
Object coordinates is limited to object supporting material. Custom Object is not supported.

This is frustrating. All I want to do is have a texture (earth lights) display on the parts of a sphere that are not in direct sunlight. I’ve tried drivers, and they break at seemingly random intervals, and I’ve tried this, which flat out doesn’t work.

If anyone has a solution, I’d really love to hear it.

Nevermind. Found an ingenious solution on YouTube.

Mind sharing it? Was thinking to use Object Info > Location with a 1 unit translation to drive / stand in as rotation data.

Of course. I spent ages trying to figure out really elaborate workarounds when there was an annoyingly simple solution all along. Just one of the joys of being a 3d artist, I guess.

1 Like