Community
Arnold GPU Forum
General discussions about GPU rendering with Arnold.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compsite alpha map

8 REPLIES 8
Reply
Message 1 of 9
bldpsnmlt
969 Views, 8 Replies

Compsite alpha map

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!

Labels (5)
8 REPLIES 8
Message 2 of 9
Stephen.Blair
in reply to: bldpsnmlt

In this example, aiColorCorrect is there for Alpha Is Luminance

4306-layer-rgba.jpg



// Stephen Blair
// Arnold Renderer Support
Message 3 of 9
bldpsnmlt
in reply to: bldpsnmlt

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.

Message 4 of 9
bldpsnmlt
in reply to: bldpsnmlt

Is there no way to accomplish that?

Message 5 of 9
madsd
in reply to: bldpsnmlt

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.

Message 6 of 9
xebajac
in reply to: madsd

Please explain more about starting your layer nodes from output8

Message 7 of 9
madsd
in reply to: xebajac

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.

Message 8 of 9
xebajac
in reply to: madsd

Oh ok thank you

Message 9 of 9
pproestos
in reply to: xebajac

You're the Holy Bible @Mads...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report