Merge branch '5-add-non-square-textures-handling' into 'main'

Resolve "Add non-square textures handling"

Closes #5

See merge request yannk/textures-factory!6
This commit is contained in:
yannk 2021-12-30 10:17:58 +01:00
commit e6046518f1
7 changed files with 49 additions and 9 deletions

View file

@ -94,6 +94,12 @@ $(SBSAR_DIR)/%.sbsar: $(SBS_DIR)/%.sbs
echo "listitem :"$$listitem;\ echo "listitem :"$$listitem;\
mkdir --parents $(TEXTURESET_FOLDER);\ mkdir --parents $(TEXTURESET_FOLDER);\
echo $$listitem > $(TEXTURESET_FOLDER)/$$(basename -s .sbsar $@)_$$preset;\ echo $$listitem > $(TEXTURESET_FOLDER)/$$(basename -s .sbsar $@)_$$preset;\
$(SBSRENDER) render $@ --use-preset $$preset --output-name {inputGraphUrl}\_$$preset\_{outputNodeName} --set-value \$$outputsize@10,10# --output-path $(PNG1024_DIR); \ rendersize=$$(cat $(MATERIALLIST) | jq -r --arg folder "$${material}_$${preset}" '.[] | select(.name==$$folder) | .format') ;\
echo "DEBUG : MATERIALLIST : $(MATERIALLIST)" ;\
echo "DEBUG : material : "$$material ;\
echo "DEBUG : preset : "$$preset ;\
echo "DEBUG : material_preset : $${material}_$${preset}" ;\
echo "DEBUG : rendersize : "$$rendersize ;\
$(SBSRENDER) render $@ --use-preset $$preset --output-name {inputGraphUrl}\_$$preset\_{outputNodeName} --set-value \$$outputsize@$$rendersize# --output-path $(PNG1024_DIR); \
done;\ done;\

View file

@ -52,9 +52,10 @@ The path to the json file used to manage all the metadata linked to texturesets
### Configuration of the json file ### Configuration of the json file
- « `name` » is the mundane texture name - `name` is the mundane texture name
- « `description` » is the description of the texture - `description` is the description of the texture
- « `type` » is the subfolder name in `BLENDFILES_FOLDER` in the `local-config.mk` file the blender files used to generate the rpeviews are stored - `type` is the subfolder name in `BLENDFILES_FOLDER` in the `local-config.mk` file the blender files used to generate the rpeviews are stored
- « `destination_1024` » is the folders names list where to copy the generated textrues files in 1024x1024, it can be left with an empty field if non-relevant. - `format` is the format of the texture, square or rectangular, it must be either "10,10" for normal 1024x1024 files, "9,10" for 512x1024 and "10,9" for 1024x512
- « `destination_512` » is the folders names list where to copy the generated textrues files in 512x512, it can be left with an empty field if non-relevant. - `destination_1024` is the folders names list where to copy the generated textrues files in 1024x1024, it can be left with an empty field if non-relevant.
- « `destination_256` » is the folders names list where to copy the generated textrues files in 256x256, it can be left with an empty field if non-relevant. - `destination_512` is the folders names list where to copy the generated textrues files in 512x512, it can be left with an empty field if non-relevant.
- `destination_256` is the folders names list where to copy the generated textrues files in 256x256, it can be left with an empty field if non-relevant.

View file

@ -3,8 +3,27 @@
"name":"texture_factory_test_preset0", "name":"texture_factory_test_preset0",
"description":"Texture factory testing material", "description":"Texture factory testing material",
"type":"bhonr", "type":"bhonr",
"destination_1024":["build/export/project_A","build/export/project_B/1024"], "format":"10,10",
"destination_512":["build/export/project_B/512"], "destination_1024":["build/export/project_A"],
"destination_512":["build/export/project_B_512"],
"destination_256":[""] "destination_256":[""]
},
{
"name":"texture_factory_test2_preset0",
"description":"Texture factory testing material number 2",
"type":"bhonr",
"format":"10,9",
"destination_1024":["build/export/project_C"],
"destination_512":[""],
"destination_256":["build/export/project_D_256"]
},
{
"name":"texture_factory_test3_preset0",
"description":"Texture factory testing material number 3",
"type":"bhonr",
"format":"9,10",
"destination_1024":["build/export/project_E"],
"destination_512":["build/export/project_F_512"],
"destination_256":["build/export/project_G_256"]
} }
] ]

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
<sbspresets formatversion="1" count="1">
<sbspreset label="preset" pkgurl="pkg:///texture_factory_test2">
<presetinput value="1,1" uid="4294967295" type="1" identifier="$pixelsize"/>
<presetinput value="0" uid="4294967295" type="4" identifier="$randomseed"/>
</sbspreset>
</sbspresets>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
<sbspresets formatversion="1" count="1">
<sbspreset label="preset" pkgurl="pkg:///texture_factory_test3">
<presetinput value="1,1" uid="4294967295" type="1" identifier="$pixelsize"/>
<presetinput value="0" uid="4294967295" type="4" identifier="$randomseed"/>
</sbspreset>
</sbspresets>