Forum Discussion

KrisLW35's avatar
10 years ago

Shaders/Materials: Fresnel Effect?

Hi everyone! I'm working some vials/potions for Halloween - they all have a glass mesh group (currently using the "Glass For Objects Translucent" shader) and a solid liquid group inside the glass (just regular phong) - and I'm finding that the cube map reflections on the glass group are kind of dulling the saturation of the liquid group I have inside. Nothing terrible, but in general I'd really like to get it so that the glass only has reflections around the edges. (Like how the Sim Ghost shader colors the ghosts, but only around the edges.)

I have set the Edge Darkening value to 3 to lighten up the edges in a pseudo-fresnel effect, and it "kind of" works, but it's not quite what I was hoping for.

I'm using TSR Workshop, and I've managed to find and add a value called "Fresnel Offset" to my Glass For Objects Translucent material, but I can't get it to do anything. Workshop specifics aside - I was wondering if anyone (@SimGuruModSquad perhaps?) could point me in the right direction if any TS4 shaders even support this Fresnel offset? I've tried phong-alpha, glass for objects, and glass for objects translucent thus far, and I've set my Fresnel value to anywhere from decimal places (0.1, 0.5) to 1, 5, 10, even 100, and no value seems to do anything.

I've scoured through tons of EA objects, and I can't find a Fresnel value in use anywhere, and so I am wondering if the engine/shaders even support it? (Aside from however it is implemented in the ghost shader, because I've checked that, and there isn't a literal fresnel value anywhere to be found!)

2 Replies

Replies have been turned off for this discussion
  • Hi @Nearia35.

    Fresnel is not officially supported by the engine as it was dropped for performance and art direction reasons, but there are some remnants of the feature which is what you are seeing. Since we don't use the feature ourselves I can't vouch for how well it works and not all shaders support it. But the "GlassForObjectsTranslucent" shader does actually take this parameter into account so I would expect that if the parameter is properly applied you should see some impact visually. Make sure the parameter is called fresneloffset which is hash 0xfb66a8cb.

    Note that the math is more of an overall spec bias than a shift towards stronger or weaker Fresnel contrast so even if you can get it to work, it may not give you the results you may be looking for.

    Hope that helps, SGMS.
  • Okay, great! That's something at least - I'll poke around some more and see if I can manipulate it into doing anything. Thank you! :)

About The Sims 4 Mods & Custom Content

Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.14,419 PostsLatest Activity: 6 years ago