Skip to main content
Participant
Apr 5, 2023 5:25 PM UTC
Question

Custom output node that output Json files?

Hi, 

Is there a way I can create a custom output node that export json file? If so, is there any totorial on how to do this? 

 

apperciate any helps!

 

thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Cyril Dellenbach
Community Manager
Community Manager
Apr 6, 2023 9:55 AM UTC

Hello @MYU0207,

 

Thanks for the message.

 

Depending on what datas you wish to export, this is possible trough our Python API, but I'll need to know a bit more on your project to give you a proper help. What do you need to export?

 

Translate
Cyril Dellenbach (Micro) | Product Manager | Substance Painter
MYU0207Author
Participant
Apr 6, 2023 5:56 PM UTC

Hi Cyril,

Below is an example setup in Designer. I want to import couple images, make them tilable and export them out into a 'png' and with a 'json' file for each bitmap. For each json file, I will need to manually input value that reflects real world tile sizing (float) for each bitmap.( example below, I will need to have empty fields to input values)  . 

 

Translate
Cyril Dellenbach
Community Manager
Community Manager
Apr 11, 2023 4:02 PM UTC

Thanks for the clarification.

 

There isn't a simple way to export a physical size per images into JSON file, but I'd advise you to proceed as this:

 

  • Create a SBSAR out of a graph which makes any input bitmap tileable
  • Write a script that turns the physical size inputs into JSON files
  • In that same script, use the SBSRender tool to process your images using the SBSAR file
  • The final script could take a folder of images as input and export each image within and its corresponding JSON file side-by-side

 

With that being said, I am curious to know where the physical size value comes from. Is it a metadata from the picture?

 

Keep me posted,

 

Translate
Cyril Dellenbach (Micro) | Product Manager | Substance Painter