- Home /
How does the unity projector work ?
Hi!
I try to create my own mask for the projector. However, I have some difficulties of understanding of how it works. Let me tell you how to reproduce the picture that make me confusing:
Create a cube or capsule.
Create an empty gameobject and make it to be the child of the cube
Add projector component to the empty gameobject
Add your material to the projector ( I have a black circle with a white background) and don't forget to make texture to have wrap mode Clamp.
So.. if you did all thing as I had, you probably will see a large texture over the terrain. If you inverse your texture all will be OK. As far as I understood my mask wasn't correct. But what I really do not understand is why do I see the huge texture that is much bigger than the projection area ? Shouldn't it be limited by projection area ?
Thank you in advance.
P.S. To show you how big it is I'll provide you a screen:
Answer by grindhouse · Jul 23, 2014 at 04:03 PM
I assume you are not using the provided material (projector/light or projector/multiply) and it won't work that way.
see http://docs.unity3d.com/Manual/class-Projector.html
Projector allows you to project a Material onto all objects that intersect its frustum. The material must use a special type of shader for the projection effect to work correctly - see the projector prefabs in Unity’s standard assets for examples of how to use the supplied Projector/Light and Projector/Multiply shaders.*
Seems to me you are correct. I think I must learn about shaders to understand it correctly. The one thing I must say that I used multiply material and tried to create my own mask, but I couldn't understand how to create it. For example, could I create a mask that would be multi-colored ?
Your answer
Follow this Question
Related Questions
Possible bug with projector/s 1 Answer
Dot worldNormal with _Projector 'forward'? 1 Answer
Low intensity of projector in dark enviornments 0 Answers
Question regarding the blob shadow projector shader 0 Answers
Planar UV Mapping/Projectors 0 Answers