Compsite alpha map

bldpsnmlt
Advocate
Advocate

Compsite alpha map

bldpsnmlt
Advocate
Advocate

Hello wanted to know how to create composite maps with Arnold. Since now i created my materials with that, but looks like GPU not supporting legacy option.

Or what else do you use for Arnold that works like the composite maps. I´ll need that alpha mask method, that lets you project texture on top of other textures with transition...

Im pretty much a beginner to rendering and the jargon, so sorry for that.

Thank you in advance for any advice!

0 Likes
Reply
1,276 Views
8 Replies
Replies (8)

Stephen.Blair
Community Manager
Community Manager

In this example, aiColorCorrect is there for Alpha Is Luminance

4306-layer-rgba.jpg



// Stephen Blair
// Arnold Renderer Support
0 Likes

bldpsnmlt
Advocate
Advocate

4309-desktop-screenshot-20190808-16432689.png

This is what i have right now. My maps look different from yours, i should mention that i use Max.

What i want to achieve is to have a base texture on which i can indefinetly project additional textures.
For example projecting a lipstick texture on a face texture, of course with transition. The composite maps was ideal for that.

0 Likes

bldpsnmlt
Advocate
Advocate

Is there no way to accomplish that?

0 Likes

madsd
Advisor
Advisor

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.

4332-qwe.jpg

4334-qweqwe.jpg

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.

4335-aa.jpg

4336-aaaaa.jpg

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.

4337-qweqwe.jpg

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.

0 Likes

Anonymous
Not applicable

Please explain more about starting your layer nodes from output8

0 Likes

madsd
Advisor
Advisor

input8 is the bottom layer in the stack.
A background, the flowers in my example.
So dont look at the name "input5" for example, look at the nodes inputs as photoshop layers, you know, when you add a new layer, its always on top, the same applies here, if you look at it the opposit direction of the number flow. Just treat it visually and ignore the numbers.
Ideally input8 could be called "background" if we wrote an OSL shader that did the same thing, call the layer above it, layer 1, next one layer 2, whatever floats the boat.

0 Likes

Anonymous
Not applicable

Oh ok thank you

0 Likes

pproestos
Collaborator
Collaborator

You're the Holy Bible @Mads...

0 Likes