PDA

View Full Version : How do you add sticker to glass?



Bax33
05-02-2013, 09:29 AM
I know this has to be fairly simple, but at present, I am perplexed. I made a simple scene with a square window to represent a store front. I just want to put the word SALE on the window. I used nodes to make the glass. The texture layer for color uses an image that is all black except for the word SALE which is all white. A second layer, beneath the mask, is a color image of the word SALE. I've tried using a white background and black background on this second image and it makes no difference. I set opacity of the color image to 0% and then copied both layers and pasted them in Transparency as well. What is odd is that the word SALE is displayed on the glass in texture shaded mode in both layout and modeler, but not when I use VPR or render. Any suggestions? Thanks

djwaterman
05-02-2013, 10:03 AM
114056

This is the quickest way I know by using PNG or Tiff files. Although you can use an B&W alpha like your trying but this is simpler.

JoePoe
05-02-2013, 02:00 PM
An image grab of your setup would help. Until then....

1) when you say "I used nodes to make the glass" what do you mean? Dielectric Material node? Or are you trying to create the glass my manipulating all the other channels?
Or are you using a layer based setup in the node editor?.... You said "A second layer BENEATH the mask."

I've attached a strictly node only set up with materials.
The front of the glass is its own surface. It's exactly the same as the rest of the glass block (simple dielectric node) with the added sticker setup.
(I included the polygon side spot info to give the "sticker" a separate color on the backside. Don't know if you want/need that).
Also, the front glass material is double sided to get the shadow working.....not sure if there is a better way to do that. It does change the look of the refraction.

One simple thing to check is.... just because you have a black and white image doesn't mean there's an alpha with it. In that case use the LUMA output to go into opacity or transparency or alpha inputs. Which is what I've done below. :thumbsup:

Also: I'm sort of just getting the hang of nodes myself.... I'm sure there are many variations on how to do this. But this is what I came up with :)

EDIT...(FYI: the render below isn't the right one for the node setup. The back of the sticker is white and the refracted imagery in the side of the glass shows that on the correct render.)

JoePoe
05-02-2013, 02:37 PM
Of course, you could do it quick and dirty.
I'm assuming the window is a flat plane (you can do this with other shapes as well, especially with the new shrink-wrap, but flat makes it that much easier. )

Just place a polygon in front of your window (a micron or two) and knock your sign out of that. That way you don't have to tangle with trying to mix it into a node tree. Especially one dealing with glass. ))

JoePoe
05-02-2013, 04:31 PM
And here's the same setup this time using the same b&w image (which is driving the alpha of the material blend) as the bump input to the dielectric node (pumped way up).
So now is has a little sticker thickness. :hey:

DJW.... didn't even see that you posted a zip. Gotta check that out. :)

http://forums.newtek.com/attachment.php?attachmentid=114066&d=1367533770

XswampyX
05-02-2013, 05:46 PM
I think you want 3 different surfaces....

1. Plain Glass
2. The Sticker Front.
3. The Sticker Back.

Like so.

http://i465.photobucket.com/albums/rr16/xXswampyXx/Window_Sticker_Nodes_zps8a8ed1aa.jpg (http://s465.photobucket.com/user/xXswampyXx/media/Window_Sticker_Nodes_zps8a8ed1aa.jpg.html)

Danner
05-02-2013, 05:51 PM
Using another polygon in front of the glass using another surface with the image cut out by a black and white version of your sticker on the transparency channel is the simplest way, you could also use nodes if your image has alpha and plugh the alpha output into transparency. Having it being two surfaces gives you more flexibility, that way you can make the glass more or less reflective, specular and transparent independently of the sticker.

JoePoe
05-02-2013, 09:44 PM
Holy "[email protected]", I'm goin' head to head with swampy in the node editor. I can't believe I'm doing this. :D
(from Top Gun..... clip (http://www.youtube.com/watch?v=fC976fuQm4E) at 00:32 :))

The back side of my set up with an additional mixer node to mix (;D) front texture with the white of back.

edit: whoops forgot to add attachment.

http://forums.newtek.com/attachment.php?attachmentid=114070&d=1367553210

XswampyX
05-03-2013, 02:24 PM
Holy "[email protected]", I'm goin' head to head with swampy in the node editor. I can't believe I'm doing this. :D

I like to think were flying together. :D

You know the the make material node doesn't have any shading associated with it and that your surface will always be flat?

JoePoe
05-03-2013, 03:15 PM
I like to think were flying together. :D

You're right, you can be my wingman any time. :thumbsup: Okay, enough with Top Gun.....


You know the the make material node doesn't have any shading associated with it and that your surface will always be flat?

Ahhhh, I did NOT know that. You just probably saved me quite a bit of frustration down the road trying to get that to show up!
....But I can substitute in a Standard Material node in that position in the chain. :hey: ....... right?

XswampyX
05-03-2013, 03:19 PM
Yes you can.

JoePoe
05-03-2013, 03:21 PM
:boogiedow I think I'm finally learning how to think node. :)