I have a character with a hologram effect by using the Layer Weight node.

enter image description here

The file won't upload so here's an image:

enter image description here

So when the Layer Weight node is connected in the Factor of the Mix Shader, the two inputs of the Mix shader are blended in a way that whatever is in the first input, it will be shown on the normals of the character that are more facing the camera (Emission and Transparent shader, in my example). I’m using a similar material with a gradient texture, its just that the polygons (with the "Lines" Attribute) that are more facing the camera are mixed with transparency and the other once with Emission. The normal map of the character is using a different UV layout/Attribute (this is more clear in the node setup of the file). But, is there a way for the lines to face the Global Z direction all the time even when I animate the character? Because the lines are likely to be animated to travel at the Z axis.

The texture for the lines - http://fc04.deviantart.net/fs71/i/2012/225/8/5/gradient_stock_01_by_gradient_textures-d5ayk4y.jpg

  • $\begingroup$ Why did you upload my node setup to your question? I'm confused.. $\endgroup$ – gandalf3 Dec 25 '14 at 21:09
  • $\begingroup$ gandalf3@ Oops, I wanted to upload my setup, sorry. Now its fine. $\endgroup$ – Vladimir Dec 25 '14 at 21:39


The simplest way to do this is by using Object coordinates plugged into a Vector transform node set to transform from Object space to World space:

enter image description here

This will preserve the texture's location relative to the object, so moving the object up and down in world space will keep the textured "glued" to it:

If you don't want this, then you can use the Z channel of the ray position:

enter image description here

This will keep the texture fixed in world space:

Watch the upward translation closely to spot the difference between the two methods.

Note that I tested these with a procedural texture, so I'm not 100% sure it will work with an image texture. I assumed that a procedural texture might suit your needs better anyway. Here's the setup I used:

enter image description here

  • $\begingroup$ gandalf3@ Thanks. In my setup for the lines (the gradient texture) I have a different UV layout used by an Attribute node and I can't choose "Object" coordinates (it does work strictly to your example). Is there some other way? $\endgroup$ – Vladimir Dec 25 '14 at 20:54
  • $\begingroup$ What happens when you try to use object coordinates? It should work.. If you must use UV coordinates you could probably do something with the UV project modifier. $\endgroup$ – gandalf3 Dec 25 '14 at 20:55
  • $\begingroup$ gandalf3@ Hey It worked. I made the "Lines" the default UV layout and all I need is to connect the "Texture coordinates"("Object") to the "Separate RGB" - pasteall.org/pic/81640 Thanks $\endgroup$ – Vladimir Dec 25 '14 at 21:12
  • $\begingroup$ @Vladimir Glad you got it working :) Note that without the vector transform node the lines will rotate and scale with the object. $\endgroup$ – gandalf3 Dec 25 '14 at 22:23
  • $\begingroup$ gandalf3@ This is very usefull, thanks :) $\endgroup$ – Vladimir Dec 26 '14 at 1:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.