How do I force an object or surface attribute to have a specific alpha value?

How do I force an object or surface attribute to have a specific alpha value?

Anonymous
Not applicable
2,888 Views
7 Replies
Message 1 of 8

How do I force an object or surface attribute to have a specific alpha value?

Anonymous
Not applicable

I'm in the process of learning Maya having come from Lightwave, so I'm looking for a similar feature that I have used frequently but can't find it in Maya.  Basically I want to force certain objects (or surfaces) to have a fixed alpha value of my choosing (i.e all values between black and white), irrespective of transparency so that after the RGBA image is rendered and saved, it provides an easy way to select or composite these areas in post.  

 

Any help would be appreciated

0 Likes
Accepted solutions (1)
2,889 Views
7 Replies
Replies (7)
Message 2 of 8

sean.heasley
Alumni
Alumni

Hi @Anonymous and welcome to the community!

 

I believe the easiest way to do this would be to create a new material and give it the alpha value you desire. That way you can assign the same material to any objects you want.

 

To do this:

  • Right Click Hold an object and select "Assign New Material"
  • Assign a material (Lambert, Phong etc.)
  • Under the Transparency tab you can either control the alpha via a number value or create an alpha texture in Photoshop
  • Assign this new material to the desired objects.

 

Please let me know if this helps or if you need any more assistance!

 

 

If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

 

Kudos are greatly appreciated. Everyone likes a thumbs up!

0 Likes
Message 3 of 8

Anonymous
Not applicable

Thanks for your reply   ..but it's not quite what I'm after. 

 

I realise that a transparency on the surface material would automatically make it see through to the background (which has an alpha value of 0), so yes, the alpha channel of the rendered image would have an alpha value between 0 and 255 depending on the the amount of transparency,   ...but on this occasion I don't want the object to have any transparency, as I need it to be completely visible in the beauty pass.  I just want it's alpha channel (of the floor in this particular case) to have an alpha value of 0, as though it were 100% transparent but without there being any actual transparency in the beauty pass. 

 

In Lightwave there's a simple dropdown for each surface material allowing you to choose how the alpha is used.  The default is surface opacity (i.e alpha channel is dictated by it's own transparency), as per your suggestion.  The second option is to overide this and give it a specific alpha value between 0 and 255 (but this does NOT make it transparent in the beauty pass), and the third option is for the shadows to dictate the alpha values (like the Hold-out in Maya). 

 

It's this second option that I'm trying to find in Maya.

 

Hope that makes sense

0 Likes
Message 4 of 8

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Hmm ok let me make sure I'm understanding this correctly.

 

You want to be able to give the floor an alpha value between 0 and 255 in the viewport but when you render it will appear with no transparancy right?

0 Likes
Message 5 of 8

Anonymous
Not applicable

It doesn't really matter how it appears in the viewport, but basically i want to be able to control (or override) the alpha values of certain objects or surfaces without using transparancy.  I guess the easiest way of illustrating this is with an image.  In this example I saved the render out of LW as a 32-bit tga.  When brought into Photoshop I will have the RGB channels shown in the first image here, complete with the floor, background and shadows (i.e no transparency)  ..but if you have a look at the second screenghrab you can see that the embedded alpha channel within this render shows the floor and background as completely black i.e an alpha value of 0. 

0 Likes
Message 6 of 8

mspeer
Consultant
Consultant

Hi!

 

I might be wrong, but is this what you are asking for not simply an ID Pass?

If yes, use AOV "ID" for this, if not please explain for what you need this functionality as i don't see any usage for this.

 

Edit:

You can also render individual "Alpha" Layers.

0 Likes
Message 7 of 8

Anonymous
Not applicable

Yes, an ID Pass or matte ID would provide a long-winded way of doing this, but the downside is that you have to a) render it out as a batch process, rather than a standard render b) it will save it as 2 separate image files instead of one    ..and c) would require bringing both into Photoshop, merging into 1 file, setting up a new alpha channel based on the specific selection needed from the ID pass.

 

My current workflow allows all the above processes ready to be used straight out of the rendered RGBA image, so I was hoping to find something similar in Maya 😞

 

In terms of how this functionality is used; A large part of my work involves providing high rez 3D renders of posed characters from popular animated TV shows and films to make up the style guides and assets given to, licencees, publishers and print houses to produce all the merchandise associated with the series whether it's wallpaper, bedspreads, books, games, lunchboxes etc.  Unfortunately in the print world, they are not conversant in complicated compositing and as such are only interested in having the final artwork with one alpha channel, which is a silhouette of the main character.  An ID pass that shows a different colour for every surface, whilst useful to me in other 3D projects, would be totally confusing to licensee clients.  The reason it's provided  like this and not a 32-bit png for example (where the alpha channel has already been applied) is because it enables the client to have a choice as to whether to use the floor 'as is' (with grounding shadows), or  cut it out using alpha channel, or use the alpha channel to cutout a foreground layer whilst using a blending mode on the un-alpha'd background layer to do a basic composite on to other graphics.  There are occasions where all 3 of these are used, so having all of them available in the one file, and one that is ready to send to the client as soon as it has rendered (i.e without even needing to bring it in to Photoshop myself), is a real time saver.

 

In a similar question, how would one go about rendering out a 33-bit png from Maya, where the floor and background are already pre-multiplied as an embedded alpha?  So basically having the floor unseen by the camera at render time, but included in all GI and ray-tracing calculations?  From what I can see it seems that hiding the floor object will exclude it from all these calculations, thereby making it invisible in reflections, invisible to GI and allowing light from the environment light to be contributing in an upwards direction from below the character, where previously it would have been occluded by the floor layer   ..essentially making the render look very different in a very undesirable way.  It follows that making the floor transparent would have the same effect.  In Lightwave we have a simple 'unseen by camera but not from from GI and ray-tracing' tick-box.  Any suggestions?

 

Cheers for all your replies so far 🙂

0 Likes
Message 8 of 8

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

In short, you have a scene with some objects and although all should be rendered you want to specify which appears in alpha channel and which not and want to render this out as one single rgba image.

 

This sounds like a renderer dependent feature. I don't think you can do this in Maya, at least not with Arnold. All render options are set up with compositing in mind.

Maybe someone else has a solution for this.

0 Likes