- Home /
Visual Artifacts with Projector
I'm using the projector to cast simple blob shadows, but I'm noticing strange artifacts coming from it. They rotate with the projector (which is parented to the character) so it's obviously coming from the projector. I'm using an orthographic projector and as you can see, it has a very small radius, whereas these artifacts are appearing way outside the radius.
You may need to view the image full size to see them properly. There is a thin black strip, like a tiny sector of a circle which is projecting out of the left side of the projector (although technically, it's the front, because the projector is facing left already ) and it runs between the red lines I've drawn to help point it out.
What is this? And how can I remove it? I've already tried playing with the projector settings and the near and far clip planes are already very, very generous. (IE: The near is high and the low is low so the ratio between them is very small. ) The radius makes no difference because they're already well outside that. The FOV, of course, is immaterial since I'm using an orthographic perspective. (If it satisfies anyone's curiosity, the problem is less noticeable with orthographic projection disabled, but it does still occur.)
Answer by Jaap Kreijkamp · Jan 31, 2010 at 12:33 AM
A few options that you could try:
- turn mipmaps off for the projector texture
- put floor plane (and all planes that need to have the shadow projected to) in separate layer and let projector only project on this layer.
The first option helps in that if the renderer uses a small mipmap for drawing a border pixel, the pixel isn't fully transparent in lower mipmaps (as they are averaged with pixels more centered). The second option helps in performance and that you don't risk wrong projections ending up on planes that don't ever need projections.
Depending on the terrain an alternative to projections is just have a plane with the blob a bit above floor level. That's how we do it for iphone at least and works quite satisfactory if the floor is flat.
The effect was happening on geometry which was intended to receive shadows too, it was just less noticeable, so separating layers wouldn't have helped. Disabling mipmaps did the trick though, and it's only a small texture, so I'm sure the performance cost will be very slight. Thanks for the quick and helpful solution.
$$anonymous$$ip maps also solved my problem. What I couldn't understand is that my aftifacts actually looked like the shadow of a completely separate texture in my scene. But either way the problem is now resolved. $$anonymous$$any Thanks
Answer by kamyflex · Nov 04, 2016 at 08:28 AM
Oh Mipmaps, Thanks bro :) and here is what is mipmaps for those who want to know : http://answers.unity3d.com/questions/441984/what-is-mip-maps-pictures.html
Your answer
Follow this Question
Related Questions
Projector displays tiled texture across entire scene 9 Answers
Can Unity bake lighting/mapping from a projector? 2 Answers
Projector projects through game objects 1 Answer
Runtime passages through objects 0 Answers
Projector on parts of terrain? 0 Answers