Cutting out based of an object

Node-based Shader Editor

Cutting out based of an object

Postby finepointcgi » Thu Jan 18, 2018 9:28 pm

Hello,
I was wondering how you would go about cutting a hole in a wall based of an objects placement. I have tried many shaders and none of them display the hole in the shadow. What im asking for is basically a Boolean operation. Is it possible to get another object position and do this?

Here is a guide that shows what I want to do. I do not understand shader code so I don't even know where to begin to get this to happen in amplify.
http://www.strichnet.com/creating-a-cut ... d-windows/


Thank you for your help,

Mitch
finepointcgi
 
Posts: 3
Joined: Sun Nov 26, 2017 2:50 pm

Re: Cutting out based of an object

Postby Amplify_Borba » Fri Jan 19, 2018 2:35 pm

Hello finepointcgi, thank you for getting in touch!

You raised an interesting question regarding cutout shaders, I would recommend that you look into our SphereMask function, which may provide some insight on how to achieve a simple cutout effect which takes shadow information into account, also allowing you to define the Radius and World Space Position of the effect.

Being a Shader Function, you are free to edit and extend it according to your needs, so it's possible to add a fading effect to the cutout, for example, or even to change any of its already implemented inputs and outputs.

You can find it within the ASE package at AmplifyShaderEditor\Examples\Assets\ShaderFunctions\Official\SphereMask.

SphereMask.jpg
SphereMask.jpg (204.25 KiB) Viewed 1793 times


Please let me know if this helps, thanks!
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!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Cutting out based of an object

Postby finepointcgi » Fri Jan 19, 2018 5:17 pm

Thank you very much for the reply. It does help quite a bit. Is there a way to change it to a square? im not really sure of the math on it shader programming is very new to me.

Thanks,
Mitch
finepointcgi
 
Posts: 3
Joined: Sun Nov 26, 2017 2:50 pm

Re: Cutting out based of an object

Postby Amplify_Borba » Mon Jan 22, 2018 12:41 pm

finepointcgi wrote:Thank you very much for the reply. It does help quite a bit. Is there a way to change it to a square? im not really sure of the math on it shader programming is very new to me.

Thanks,
Mitch


No problem, we've set up a simple sample for a Box Mask, which includes a shader function that you may import into your shaders, for your convenience.

BoxMask.zip
(6.22 KiB) Downloaded 223 times


You may further edit the shader function if you require to extend if for any specific purpose.

Please let us know if this helps, thanks!
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!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 84 guests

cron