Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


How to make the function for Crop Area of Blend node?

Community Beginner ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

Hi everyone, I have a question about working with a function in the Blend node. I created a flower pattern tile material that has 8 limbs by default. In the parameters for the user, I made the function of replacing the number of limbs by 4 in the form "+" and in the form "x". Screenshots are attached.

Nikita5FDF_2-1626092228892.jpeg

8 sides

Nikita5FDF_4-1626092286149.jpeg

4 sides "+" form

Nikita5FDF_5-1626092308146.jpeg

4 sides "x" form

In general, it looks like this. (By default, my tile is 4x4)

Nikita5FDF_6-1626092587607.jpeg

8 sides

Nikita5FDF_7-1626092609670.jpeg

4 sides "+" form
In short, I exposed the Multi Switch Grayscale parameter and enabled it to work. Everything works great.
But the problem is different, I decided to go further and allow the user to change the location of the flower shapes through a custom checker mask. Where the user can choose a flower with 8 limbs and 4 limbs at the same time through 1 tile.

Nikita5FDF_8-1626093841953.jpeg

I used the Checker 1 node, then through the Crop Grayscale I increased the mask hit area exactly where I want. This area has 4 options for (tile amounts 3x3, 4x4, 5x5 and less than 3x3). I also used for each option the Multi Switch Grayscale node and made a condition. For example: (if Tile Amount = 4, then use input 1 and so on, to each tile amount your input). So this one also works fine. Each number of Tile Amount parameter has own imput for checker mask

Nikita5FDF_9-1626094831518.jpeg

checker masks and switcher 

Nikita5FDF_0-1626095025122.jpeg

function graph, I exposed Input Selection in Multi Switch Grayscale

Nikita5FDF_1-1626095125657.jpeg
tile amount parameter, this is the pooled x, y amount function in the Tile Generator


And now the essence of the problem, I decided to go even further with the parameters with making a variation of the checker mask (mask in the center, mask at the edges, mask at the corners, and so on)

Nikita5FDF_2-1626095355688.jpeg

Since the Crop Grayscale was used only for one node and was copied three times for Multiswitch Grayscale I didn't want to make additional Crops for each Mask Variation and connect them with new Switches, then there would be a million nodes in the project. So I decided to optimize the work of other Mask Variations, through the manual crop in the Blend node. I started to make new function in Cropping Area.

So I used functions such as Float4. I thought that cropping area has 4 distinct values. (I remind that I should have 4 of them with the amount of variation of Tile Amount. And each Float4 connected to 4 inputs to Switch Float4 4 Inputs. As I understood in practice, Switch Float4 Values ​​start from 0 numeric, that is, Value1 = 0, Value2 = 1, and so on. Since my custom Tile Amount has a maximum value of 5 and Swtich Float4 4 Inputs has only 4 values ​​where 4 value = 3, then I created a formula when my Tile Amount (get integer) minus 3.  In theory everything should work perfectly but does not work or work incorrectly. Why, can anyone help, who is well versed in the functions and explain how to work with Switch Float and how to make the Cropping Area in Blend node function working at all?

Thank you in advance, I am constantly online and I will check my topic all the time, if you have any questions please write, I will try to answer right away.

 

 

TOPICS
How to, Scripting, Substance Graph

Views

6.5K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 12, 2021 Jul 12, 2021

Copy link to clipboard

Copied

Additional screen about function graph of Cropping Area in Blend node

Nikita5FDF_0-1626118189998.jpeg

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

LATEST

Hello,

 

Thank you for the detailed post!

I can take a look at your Substance 3D file (SBS) to investigate the issue with less latency and better accuracy, then get back to you with a fix if I can find one.

 

If you are concerned with sharing files publicly, feel free to send it out to me as a direct message.

 

Best regards.

 

Luca Giarrizzo
QA Analyst
Substance 3D Designer

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines