Author Topic: Detailed parameter information from batchtools  (Read 2589 times)

Hi, I'm just taking a quick look at the Substance batchtools and was wondering if it is possible to get detailed information about exposed parameters (default, min and max values basically) from "sbsrender info"? I'm basically looking at whether we can add some rudimentary controls to our material editor / compiler, that would allow us to tweak the graph and re-export the bitmaps without opening Substance itself.

Hi, I'm just taking a quick look at the Substance batchtools and was wondering if it is possible to get detailed information about exposed parameters (default, min and max values basically) from "sbsrender info"? I'm basically looking at whether we can add some rudimentary controls to our material editor / compiler, that would allow us to tweak the graph and re-export the bitmaps without opening Substance itself.

Hi,

Are you trying to see what parameters are available? You can run --help in the command line for the batch tools and it will show the available parameters.

Cheers,
Wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

I know that "sbsrender info graph.sbsar" gives me the available parameters and I've used "render --set-value param@value" to create new outputs with different values. But what I'm after is the min, max and default values of those params.

I know that "sbsrender info graph.sbsar" gives me the available parameters and I've used "render --set-value param@value" to create new outputs with different values. But what I'm after is the min, max and default values of those params.

Hi,

I'm sorry but at this time you can't get the min/max/default value using the batch tools. We have this ability listed in our feature improvement list for the batch tools. I don't have an ETA at this time, but we will add this functionality.

Cheers,
Wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Good to know its on the list though, thanks! :D

It's worth noting that .SBS are structured like XML so it's possible to traverse the file and get your information that way.

It might end up being too much of a hassle, but it's worth considering!

Here's an example of the structure it follows:
Code: [Select]
   <content>
      <graph>
         <identifier v="GRAPGHNAME" />
         <uid v="1231195520" />
         <attributes>
            <author v="" />
            <description v="" />
            <icon>
               <datalength v="37983" />
               <format v="png" />
               <strdata v="superlongstringhere" />
            </icon>
         </attributes>
         <paraminputs>
            <paraminput>
               <identifier v="Vegitation_density" />
               <uid v="1231904812" />
               <attributes>
                  <label v="Density" />
               </attributes>
               <type>
                  <value v="256" />
               </type>
               <defaultValue>
                  <constantValueFloat1>
                     <value v="0.62" />
                  </constantValueFloat1>
               </defaultValue>
               <defaultWidget>
                  <name v="slider" />
                  <options>
                     <option>
                        <name v="default" />
                        <value v="0.39" />
                     </option>
                     <option>
                        <name v="min" />
                        <value v="0" />
                     </option>
                     <option>
                        <name v="max" />
                        <value v="1" />
                     </option>
                     <option>
                        <name v="clamp" />
                        <value v="1" />
                     </option>
                     <option>
                        <name v="step" />
                        <value v="0.01" />
                     </option>
                  </options>
               </defaultWidget>
               <group v="Vegitation" />
               <visibleIf v="input[&quot;EnableVegitation&quot;]" />
            </paraminput>
         etc etc etc
           </paraminputs>
Staggart Creations
[ WebsiteTwitterUnity Connect ]

Yep, just looking for the easiest solution heh :D We're stuill in the earliest stages of integrating into our pipeline but it's good to know all the possibilities from the start.

Hi,

I'd just like to add that I'm also very interested in the same feature: min/max/default. Has anyone written an XML parser that reads them by any chance ? Or is there an ETA now on when it will be added in the BatchTools ?

Thank you !

Hi,

I'd just like to add that I'm also very interested in the same feature: min/max/default. Has anyone written an XML parser that reads them by any chance ? Or is there an ETA now on when it will be added in the BatchTools ?

Thank you !

I am actually working on one. The tool combs an entire Substance library, pulls important directly from the XML, and then creates a database text file. Eventually the tool will have a UI that allows you to edit these things. This is the current info I am pulling out of a Substance File that is specific to my workflow:

Code: [Select]
sbs_start
{'FILE PATH': 'DRIVE_LOC_HIDDEN/Metal_Steel_Light_Wear_01.sbs'}
{'LOCATION:': 'DRIVE_LOC_HIDDEN/Metal_Steel_Light_Wear_01'}
{'FILE NAME': 'Metal_Steel_Light_Wear_01.sbs', 'AUTHOR NAME': 'Matt Bard', 'FOLDER NAME': 'Metal_Steel_Light_Wear_01', 'GRAPH NAME': 'Metal_Steel_Light_Wear_01'}
{'RESOURCE FOLDERS': ['Source_Textures']}
{'GRAPH RESOURCES': ['../../../../Substance/Designer_functions/Bard_Normal_Overlay/Bard_Normal_Overlay.sbs']}
{'LOCAL RESOURCES': ['Source_Textures/Metal_Steel_Light_Wear_01_Detail_01.tif', 'Source_Textures/Metal_Steel_Light_Wear_01_Detail_02.tif', 'Source_Textures/Metal_Steel_Light_Wear_01_Detail_01_basecolor.tif', 'Source_Textures/Metal_Steel_Light_Wear_01_Detail_02_normal.tif', 'Source_Textures/Metal_Steel_Light_Wear_01_Detail_01.tif', 'Source_Textures/Metal_Steel_Light_Wear_01_Detail_01_normal.tif']}
{'EXTERNAL RESOURCES': []}
{'OUTPUTS': ['albedo', 'normal', 'roughness', 'specularF0', 'height', 'normal_dented']}
Input nodes and Graph resolution:
{'tile_old_rusty_metal_base_v02_norm': [2048, 2048], 'Metal_Steel_Light_Wear_01_Detail_01': [2048, 2048], 'GRAPH RESOLUTION': [2048, 2048], 'Metal_Steel_Light_Wear_01_Detail_02': [4096, 4096], 'diffuse': [2048, 2048]}
sbs_end

Its written in Python using the built in XML Library, wasn't to hard to setup.