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

Is there a way to make an Integer into string?

Explorer ,
Nov 19, 2022 Nov 19, 2022

New to this...

 

I was trying to create a text using 5 digits of random numbers.

 

I looked for an hour or more and haven't found a way. Considering there are only two nodes for string in the Value Processor I'm begining to think it can't be done.

 

I wanted to make a text node. Make an Input Parameters with an integer set it at 10000 min and 99999 max and be done. But there no text (string) data so the node is blank.

I tried looking at what is possible in the Value Processor but only saw two nodes for String. And none of them were "To String".

I didn't see an obvious way to make a random number in the Value Processor. Still plenty of room for me to learn I guess. 

TOPICS
How to , Scripting , Substance Graph
634
Translate
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

Adobe Employee , Nov 21, 2022 Nov 21, 2022

Hello,

 

Unfortunately, there is no straightforward way to convert values into strings in function graphs. There are workarounds, depending on what you want to achieve:

 

If you wish to display a value in an image, you can use an atlas which includes all numbers and symbols you need, then use a Pixel Processor node to build an image of the number out of the atlas by compositing the numbers together.

 

Adobe_Substance_3D_Designer_K9I6q27W64.png

If you wish to set the string for the Text property of a Text node out of an integer value,

...
Translate
Adobe Employee ,
Nov 21, 2022 Nov 21, 2022
LATEST

Hello,

 

Unfortunately, there is no straightforward way to convert values into strings in function graphs. There are workarounds, depending on what you want to achieve:

 

If you wish to display a value in an image, you can use an atlas which includes all numbers and symbols you need, then use a Pixel Processor node to build an image of the number out of the atlas by compositing the numbers together.

 

Adobe_Substance_3D_Designer_K9I6q27W64.png

If you wish to set the string for the Text property of a Text node out of an integer value, you can use Designer's Python API to acquire the integer value, do the conversion in Python and pass the result to the Text node.

 

Best regards.

 

Luca Giarrizzo | Quality Engineer, 3D & Immersive | Adobe
Translate
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