Hello,
I saw the projector example, is very useful. I created a custom shader derived from this example. But I have two questions.
It is possible that the projection has a intensity attenuation by the distance like the light of a spotlight?
It is possible make that the projector only projects in the front side of the destination mesh?
Thanks
Projector questions
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Projector questions
Hello, the Falloff Texture is already responsible for attenuation of the projection, and you can further modify this node setup and / or change the texture in order to get a different or more noticeable effect:

The other question is quite tricky, and the following solution is not very elegant and might not work for all situations:


We've tweaked the ProjectLight sample shader in order to limit the projected area, which seems to be working decently for the standard sphere, and further increases the complexity of the shader. It would be a complicated endeavor to figure out how to achieve a correct display for all types of meshes, but it might just be possible.

The other question is quite tricky, and the following solution is not very elegant and might not work for all situations:


We've tweaked the ProjectLight sample shader in order to limit the projected area, which seems to be working decently for the standard sphere, and further increases the complexity of the shader. It would be a complicated endeavor to figure out how to achieve a correct display for all types of meshes, but it might just be possible.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Projector questions
Hello,
Many thanks for the quick response. All the test that I made with this solution are good.
Also I will try other approach.
Many thanks for the quick response. All the test that I made with this solution are good.
Also I will try other approach.
Re: Projector questions
Hello,
I tried various approach to get the backface culling but your approach is better for now.
The result is nice with all the meshes that I test.
Now I am trying to make that objects nearest to projector culls the projection on the objects farest to projector.
This image illustrates the problem. The brown cube does not occlude the projection in the grey plane.

Thanks
I tried various approach to get the backface culling but your approach is better for now.
The result is nice with all the meshes that I test.
Now I am trying to make that objects nearest to projector culls the projection on the objects farest to projector.
This image illustrates the problem. The brown cube does not occlude the projection in the grey plane.

Thanks
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Projector questions
I'm afraid that won't be possible through a shader, at least not to my knowledge.
As it states in the documentation, "A Projector allows you to project a Material onto all objects that intersect its frustum.", so you'd have to either adjust its far clipping plane so that the frustum won't intersect with unintended geometry, or alternatively use the Ignore Layers parameter and set the geometry you don't want to be affected in an ignored layer.
As it states in the documentation, "A Projector allows you to project a Material onto all objects that intersect its frustum.", so you'd have to either adjust its far clipping plane so that the frustum won't intersect with unintended geometry, or alternatively use the Ignore Layers parameter and set the geometry you don't want to be affected in an ignored layer.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Projector questions
I think the same. I reviewed the source code of Projector component to understand how works but the code is incomplete. I is a shame.
Thanks for all.
Thanks for all.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Projector questions
No problem, please don't hesitate to get back in touch if you come across any further issues or questions!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!