Firefly: Label on clear glass bottle?


  • Poser Ambassadors

    Ok!! this worked!! Wow. Thank you!! (pay no mind to the reflection on the side ... that's part of the original piece I was working on).

    0_1494371897594_label2.png



  • @Boni Just for the record (since other folks have already given the answers you needed) there were three problems I noticed on your original implementation of that shader:
    1 - Your 'Math_Functions' node (to the left of your 'Diffuse_3' should be an 'Abs', not an 'Add' - that's why you're getting the wrong side of the label.
    2 - My display units are inches but my glass jar was the same height as Andy, about 6 feet high, so a 0.1" displacement was good for me. You need a much smaller displacement - that's why your label's so lumpy.
    3 - The red glass in the render indicates you're running out of raytrace bounces on a refract, and since the wholesurface, except the label, is red (not green near the sides) I'd guess you didn't have raytracing enabled at all.



  • @seachnasaigh If it's running out of raytrace bounces you'll see either red or green, not black. The vivid reflect/refract background colours are specifically to indicate that. :o)



  • @Boni Changing the value of Index_Of_Refraction on the Fresnel_Blend and Refract nodes to 0.0154 is completely wrong!
    Index of refraction is dimensionless (i.e. no units) - it's just a ratio. Glass is around 1.5 to 1.6 - https://www.britannica.com/science/refractive-index
    If my maths is correct you'd get an IOR of 0.0154 going from a material with IOR of 65.0 (1/0.0154 - I doubt that any such material exists) to air.
    And I've absolutely no idea why it seems to render okay with that IOR !? :oS



  • @Boni It looks as if your model is a solid cylinder rather than a bottle/glass which would have a distinct (and visible via refraction) glass thickness ? Also the thin green vertical lines on the bottom left and middle right side indicate that you're still running out of raytrace bounces on a reflect node at those points.

    P.S. I did try to attach an MT5 when I posted the originalscreenshot of the shader, but I don't have enough kudos (or whatever they callit) at this site.



  • @3dcheapskate I think all you need is 10 rep to upload pictures but I'm unsure if anyone can upload files.



  • @ghostship You may be right - it's actually 'priveleges' that I don't have enough of. Priveleges may be an admin/mod thing rather than a kudos/rep/browniepoints type thingy.

    0_1494390021476_nopeload.jpg


  • Poser Ambassadors

    @3dcheapskate
    I used the open (hollow) cylinder ... specifically to emulate a bottle. It does have an interior surface. I am studying what everyone has written so I can more fully understand the logic of all of this. I find this a great learning opportunity. Thank you so much ... I will keep you all in the process so others can learn too.


  • Poser Ambassadors

    @Boni: a caveat: These Firefly glass materials are cheats, and one which works well for your "skinned mesh" bottle may not work on a mesh with glass "thickness".

    Also, curvy bottles may behave differently. Further, using a liquid mesh inside the bottle may require yet another solution.



  • @seachnasaigh Liquid inside a bottle does indeed require more thought, and that reminded me - the glass shader I used is taken directly from BB's Glass of Beer http://www.sharecg.com/v/81210/gallery/11/Poser/BBs-Glass-of-Beer . If I recall correctly part of the inside of the glass mesh is a separate 'glass/beer interface' material zone with appropriate glass-to-beer IOR.

    The shader seems to work well on everything I've tried, including both solid and hollow curvy objects. Here it is (with the basic label) applied to the P9 cylinder, P9 open cylinder, Andy, and AllenArts floral teapot ( http://www.sharecg.com/v/87901/gallery/11/Poser/Floral-Teapot ).

    0_1494398970517_stuff.jpg


  • Poser Ambassadors

    @3dcheapskate Alas, I would need to build a different shader as this is going to be a commercial product when it is done. I don't want to "steal" a bb shader as my own. I'm going over these posts and adjusting accordingly. I'll post my results when I am ready. Again thank you everyone.


  • Poser Ambassadors

    I'm getting closer ... but lost ... where to fix the weave on the back ... I like that effect.

    0_1494447392434_2017-05-10.png



  • Re BB's shader - PM him. I don't think there's a problem using shader networks that he's published on forums (and I'm fairly sure that this glass was on a forum before, Renderosity I think) in a commercial product.

    Caveat: there are one or two specific shaders that he specifically prohibits, but this isn't one of them.



  • @Boni As far as I can see the back/front label nodes on yours are now identical to mine,so they should work, so it's possible that something's been 'fixed' in Poser 11 Firefly that prevents quinlor's stuff from working.
    1 - If you render from the other side (i.e. looking through the glass) do you see the weave or the label image?
    2 - Are the normals on your model correct (since it's the Poser Open cylinder I'd guess they are)? If the surface with the label material has its normal facing away from the camera you'd see the back of the label



  • N.B. Any image that's seen through refraction (e.g. backdrop, back of label) seems to be badly blurred unless the filtering on the Image_Map node in question is set to 'None') - https://forum.smithmicro.com/topic/723/pp2014-odd-refraction-in-material-for-drinking-glass


  • Poser Ambassadors

    You can use this shader in commercial props. I've published glass in forums a bazillion times and really there are only a handful of ways to do it that make any sense and, IMO, are not something one can claim to own. Same with paper - the shader for paper is not intellectual property. And blending the two according to a mask - not IP either.


  • Poser Ambassadors

    @3dcheapskate I'm working on your suggestions now ... thank you.

    @bagginsbill Thank you for the clarification. The last thing I want to do is use someone else's intellectual property to make a profit. With partners, this is my first venture into becoming a vendor and I want to do it right.


  • Poser Ambassadors

    Decided to forgo the back of the label so I can move forward with this project. Here is a render using the shader sans the back of the label, plus tinting the glass as needed for project. Image plus settings.

    0_1494503304835_2017-05-11.png

    0_1494503346029_coloredglass.png

    Again thank you all for your help. It is greatly appreciated.


  • Poser Ambassadors

    You have the IOR at .0154 which is WAAAAY wrong. The correct number is 1.54.

    Also you should not put the blue on the Reflect. The blue should be on the Fresnel_Blend inner color. All glass reflections are white. It's the refractions that have color. Your Refract node is colored by being plugged into the Fresnel_Blend Inner_Color. Put the blue there.


  • Poser Ambassadors

    If you make a mesh with beverage (or scented candle) inside, then cut away the interior glass where it meets the liquid/candle.

    This is the glass/label material I used...
    0_1494588804928_1MAT FF glass w label.PNG

    You'll need to render with 8 raytrace bounces.
    0_1494588853723_1MAT FF glass w label T 8rtb.jpg

    x~~~~~~~~~~~~~~~~~~~~x

    Firefly 1MAT glass+label prop

    x~~~~~~~~~~~~~~~~~~~~x