Home Technical Talk

Use nearest cube map (for glass shader) not working

Trying to set up some cube maps for reflections in my glass using the glass shader, but it simply doesn't work. No idea why. Screenshot of settings attached.

shFl7wT.png

Replies

  • mystichobo
    Options
    Offline / Send Message
    mystichobo polycounter lvl 12
    Try setting your opacity back to 100.
    Everything else you have looks correct-ish, though you could probably lower the spec down to nonmetalic levels (assuming this is 3.6+).
  • Zerokaiser
    Options
    Offline / Send Message
    I've had Opacity/Spec set to everything. 99 is what's listed in the documentation (says 100 is bugged) so that's what it's set to in the screenshot.
  • TAN
    Options
    Offline / Send Message
    TAN polycounter lvl 12
    Did you try a diferent shader other than glass with this ?
  • [Ste Pie]
    Options
    Offline / Send Message
    [Ste Pie] polycounter lvl 2
    Hi Zerokaiser,

    I realise the post is a few weeks old however this hopefully can help anyone with this question.

    There are a few things to help you get the desired glass material set up correctly.

    Firstly you should set your gloss to 255, specular to 58,58,58 and as you correctly mention, Opacity should be 99.

    Try playing around with the Fresnel values as sometimes this emphasises the appearance of the reflections depending on your grazing angle when looking at the glass.

    Adding a very subtle bumpmap like this https://www.filterforge.com/filters/7718-normal.jpg will also help. Probably even more subtle than this. Then play with the bump scale values.

    Your nearest cubemap will also have a huge impact on the appearance of the glass. If there is nothing around the cubemap or if it is blocked by an object nothing will be seen in the reflection of the glass. Make sure the sky or an object are visible when generating the cubemap.

    Also change the priority of the nearest cubemap you want seen in the reflections of the glass to be higher than any other nearby cubemap. A higher priority means it will be used before any other cubemap. It is always best to keep your global cubemap set to a lower value than your local probes if you are going for very specific reflections.

    And finally play around with the tint to achieve desired effect depending on how opaque it is :)
  • JohnnyH
    Options
    Offline / Send Message
    JohnnyH interpolator
    Hey Zerokaizer,

    I ran into this while working on my current project, The glass shader specifically doesn't work with "use nearest cubemap" according to the documentation.

    Try manually setting which cubemap for it to use, worked for me :)
  • [Ste Pie]
    Options
    Offline / Send Message
    [Ste Pie] polycounter lvl 2
    JohnnyH wrote: »
    Hey Zerokaizer,

    I ran into this while working on my current project, The glass shader specifically doesn't work with "use nearest cubemap" according to the documentation.

    Try manually setting which cubemap for it to use, worked for me :)

    This is incorrect, the glass shader will work with the nearest cubemap as long as 'Environment Map' is ticked under 'Shader Gen Params, opacity is set to 99 and the nearest probe is active.
Sign In or Register to comment.