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

How to expose Scale within the Transformation 2D node

Community Beginner ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

Trying to expose the Scale with in the Transformation 2D Node, any help? 🙂

Thank you

Pina

TOPICS
How to

Views

1.3K

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 , May 24, 2023 May 24, 2023

Hi

You need to create a function to drive the scale matrix. To do that :

 

Add an input to your graph. I've called mine Scale Percentage and given it the identifier scale_percentage.

2023-05-24_20-39-18.jpg

 

In your transform 2D node at the top right of the transform matrix controls click and choose 'Empty Function'

 

Add the following function nodes to the function :

2023-05-24_20-42-26.jpg

In the Get Float node properties choose the scale_percentage input that you just created.

Right click the Scale Matrix node and click on 'Set as Outpu

...

Votes

Translate

Translate
Community Expert ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

Hi

You need to create a function to drive the scale matrix. To do that :

 

Add an input to your graph. I've called mine Scale Percentage and given it the identifier scale_percentage.

2023-05-24_20-39-18.jpg

 

In your transform 2D node at the top right of the transform matrix controls click and choose 'Empty Function'

 

Add the following function nodes to the function :

2023-05-24_20-42-26.jpg

In the Get Float node properties choose the scale_percentage input that you just created.

Right click the Scale Matrix node and click on 'Set as Output Node', it will turn yellow as in the screenshot above.

 

That is it. The exposed input you made will now control the scale.

Note : I have used just one control - if you want X and Y to be separate just add a second input and use two 'Get Float' nodes in the function graph.

 

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 ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

Thank you @davescm for the reply. when i do that 2 things happens..  my Transform node changes to this angle look and also the get float node connection is in red. i both tried set the scale matrix as out put and get float but didint change anything.

Screenshot 2023-05-24 125707.pngScreenshot 2023-05-24 125847.png

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 ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

also for some reason it asks me to choose float 4.

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 ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

In the first step I described , set the input as a Float (not Float2, Float3 or Float4). Remember at that stage you are merely adding a graph input it is not yet associated with the Transform Node. That comes later when you add the function.

In the function itself use Get Float (again not Get Float 2 , Get Float 3 or Get Float 4).

I've attached the sbs from above so you can see the exposed input and the function that uses it.

 

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 ,
May 25, 2023 May 25, 2023

Copy link to clipboard

Copied

Thank you! @davescm 

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 ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

Hey guys, maybe its a stupid question, but where I should add the "input" to my graph to be able to read this in functions?

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 ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

@piotro14533619  There are no stupid questions, asking is the way to find out things 🙂

To add an input parameter to a graph:
1. Click in a blank area of the graph, so that the Properties panel shows the parameters for the graph (rather than a single node).
2. Scroll down, in the properties panel, and you will see a section called Input Parameters. which has three tabs Parameters, Preview and Presets. You want Parameters.

3. Click the + symbol to add a new parameter

4. Open the reveal arrow to see your newly added parameter

5. Give it an identifier which is how you will refer to parameter when used within the graph (for example using a Get Float within a function

6. Give it a Label - This is the label that will be seen by the end user of your graph after it is published as an sbsar

7. Select a type - in the example above I used Float

8. Set how you want the input to look (by default it is a slider)

9. Set the Default, minimum and maximum values as well as the step which decides on moving a slider how large a step is taken.

 

That is it. Your input parameter is now available to be used by functions in your graph

 

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 ,
Nov 18, 2024 Nov 18, 2024

Copy link to clipboard

Copied

Many thanks! It works! I even did the control over 2 axis in scale. But is there any way to have additional control over the global scale + those 2 independent axisScreenshot_16.png? From this function I can only have the one output right?

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 ,
Nov 19, 2024 Nov 19, 2024

Copy link to clipboard

Copied

Add a third input for global scale and multiply it by each of the other inputs before they go into the Vector Float 2

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 ,
Nov 20, 2024 Nov 20, 2024

Copy link to clipboard

Copied

LATEST

Many thanks Dave! it really works!!

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