Dielectric coloring, white transparent, pngs, alpha channels,.... oh my

Dielectric coloring, white transparent, pngs, alpha channels,.... oh my

Desperately seeking assistance with materials setup and applications. Here's my problem: I have created a two 3d vials. They are in the supplied image below: The labels on these vials are actual polygons. I need to change them to bitmapped images for animation purposes and file size.

The clear vial and label are quite easy to produce. I simply select the glass preset material and add an image node. The image I chose is blue lettering on a transparent background saved as a transparent png from illustrator CS5.5. Perfect. The render and file size are exactly what I want.

But when I try to color the glass in the brown vial version and add white lettering on a transparent background it just doesn't work. I have tried every possible node combination I can think of. It's not even worth going into my failed attempts and what they've produced.

To summarize:

How do I colorize the dielectric node and then add a transparent png with white lettering to the same material? No matter what I do, it treats the white label png as an alpha channel.

When exporting transparent pngs what are the correct photoshop settings? When I export pngs with transparent background from Photoshop, Cheetah 3d seems to treat the transparency as black. However, when I export transparent pngs from Adobe Illustrator, Cheetah 3D seems to treat the transparent background transparent.

dielectricproblem.jpg
 
The problem is that you're using a dielectric shader which doesn't have the concept of a diffuse color. Use a material shader and your problem becomes much simpler -- diffuse is the color of the label, and black text on white background is your transparency.

Aside from being simpler (more performant?), I don't think there's ever any reason to use the dielectric shader. The metal shader allows for anisotropic reflections.
 

Attachments

  • Screen Shot 2013-06-20 at 3.30.31 PM.png
    Screen Shot 2013-06-20 at 3.30.31 PM.png
    91.6 KB · Views: 670
  • glass cube.png
    glass cube.png
    349 KB · Views: 672
Last edited:
The problem is that you're using a dielectric shader which doesn't have the concept of a diffuse color. Use a material shader and your problem becomes much simpler -- diffuse is the color of the label, and black text on white background is your transparency.

Aside from being simpler (more performant?), I don't think there's ever any reason to use the dielectric shader. The metal shader allows for anisotropic reflections.

Hi podperson, I have been trying to recreate what I've done with the Dielectric,
amber glass and green transparent letters, using your suggestions with no luck.
You say it's simpler but it's not easier if you don't already know how to do it.

Maybe you could help me out because I have achieved the look I wanted with
the Dielectric and can see no reason to use your method yet.

I've included my model, with the camera locked for a good A B comparison and the label file I used.

As a side note the only lighting is from the entrance hall hdr,
no lights set to trans.

 

Attachments

  • TransTextColor2.jpg
    TransTextColor2.jpg
    100.8 KB · Views: 643
  • TransTextColoralt.jas.zip
    44.2 KB · Views: 313
  • ZooheadTextTest.jpg
    ZooheadTextTest.jpg
    68.3 KB · Views: 662
Zoohead — I said dielectric is easier — it's just not capable of doing what the kgelmer wants. And since it's not really much simpler, I don't see any real reason to use it.

To recreate what you did with dielectric, just feed everything into transparency as you did with dielectric, and set diffuse to black. But note that the green lettering is green transparent lettering. You could achieve your exact same result with a single material with green text on amber background feeding into transparency.

The thing kgelmer was trying to do was to create opaque white lettering on glass — you can't do that with a dielectric shader because it doesn't have a diffuse channel (which determines what color the parts that aren't transparent are). The only way to make a dielectric shader opaque is to make it black.
 
Last edited:
Hi kgelmer

Not sure if you actually wanted white lettering or coloured lettering on the coloured vial, I picked up on everyone's contributions and have a few observations that may help????

Feeding the text image into a material's 'transparency' channel you get white text, so need to mix colour and text image for coloured lettering.

Mixing the lettering with a colour to feed into Glass 'Dielectric' or Glass 'Material' transparency channel you get transparent text both times. (Material and Dielectric seemed to treat images differently so tried this using positive or negative versions, bitmapped and greyscale tif, no need for transparent background).

To get the text to look more solid increased intensity of the 'colour' to a much higher value. (May require some 'reflection blur' to soften effect of lettering reflected on nearby objects).

The preview was odd for the Glass 'Material' when used in combination with coloured glass and it looks like 'Dielectric' Glass may be the best bet, see Solid Colour pic.

I think ZooHead was on right the track if you wanted coloured lettering.
 

Attachments

  • Dialectric vs Material.jpg
    Dialectric vs Material.jpg
    138.3 KB · Views: 371
  • Seethrough Text.jpg
    Seethrough Text.jpg
    434.2 KB · Views: 387
  • Solid Colour.jpg
    Solid Colour.jpg
    349.2 KB · Views: 387
This is a great thread - Thank you Frank, Podperson & Zoohead for your detailed responses - time to play
 
The point is that you cannot make the label opaque if you use the dielectric shader. You can see this in Frank's example where there is some weird discoloration bleeding through the white.

You can multiply a color by a number > 1 and pump it through your mix to get a weird transparency that actually amplifies light passing through (which might vaguely look like you've got an opaque label but isn't).

A dielectric shader is essentially (perhaps exactly) a material shader with a bunch of channels set to fixed values (e.g. diffuse, specular, and emission are set to black, fresnel is fixed on). The way Frank (and Pat) are getting the label to show as non-black using a dielectric shader is by creating a non-physically realistic "transparency" that is >1.0, i.e. that amplifies light passing through.
 
Last edited:
Thanks so much

The problem is that you're using a dielectric shader which doesn't have the concept of a diffuse color. Use a material shader and your problem becomes much simpler -- diffuse is the color of the label, and black text on white background is your transparency.

Aside from being simpler (more performant?), I don't think there's ever any reason to use the dielectric shader. The metal shader allows for anisotropic reflections.
Thanks so much for your replies. I think PodPerson has the correct approach. I want white lettering on an amber background. I think it can be accomplished using the dielectric node, but as PodPerson points out, it's really a work around not actual opaque lettering. Now that I understand that the dielectric node is really just a subset of presets and the metal node can offer the same reflective properties plus an additional range of control... I have to agree... Why use the dielectric node at all?
 
Last edited:
Hi kg

Absolutely, PodPerson's method is completely correct for opaque white on glass.

I misunderstood what you wanted, as I had been trying to get opaque coloured print previously. PodPerson quite rightly rejected my 'cheat' on the grounds that it wasn't actually opaque.

After a lot of rethinking I have finally resolved this, Whoopee!!!
 
Hi kg

Absolutely, PodPerson's method is completely correct for opaque white on glass.

I misunderstood what you wanted, as I had been trying to get opaque coloured print previously. PodPerson quite rightly rejected my 'cheat' on the grounds that it wasn't actually opaque.

After a lot of rethinking I have finally resolved this, Whoopee!!!

It's all really a cheat ;)

I wouldn't recommend doing it anyway described in this thread. Honestly, what I'd do is have the label rest on the surface, on a separate model. To me that would be the most accurate method, since it's a stamp (of sorts) and would rest on the surface slightly in the real world. Another thing you aren't considering is the backside of the stamp, in many cases it will be different in appearance. This will limit viewing angles when rendering. With a separate model you can map the front and back. I've never (that I can think of) placed labels through the glass, plastic, metal, etc shader because it's just faster to do it separate and eliminates the problems it can cause. And time is money.
 
It's all really a cheat ;)

I wouldn't recommend doing it anyway described in this thread. Honestly, what I'd do is have the label rest on the surface, on a separate model. To me that would be the most accurate method, since it's a stamp (of sorts) and would rest on the surface slightly in the real world. Another thing you aren't considering is the backside of the stamp, in many cases it will be different in appearance. This will limit viewing angles when rendering. With a separate model you can map the front and back. I've never (that I can think of) placed labels through the glass, plastic, metal, etc shader because it's just faster to do it separate and eliminates the problems it can cause. And time is money.

There's two pieces to this — placement of water relative to glass, where cheating is the only way to get a "correct" result, and placing a label, where it depends. In many cases today, the stamp is a layer of paint and the appearance is actually going to be pretty good (just don't map the label to the inside of the container). For a gummed label, etc. to do it correctly in cheetah 3d is pretty much impossible (SSS to allow light through the label…), although using a decal geometry will at least allow you to make the back look roughly ok (e.g. Blank vs printed).

The argument that this is all a cheat is a bit precious (definition 4 for non-native English speakers). Transparency maps are cheating. Bump maps are cheating. Heck, ray tracing is cheating. The question is what gets you a good result fastest (time is money as you say) and decal layers play havoc with radiosity, for example, without even more cheating.
 
Last edited:
It's all really a cheat ;)

I wouldn't recommend doing it anyway described in this thread. Honestly, what I'd do is have the label rest on the surface, on a separate model. To me that would be the most accurate method, since it's a stamp (of sorts) and would rest on the surface slightly in the real world. Another thing you aren't considering is the backside of the stamp, in many cases it will be different in appearance. This will limit viewing angles when rendering. With a separate model you can map the front and back. I've never (that I can think of) placed labels through the glass, plastic, metal, etc shader because it's just faster to do it separate and eliminates the problems it can cause. And time is money.

Hi Nichod, yes it's all a cheat...

Here's one that represents printing colour(s) onto a white backing coat as can be found on common bathroom/domestic products. Images are as rendered, no post processing.

Printed ink is transparent with a thickness is approx. 4 microns compared to paper/film thickness approx. 100 microns.

Further technical information on acetate film and ink film thicknesses can be found at:

http://www.grafixplastics.com/mat_thick.asp

http://pffc-online.com/ar/308-paper-measure-ink-film

http://printing.macdermid.com/pdf/Tech_Tip_16.pdf

If you really want to 'model' the ink (would it survive subdivision/optimisation?) then all I can say is good luck with that ;-)

I agree with PodPerson, 'life's to short to stuff a mushroom!'
 

Attachments

  • Bottle Front.jpg
    Bottle Front.jpg
    265.1 KB · Views: 302
  • Bottle Back.jpg
    Bottle Back.jpg
    293.9 KB · Views: 302
Back
Top