If you want to composit layers, use the layer node. change nothing in it.
Work with PNG files with embeded alpha.
The layer shader works logic so in slot input1 we put out most top layer.
This is why you start by adding in from input8 in the bottom and build your stack up like you would in photoshop.
Remember to pipe the alpha channel to mix.
- Add UV Transform node on each layer to rotate, scale, and offset them individually.
- Set all bitmaps to "default" wrap mode, the bitmap loader comes in with "periodic" as default, this will just print a single bitmap instead of tiling it.
OFC, use a combination of Arnold and OSL nodes. UV transform and bitmaplook up node are OSL.
You mention you want to control fade in and out.
Add an add node and a float node, both OSL.
- Pipe them up on the alpha channel on the bitmap you want to fade in or out.
0.0 is fully opauge sprite.
- 1.0 is completly invisible ( read minus 1.0 )
Bottom example is 50% transparent sprite, set to -0.5. You can use a subtract node or whatever you prefer to flip it around 0 so 0 is bypass and 1.0 is completly invisible.
Alternativ to OSL route is:
- Legacy bitmap
- Arnold ADD node and USER_DATA_FLOAT node.
- Use an Arnold UV Transform instead of OSL, but put it INFRONT of the bitmap.
Note that now 1.0 is full sprite.
Note that the alpha is automatically getting picked up, as long as you pipe the bitmap to mix as well and in this case, with a small float bias to control visibility on the alpha.
If you end up using all 8 slots and need a 9th, you add a new empty layer node and pipe the old one to input8 and mix for this channel as well, and reconnect the new layer node to the main socket on the closure.
You now have more layers, that can go as deep as you like.