Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

How to access vertex alpha in material

kilian.glomb
Participant

How to access vertex alpha in material

kilian.glomb
Participant
Participant

How do I access the vertex alpha in a material? It has to be the alpha channel because I additionally have to export the final mesh to another application. The "Vertex Color" node only gives me access to various channels and the RGB colors.

 

Best regards.

0 Likes
Reply
1,109 Views
10 Replies
Replies (10)

RGhost77
Advisor
Advisor

2023-03-25_12-21-41.pngYou can tweak "UVW Channel" OSL shader code to get it work with vertex alpha channel.
MAX uses negative value -2 of UVW to store vertex alpha color.

 


Royal Ghost | veda3d.com
0 Likes

kilian.glomb
Participant
Participant

Thank you for the response. for me the shader outputs just black.

i also hit compile.

 

kilianglomb_0-1679755168924.png

 

0 Likes

RGhost77
Advisor
Advisor

What renderer do you use?


Royal Ghost | veda3d.com
0 Likes

kilian.glomb
Participant
Participant

kilianglomb_0-1679757045824.png

 

0 Likes

kilian.glomb
Participant
Participant

Is it also possible to access the vertex colors with it? As far as i know they are stored in map channel 0 but it doesnt work with this shader. It would be very helpful to see directly the result of the vertex paint work without toggling explicitly the vertex colors but see the final result with texture blending etc. in the viewport.

0 Likes

kilian.glomb
Participant
Participant

I didn't know about OSL before and it is pretty handy and quick to write your own shader. I also found out that when I render with arnold the shader seems to work, also when I enable 'ActiveShade' with Arnold but that is absolutely unusable for working in the viewport because viewport rendering takes a few seconds everytime I do anything. I am using max 2022 and updated to the latest available arnold renderer (5.5.2.11). The problem is that the UVW -2 is always outputting black when not using the Active Shade, is there any workaround?

 

Here is standard viewport rendering.

kilianglomb_0-1679823958240.png

Here with 'ActiveShade' enabled

kilianglomb_1-1679823982497.png

 

0 Likes

CiroCardoso3v
Advisor
Advisor

You don't need to move to Active Shade for interactive rendering. Anrold has a Render View where you can work in Production Mode.

CiroCardoso3v_0-1680071904999.png

Probably when you move between modes there is a setting missing or something like that.

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

kilian.glomb
Participant
Participant

This is not what i need. I don't need to see accurately rendered images, I just want the default view with correct vertex alpha/colors applied. This render view takes a few seconds to render each image. Instant feedback to what you paint would be great, like here at 13:00, where vertex color/alpha data is correctly used in the viewport (without setting the object propties to shaded)

 

https://www.youtube.com/watch?v=86vm_m0_YbQ&ab_channel=PeytonVarney

0 Likes

CiroCardoso3v
Advisor
Advisor

Can you provide that geo above?

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

kilian.glomb
Participant
Participant

Hi, sorry for the delay.

I attached a simple scene. I used the UV Channel -2 solution as Base Color.

Best regards

0 Likes