• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sequence of ''if/else'' nodes (pls help)

Community Beginner ,
Sep 30, 2022 Sep 30, 2022

Copy link to clipboard

Copied

Hello! this if my first post on this community so pls be gentle ^^

Im trying to link the ''size'' variable of a shape node to the ''tile(x,y)'' variable of a tile generator node.

The tile generator it's clamped (1-4)

So i need a node tree like....

If tile number value is 1---- size value---- (0.68) 

If tile number value is 2---- size value---- (0.32) 

If tile number value is 3---- size value---- (0.2) 

If tile number value is 4---- size value---- (0.14) for example

But i dont find a simple way to do this

PLS HELP ME! ^^ 

Thx in advance!

TOPICS
General , How to , Substance Graph

Views

195

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

correct answers 1 Correct answer

Community Expert , Oct 01, 2022 Oct 01, 2022

In the example below I made a graph input called Tile (Integer, clamped at 1 to 4 step 1)

In the Tile Generator node I set the X amount and Y amount parameters to use that input.

In the shape node I added the function below for the size

2022-10-01_18-45-08.jpg

 

2022-10-01_18-46-44.jpg

 

I've attached the sbs

Dave

Votes

Translate

Translate
Community Expert ,
Oct 01, 2022 Oct 01, 2022

Copy link to clipboard

Copied

In the example below I made a graph input called Tile (Integer, clamped at 1 to 4 step 1)

In the Tile Generator node I set the X amount and Y amount parameters to use that input.

In the shape node I added the function below for the size

2022-10-01_18-45-08.jpg

 

2022-10-01_18-46-44.jpg

 

I've attached the sbs

Dave

Votes

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 ,
Oct 02, 2022 Oct 02, 2022

Copy link to clipboard

Copied

Hello Dave! this works like a charm! 

thank you so much!

Votes

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 Expert ,
Oct 02, 2022 Oct 02, 2022

Copy link to clipboard

Copied

When I saw your reply and looked again at my answer, I noticed an error and I've updated it slightly. I had left an unused node lying around and connected the last if/then/else differently to the others. Both versions work but this revised version may be easier to adapt and extend as required.

 

Dave

Votes

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 ,
Oct 02, 2022 Oct 02, 2022

Copy link to clipboard

Copied

LATEST

Thank you again Dave!

Votes

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