Switching the UV set in the inspector

Node-based Shader Editor

Switching the UV set in the inspector

Postby riyusaki » Thu Aug 30, 2018 5:40 am

Hi! Please tell me, is it possible to somehow implement the ability to switch "UV Set" in Your editor? You have a node "Texture Coordinates" it is possible to switch between mapping channels, so it can be done in the node with the texture, but how to bring this switch to the inspector? In other words, next to each texture, I need a mapping switch that I can use to switch mapping channels directly from the material.
Thank you for Your product!
riyusaki
 
Posts: 4
Joined: Thu Aug 30, 2018 5:31 am

Re: Switching the UV set in the inspector

Postby Amplify_Borba » Thu Aug 30, 2018 8:57 am

Hello, thank you for getting in touch and for your support!

It's possible to achieve this through using the Static Switch node, however, do note that you'll be using up Keywords, which are limited to 256 per project, and about 60 of those are already being used internally.

I've set up a simple sample for your convenience:

Image

Each Texture Coordinates node will have a different UV Set selected, and you can change it through the Material Inspector if you have the 'Material Toggle' parameter 'Enabled' in the Static Switch node.

Image

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: Switching the UV set in the inspector

Postby riyusaki » Thu Aug 30, 2018 11:45 am

Thanks for the answer, I used this method, but the problem is that if you use multiple nodes "TextureCoordinates" then there is a need to create to each such node another node for "tiling" and "offset" because as soon as the "Texture Sample" is connected to the node "Texture Coordinates" then "tiling" and "offset" the "Textures Sample" stops working. Accordingly, for each layer we need to create a "tiling" and "Offset" , and because of the impossibility to use the same names, it all comes down to the creation of large arrays, for example : NormalMap_Tiling_uv1;NormalMap_Offset_uv1; etc. Maybe I missed something and this problem can be avoided? Thank you very much for your help.
Made here is such a scheme.
Attachments
Снимок-экрана-2018-08-30-в-15.13.39.jpg
Снимок-экрана-2018-08-30-в-15.13.39.jpg (77.07 KiB) Viewed 2633 times
riyusaki
 
Posts: 4
Joined: Thu Aug 30, 2018 5:31 am

Re: Switching the UV set in the inspector

Postby Amplify_Borba » Thu Aug 30, 2018 2:18 pm

No problem, happy to help!

Unfortunately, you can't achieve this type of control via the shader itself, in order to have a dynamic way of showing your parameters in the Material Inspector you'll have to develop your own Custom Shader GUI, which is outside of the scope of ASE.

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


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 12 guests