Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 12-06-2015 , 12:03 AM
SilverFeather's Avatar
Noober than noob
Join Date: Sep 2011
Posts: 520

How to keep specular with transparent background?

Hello everyone! Long time no see.
Can you help me with this problem, please?
The goal is to render this hourglass with the specular but also transparent background.

Edit: I got the wrong file first. See 2nd upload.
It should look like the one with black bg.

I have tried render passes, but they will also come with a black background instead of transparent. Is there any other way? I was thinking of chroma-keying it as a last resort but I can't figure out what program to use for it.

Attached Thumbnails

Last edited by SilverFeather; 12-06-2015 at 12:06 AM.
# 2 18-06-2015 , 11:34 PM
mtmckinley's Avatar
The Maya Mountain
Join Date: Aug 2002
Location: Seattle, WA
Posts: 8,245
I think you'll need to do render passes, such as a specular pass that you can layer on top of your diffuse pass, etc.

# 3 19-06-2015 , 10:46 PM
SilverFeather's Avatar
Noober than noob
Join Date: Sep 2011
Posts: 520

I think you'll need to do render passes, such as a specular pass that you can layer on top of your diffuse pass, etc.

I already did that, the problem is that it does not come with transparent background, it comes with a black background instead. The only way I can see this working somewhat is if I copy the hourglass' glass body, flatten the copy and then make it provide alpha from the glass' back, so that the specular can be seen while the bg is transparent.

# 4 20-06-2015 , 12:38 AM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
sometimes the transparency may only be visible via the alpha channel in this case...have you checked?

Jay

# 5 22-06-2015 , 02:12 PM
SilverFeather's Avatar
Noober than noob
Join Date: Sep 2011
Posts: 520

sometimes the transparency may only be visible via the alpha channel in this case...have you checked?

Jay

In the alpha channel I only see the hourglass' shape as white but the specular is in no way displayed as white in the alpha mode. When I've made a render pass export, this is what I ended up with. As you can see, there is no transparency in the specular render's background.
Then there's the diffuse PNG. Neither one has transparent background so if I were to combine these images, I'd still get a black background.

Attached Thumbnails

Last edited by SilverFeather; 22-06-2015 at 02:14 PM.
# 6 22-06-2015 , 04:49 PM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
As far as I know specular doesn't show in the pass. It's supposed to be composited with an add operation.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 7 22-06-2015 , 06:06 PM
SilverFeather's Avatar
Noober than noob
Join Date: Sep 2011
Posts: 520

As far as I know specular doesn't show in the pass. It's supposed to be composited with an add operation.

Yeah but how would I composite the specular? (what I meant by this is - I have tried all possible operations when overlaying the two files, I only end up with a faint rectangular background, which still does not keep transparency of the background to full). Does this mean I'd have to make a specular with something else? Also, this is my workaround for what I needed (see attachment). I've copied the glass, flattened it and added a yellowish color to it and set its transparency to act as alpha behind the glass. It's pretty close to what I wanted so I guess this will do for what I need it (a graphic in a power point presentation).

Attached Thumbnails

Last edited by SilverFeather; 22-06-2015 at 07:19 PM.
# 8 23-06-2015 , 05:29 AM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
can you zip up the scene and save it as an ma file please. It doesnt need any comp to get good glass its just a glass setting with an alpha, theres some things you can do I'll take a look....

Jay

# 9 23-06-2015 , 07:59 PM
SilverFeather's Avatar
Noober than noob
Join Date: Sep 2011
Posts: 520

can you zip up the scene and save it as an ma file please. It doesnt need any comp to get good glass its just a glass setting with an alpha, theres some things you can do I'll take a look....

Jay

Thank you. I have attached it to this post.

Attached Files
File Type: zip HG.zip (130.4 KB, 275 views)
# 10 24-06-2015 , 03:23 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
You could add the two layers, then use the alpha channel as a mask for all layers.


Imagination is more important than knowledge.
# 11 24-06-2015 , 06:16 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287

# 12 24-06-2015 , 07:45 PM
SilverFeather's Avatar
Noober than noob
Join Date: Sep 2011
Posts: 520

You could add the two layers, then use the alpha channel as a mask for all layers.

The alpha channel looks like this, so it does not cover the areas I'd like covered. Must be because my glass is made of a blinn with low transparency. The specular does not show where transparency is low unless there's something else with higher alpha behind it.
user added image

for starters heres my tutorial into creating glass.....that should get things kicked off nicely

https://simplymaya.com/autodesk-maya-...=164&sub_cat=0

Thank you, so I guess this means I can't just make glass using blinn or phong with transparency, I'd have to use dielectric material.
Although with dielectric I'm getting a different problem: the refraction index is tied to the specular. If I want 1.05 r.i. my specular is gone. When r.i. is higher than 1.6 (not the r.i. I need) the specular begins to appear, however it is weaker with a transparent background. The sand in the hourglass also gets darker the higher the r.i. gets.
user added image
user added image
Is it mandatory that I use NURBS with dielectric? Or do Polygon Primitives work too?


Last edited by SilverFeather; 24-06-2015 at 07:52 PM.
# 13 24-06-2015 , 10:05 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
glass refracts at 1.5 not 1.05

no you dont need to use a an MR shader with nurbs, you can use whatever you like it was a suggestion

J

# 14 24-06-2015 , 10:34 PM
SilverFeather's Avatar
Noober than noob
Join Date: Sep 2011
Posts: 520

glass refracts at 1.5 not 1.05

no you dont need to use a an MR shader with nurbs, you can use whatever you like it was a suggestion

J

In this hourglass' case I just needed a certain type of refraction so it would not morph the sand inside. If I try 1.5 the result is pretty weird. I mean look at how the refraction is on these real hourglasses:
user added image
user added image

This one might be CGI, not sure, but this is the type of refraction I want to have, and 1.05 looks good, if only it didn't take away the specular with it.
user added image

# 15 24-06-2015 , 11:54 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
The glass in the photos looks more like plastic/perspex, the refraction is occuring more at the bottle neck too

J

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads