Author Topic: sbsbaker run [<options>...]? JSON?  (Read 2893 times)

Usage: (as specified in docs and from --help option:
Code: [Select]
sbsbaker [<global_option>...] run [<option>...] <inputs>...
The run command expects a JSON file as an argument that describes an execution plan. Is there any information, documentation or examples of how this works?

This is as far as I've gotten just guessing at the structure of the JSON file:

Code: [Select]
{
"inputs":"/home/lvxejay/desktop/mesh_file.fbx",
"output-format":"jpeg",
"output-name" : "testing_baker",
"output-path" : "/home/lvxejay/desktop/sbs_baker_test/"
}
   
When I run this from the command line, I get no output messages and no new processes on my computer. What is this JSON file supposed to look like?




Sorry for the lack of documentation there. The name of the availlable options can be automatically deduced from the list command line options (surrounded by "...": and without the -- prefix). As far as I can tell, you mostly got the syntax right in your example above but did not specify which baker you wanted to call to produce the output named "testing_baker".
An example :
 
Code: [Select]
{
"inputs":"/home/lvxejay/desktop/mesh_file.fbx",
"output-format":"jpeg",
"output-path" : "/home/lvxejay/desktop/sbs_baker_test/",
"default": {
"baker": "position",
"parameters": {
                        "output-name" : "testing_baker",
}
}
}

Another one, more complicated, calling two bakers with shared parameters and specific parameters:

Code: [Select]
{
"inputs": "/home/foo/designer/cube_low.FBX",
"output-format": "tga",
"tangent-space-plugin": "/home/foo/designer/libmikktspace.so",
"per-fragment-binormal": 1,
"name-suffix-low": "_low",
"name-suffix-high": "_high",

"output-size": { "width": 9, "height": 9 },
"uv-set": 0,
"dilation-width": 1,
"apply-diffusion": true,

"normal0": {
"baker": "normal-from-mesh",
"parameters": {
"highdef-mesh": "/home/foo/designer/cube_high.FBX",
"use-cage": false,
"max-frontal": 0.01,
"max-rear": 0.01,
"relative-to-bbox": true,
"average-normals": true,
"ignore-backface": true,
"match": 0,
"antialiasing": 0,
"map-type": 1,
"normal-invert": 0
}
},

"ambient-occlusion-from-mesh0": {
"baker": "ambient-occlusion-from-mesh",
"parameters": {
"highdef-mesh": "/home/foo/designer/cube_high.FBX",
"use-cage": false,
"max-frontal": 0.01,
"max-rear": 0.01,
"relative-to-bbox": true,
"average-normals": true,
"ignore-backface": true,
"match": 0,
"antialiasing": 0,
"nb-second-rays": 64,
"min-dist": 1.0e-05,
"max-dist": 0.1,
"max-dist-relative-scale": true,
"spread-angle": 180,
"ray-distrib": 1,
"ignore-backface-secondary": true,
"self-occlusion": 0,
"attenuation": 2,
"normal": "baker://normal0",
"normal-world-space": false,
"normal-format": 0
}
}
}
Last Edit: October 17, 2017, 03:11:14 pm

A JSON Schema would be immensly helpful in deciphering this :)