- Home /
Projector Fills Entire Projected Surface
I'm working in Unity 5.0.1. I'm trying to create project a simple circle under selected units in my game. The issue I'm having is that when I try to apply my projector, the projection of the texture is getting stretched to fill the entire surface of the ground layer I am trying to project onto, instead of just within the frustum defined in the projector settings.
I'm using a basic projector with the UI/Default Shader, and I'm fairly new to this so perhaps I'm making a simple mistake. Thanks for your help.
Answer by RevCosmosis · May 18, 2015 at 11:51 PM
I don't know if you're still looking for an answer, but I stumbled upon this while struggling to get my own projectors to work, so I'll share what I found.
Projectors use cookies for their materials. You'll want to set your projected material to something under Projector/Multiply (or Light, if you're projecting lights). Then, set your projected texture, and use a falloff if you want. There's a nice falloff texture provided in the Effects asset package that comes with Unity.
Now, the fun bit. Projected textures have to be set up in a really specific and strange way. First, make sure that all of the pixels on the border of your projected texture are pure white. These pixels will get stretched out to cover the entire surface, and pure white (when using projector/multiply) will have no effect.
Then, set your Texture Type to Advanced. You can mess around with the settings here, but you'll want to make sure that you un-check Generate Mip Maps. Mip maps are lower resolution versions of your texture that get used in cases where the full resolution version would be a performance waste. However, in our case, lower quality versions of the projected texture will often cause the shadow to bleed onto the edges of the image, and cause bleeding issues over the entire surface. You'll also want to set the Wrap Mode to Clamp.
From there, everything should be good to go.
I found that modifying the projector's clipping values (in the inspector) also helped to keep this "projector flooding" from happening.
Your answer
Follow this Question
Related Questions
Projector displays tiled texture across entire scene 9 Answers
Mirrors of a car? 1 Answer
Projector LookAt Player 2 Answers
Projector and (ignoring) layers 0 Answers
Spritesheet animation from a projector 0 Answers