Author Topic: Compiling multiple smaller images into one big  (Read 521 times)

I have made multiple different trims. All have the same width (2048px) but heigth resolution  may differ (32, 64, etc). I want to combine multiple of them into a single square texture, pixel correct. Is there an efficient way to do this non-destructively?

I tried to start with transform2D, but it is extremely tedious to adjust every single matrix and offset so it is pixel correct, as the offset and matrix all revolve around center of the image.

for understanding here a concept of the idea

The individual trims/border lines are multi use, they are different styles/materials. So whenever one material changes this catalog/atlas needs to be updated -> doing it destructively is out of question.
Last Edit: December 30, 2017, 09:23:49 pm

Interesting problem.

According to the substance docs, Substance has a global variable $size

Quote
$size (float2)

Returns the size of the current node (in pixels).

If used in the "Output Size" parameter (relative to input), returns the size on the previous node.

If might be a bit tricky to set up initially, but it should be possible to create a function that reads in the $size of each image in order, and offsets them by the right amount.

Please note that the documentation about sizes contains an error. For relative size the name variable is $sizelog (the documentation still refers to $sizelog2.

More here:
https://forum.allegorithmic.com/index.php/topic,17930.msg75363.html#msg75363