Super Fly Coloured Glass


  • Poser Ambassadors

    @nagra_00_ said in Super Fly Coloured Glass:

    The tricky glass trick does not work with indirect light (e.g. an environment sphere).
    The best workaround i found is to use both isShadowRay and isDiffuseRay for the MixClosure, like this:

    Hm. That's interesting. If I understand correctly why this is the case, it tells me that when a "shadow" ray is generated for direct lighting, it goes only to actual lights, and these "shadow" rays are not generated for our prop emitters. They're actually a cheat.

    The addition of consulting the Diffuse ray seems like a good solution. I can't think of any reason not to do that in the general case.


  • Poser Ambassadors

    If you are using flat glass (like a window) or nearly flat glass (like the cornea of an eye) you can get away with not modulating the transparency at all.

    But if the object is curved, there is a big improvement you can get just by adding three nodes.

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    This is a hack and requires YOUR PARTICIPATION AND THOUGHT. Correct values will not be automatic. No single shader will work for all situations. Blindly copying this will not match my results.

    I'm using two area lights. The appearance of shadows and caustics (real or faked) are heavily influenced by size, shape, position, and intensity of your light sources!!! You have been warned.

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    In this grouping we create increased "shadowing" where the angle of incidence is low, and an intense, amplified concentration where the angle of incidence is high.

    0_1487260491049_TG Fake Caustics.png

    The Edge_Blend produces a gradient that is white for high angle of incidence and black for low angle of incidence. The concentrated version is where we apply the Pow (20) and add some of that back in to the transparency color.

    Because this is a cheat, and not a proper rendering calculation, you will have to personally get involved in adjusting the proportion (.5) and concentration (20).

    The Proportion value is Math_Functions_2.Value_2
    The Concentration value is Math_Functions.Value_2

    Here is a demonstration using three props:

    0_1487260629438_TG Caustics.jpg

    These shadow+transparency effects look much better than nothing.

    For the cylinder, the proportion is .5 and concentration is 20.

    For the ball-cone (teardrop), the proportion is 3 and concentration is 20.

    For the sphere, the proportion is 2 and concentration is 40.

    Note also these values should be adjusted in response to the distance from the prop to the floor.



  • @bagginsbill You are absolutely right. I tried increasing every render parameter but the Max Bounces.

    That was because I was thinking that Max Bounces would limit the ray bounces for the "usual bounces" except for the "special bounces" that are listed afterwards, namely diffuse, glossy, transmission, transparent and volume bounces.
    If I understand this correctly, the Min/Max Bounces parameters are overruling the special bounces parameters?

    BTW I see no difference in the renders between setting Transmission Bounces to 4 or to 16. That would mean that this glass material is relying on the Transparent Bounces to be high enough, not the Transmission Bounces, right?


  • Poser Ambassadors

    For the cylinder, excluding the ends where it gets complicated, the ray has to transmit 4 times.

    1 - to enter the front
    2 - to exit the front - now it';s in the air again, between front and back of the cylinder
    3 - to enter the back
    4 - to exit the back

    You asked if setting transmission bounces from 4 to 16 resulting in no change means it's not using transmission bounces. That is false. It's using the transmission bounces for the refractions (when you LOOK through the glass), and that is why 3 is not enough.

    On the other hand, the nearby surface that is picking up light via the TransparentBsdf (not the Glass) is instead controlled by the Transparent Bounces.

    Either way, you need at least 4 in both. One will effect what the camera sees through the glass, the other will affect what the wall or floor gets lit by that passed through the glass.


  • Poser Ambassadors

    Regarding Min and Max bounces, yes these place an overall boundary on bounces of any kind.

    I leave my individual bounce values high, like 16 for transmission and 32 for transparency (because hair).

    For test renders I set Max Bounces to 4 and I get a fast, but incomplete render. (Missing some transmissions)

    For final I set Max Bounces to 32.



  • @bagginsbill That's some gorgeous glass. I just wish I understood the physics and how you apply it to this material. Is it "suck it and see" as regards the numbers, or are you using a very loose formulae in your head so that you have a guesstimate (or precise idea) of which values will work in which situations?


  • Poser Ambassadors

    @matb said in Super Fly Coloured Glass:

    @bagginsbill That's some gorgeous glass. I just wish I understood the physics and how you apply it to this material. Is it "suck it and see" as regards the numbers, or are you using a very loose formulae in your head so that you have a guesstimate (or precise idea) of which values will work in which situations?

    For some things (like the proportion of reflection vs. refraction at every angle of incidence) I rely on physics formulae and the knowledge that glass IoR is in the ballpark of 1.5 to 1.65, with the highest being the most "lively". I've been doing that part correctly for quite a while even before we had SuperFly. SuperFly GlassBsdf has that formula in it, but I used to (Poser 7 era) have to do it myself and it took 21 nodes.

    For the hacks, like this transmission profile, I have studied numerous simple mathematical curves. I know them like you know when to use salt, white pepper, black pepper, paprika, sugar, garlic, onion, etc. and you can make dips, rubs, and sauces. You've tasted them a lot and you collected the situations in your head that call for different spices. I do that with math curves, and I add to that collection all the time.

    As to knowing how they should look, I ran a longer render using real caustics. In other words, I tasted God's version. Then I imitated what I saw using my bag of math formulae. Well - I enhanced a bit because the real version was boring. I figured artists would prefer to produce some caustics where real life would not.

    Here is a tiny sampling of my formulae and the curves they produce:

    0_1487327528287_upload-1080d0c0-6a35-4703-aea1-d098573c9053



  • @bagginsbill Oh my goodness. I don't have a clue what that's showing (is that Mathematica?), but it looks very impressive. I often wished that I was better at languages, but the one language that I really wish I had great competency at is mathematics and physics. I love 3D and I love astronomy/cosmology and both of those really benefit from knowing maths to a degree level. I assume that you have studied in this field, if you don't mind me asking.


  • Poser Ambassadors

    I studied physics and math but not as a primary goal. They are basic requirements for any degree at MIT. It turns out those have absolutely nothing to contribute to my profession as a software engineer, but they're way useful for my CG hobby.

    The application showing graphs in my previous post is "Grapes" - a free tool for visualizing math formulas. Each colored curve corresponds to the same colored function in the upper right. I used a parameter, p, in each one and varied them from 1 to 2, producing a family of curves for each formula.

    So - the red lines, for example, are all from the y2 formula (1 - x ** p) ** (1 / p) with p varying from 1 to 2.

    It shows us that when p is 1 the curve is a straight line, and when p is 2 the curve is a quarter of a circle. Other values interpolate between the line and the circle.



  • @bagginsbill Absolutely fascinating. So how do you then use that graph to determine useful values to enter into Poser?



  • @bagginsbill said in Super Fly Coloured Glass:

    @nagra_00_ said in Super Fly Coloured Glass:

    The tricky glass trick does not work with indirect light (e.g. an environment sphere).
    The best workaround i found is to use both isShadowRay and isDiffuseRay for the MixClosure, like this:

    Hm. That's interesting. If I understand correctly why this is the case, it tells me that when a "shadow" ray is generated for direct lighting, it goes only to actual lights, and these "shadow" rays are not generated for our prop emitters. They're actually a cheat.

    The addition of consulting the Diffuse ray seems like a good solution. I can't think of any reason not to do that in the general case.

    True. I've read some texts about how cycles works. The shadow rays are always fired to an actual light, to help the renderer find the lights in the scene. In Blender, you have "Light windows", which aren't lights but just frames to guide the shadow rays to bright areas, so that you can help the renderer.

    Poser does not have the helper frames IMHO, so the shadow ray will always seek a light.



  • @bagginsbill said in Super Fly Coloured Glass:
    Your max bounces is 3. It takes 4 bounces to get all the way through both walls of a cylinder or glass. It takes more than that to get through other more complicated shapes and angles, like a glass Andy figure.

    BB, you are a hero!!

    I've been looking around for materials and settings for some glass jars, I've made, and all of them came out with a dark inner back-side of the glass. I tried to reverse the normals for the inside of the glass, but to no avail.

    I can make it work with a simple Firefly-shader, but that does not provide the quality I'm after.
    So I followed your advice and it came out beautifully!

    Thanks mate!!



  • @lapindefer said in Super Fly Coloured Glass:

    I can make it work with a simple Firefly-shader, but that does not provide the quality I'm after.

    Ooooh... Care to share that Firefly shader?



  • It's the season for resurrection. So I'm trying this old thread.

    Loving the Tricky glass, but if I want frosted glass ... then which parameters do I change? Which one defines the transparency/opacity of the glass? (actually I want milky glass for a lamp shade ... but a milk shader has also eluded me so far. I've gotten close, in Firefly, but Superfly is a different beast that I have far from tamed :D )



  • Hi,

    You need to add something to the volume output, same as you do for coloured glass. frosted you would just add a bump map to the normal shader.

    This is what I used for frosted glass

    0_1522617613472_3bcfb212-d4dc-43b9-8b67-34bf7d515720-image.png

    it came out like this (2 panes for added privacy)
    0_1522617815063_768ff3e1-0adb-459e-970c-4442b0df84ab-image.png

    Here it is as part of the divider in Deanna's cabin

    0_1522617753575_27e194d2-a5b8-425d-ae65-33f119bda319-image.png



  • Example ... I can make the lamp light up with the Emission thingie. but then ALL of the glass is lighted equally and it just doesn't look right ...
    0_1522622238764_460f1fdd-c30d-4244-9a7f-d96d76b7d931-image.png
    SO if the glass was "right" I could put a flame of some sort inside ... At least I think so ?



  • @trekkiegrrrl Yes, don't make the glass emissive, the flame, or whatever is inside should be emissive and the glass will be see through. If no one else chips in before tomorrow I will have a look as I have a similar lamp. Though last time I used it was when I was experimenting with Lux and that was really nice, but then SF came along and I sort of lost touch with Lux



  • @trekkiegrrrl if the glass has the thickness, use tricky glass with roughness o.8-1.
    If the glass is just a sheet of polygons, you should mix glossy, translucent and transparent shaders. Do NOT use glass or refractive shader in the latter case, or your lamp will look like a solid glass ball.