- Home /
Projectors Projecting both directions...
I have a problem with projectors projecting up and down (forwards and backwards).
The docs (http://unity3d.com/support/documentation/Components/class-Projector.html) say:
"When no Falloff Texture is used in the projector's Material, it can project both forward and backward, creating "double projection". To fix this, use an alpha-only Falloff texture that has a black leftmost pixel column."
I am, however, using a Falloff texture:
This is true whether I'm using Projector Multiply or Projector Additive:
It makes no difference if I'm using a perspective or orthographic projector:
Nor if I change the clipping planes:
Hints and suggestions?
I cannot reproduce this problem. Do you perhaps have multiple instances of your projector in the hierarchy?
I edited this to restore the images that were broken due to a tinygrab.com update.
I had the same problem: I'm trying to use texture projection for add some tattoos on one of my character. This ended in just pain: the texture is projected both in front and back my character. No matter the settings of the fallout texture. I tried with clamp, repeat, alpha from grayscale, no alpha, inverting the colors, using a texture with alpha-blending, a texture with just the first column black and the rest white, the inverse of the previous, removing mipmaps, adding mipmaps, removing or adding border mipmaps and any other mix of these. That damn texture shows both in front and backward my models. Also i tried with a primitive cube, the same. Is there a way to project only one side?
Answer by Mifuyne · Mar 23, 2011 at 08:31 PM
That's probably because your falloff texture isn't set to generate alpha from greyscale. Don't forget to set the wrap mode to clamp as well.
I know this is 4 months late, but I hope it helps anyone else that ran into this problem.
In the end it setting the falloff texture to generate alpha from greyscale. With a standard shadow projector, which I was modifying, if one were to generate an alpha from greyscale, it would break the shadow projection. The shadow projector uses the Projector$$anonymous$$ultiply shader. To get the red circle to show up, one needs to use the ProjectorAdditive shader, and I hadn't changed the alpha generation for the new projector.
I should say it was BOTH clamp and generate alpha from greyscale. Either one on it's own doesn't do the trick.
@Bunny83 I apologize. I'm not familiar with this system. I didn't even seen the "Add Comment" button, silly me. However if I wish to have an answer for this same question should I double post the question? Isn't better to bump? I've read the FAQ and there is nothing about scavenge and old post or did I miss something?
Also even if I wrote as a frustrated rage quitter I think I've put all the informations needed for investigate the problem. In short my problem is the same of Little Angel and I think we both tried to work with the textures but that is not the problem. Any clue or do I have to repost this question?
Answer by jwb21 · Jan 18, 2013 at 07:33 PM
I had the same problem. Increasing the size of the left black pixel band seemed to reduce the size of the backwards projection, but not eliminate it. And that also reduced the near limit of the projected image undesirably.
To fix it, turn off mip maps. In the texture settings, change Texture Type -> Advanced. Then uncheck "Generate Mip Maps".
Also, set Wrap Mode = Clamp.
I'm using Filter Mode = Point, but I don't notice a difference if I use Bilinear or Trilinear.
For my Falloff image, I'm using RGB 16pix tall by 1024pix wide image white image that has an alpha channel that is white except for a black 1-pixel wide band on the left side. (I imagine using an RGB no-alpha image with a black band on the left site, and setting "grayscale to alpha" would accomplish the same thing.)
@jwb21 Thanks for that tip, as this solved my problem where my projections in UNITY 5 using the Projector/Light shader were somehow leaking light onto surrounding objects.