Jump to content

struggling with specular

Recommended Posts

I'm trying to understand the nuances of specular maps, and was curious:  are there occasions where unavoidably, the SL sun overrides the level of reflectivity dictated by the maps? 

Take a look the objects shown below.  All of them have a flat black diffuse texture, a blank normal map, and a checkerboard specular map consisting of alternating black and white squares.  All have Glossiness set to 51, and Environment to 0.  The lighting is region default SL lighting, approximating Midday, with Advanced Lighting Model and all shadows on.  There are no local light sources.



The reflections seem to work as intended as long as one is viewing the surfaces at oblique angles--  but that bright highlight reflection from the sun visible on the sphere is smack in the middle of a "black" zone where the specular map specifies zero reflectivity.  It starts to happen on the cylinder and cube, too, as you change the camera angle:



As camera angle shifts, the reflection from the SL sun begins to overtake the map-designated reflectivity, and then replaces it.  I would understand why this was the case if the Environment setting on the objects was set to any positive value--  but as I mentioned above, it's firmly at Zero.

Lowering the Glossiness just makes the objects look awful, without solving the problem:


Changing the reflected light to grey dims out the specular map reflections, but doesn't affect the sun highlight:


Is there some aspect of Materials or setting I'm unaware of that's causing this effect?  Is there a way to eliminate the issue, short of using two different textures and turning reflectivity off altogether on one of them?  I can't figure it out...


Link to comment
Share on other sites

Like Arton, I can't reproduce this with the LL viewer, including when using different chequered maps in the alpha channels of normal or specular maps. What viewer are you using? I can also see specular reflection from the side of your cube and the bottom of your sphere. Where is that coming from? It does seem to respect the specular map.

Also, it looks like the "correct" (ie, respecting the map) specular and the bright highlight appear at different places on the sphere. If they are both from the sun, they should be in the same place (ie with the same normals), shouldn't they? What, if anything, is your normal map?


Link to comment
Share on other sites

You're absolutely correct, Arton.  I'm not using the official viewer;  I'm using Firestorm x64, and it never occured to me that it could be a Firestorm-specific bug.  I checked their Jira, and it's been reported by other users, in association with a feature called Screen Space Reflections.  It's unresolvable, and will be "fixed" by the elimination of that feature in a future release.


Thank you for the help!

Link to comment
Share on other sites

Drongle:  I thought that some degree of specular reflections on the sides of the cube and the bottom of the sphere were to be expected when things were working correctly, provided that the environmental light was coming from any direction except straight down.  I don't know where it's coming from, if that's not the case; I'm sure there were no light sources in the environment except the sun.  I also didn't notice that the alignment of the "correct" and bright highlights were significantly misaligned--  but then, it's hard for me to determine what's normal or expected, as I've never tried working with this aspect of Materials before.

As I described for Arton above, my viewer is Firestorm, and the bright highlight and its associated issues seem to be a previously reported bug.

The normal map for all surfaces of the objects in question was the "Blank" normal map, created when you click in the texture window, and then push the Blank button in the following sub-menu.

Link to comment
Share on other sites

Juliana Lethdetter wrote:

I checked their Jira, and it's been reported by other users, in association with a feature called Screen Space Reflections.  It's unresolvable, and will be "fixed" by the elimination of that feature in a future release.

You can fix the issue by turning off the "Screen Space Reflections" in the viewer.

(By default it is off, perhaps you have it accidentally on?)

In: "Preferences, Graphics, Rendering". Tick off the "Enable rendering of screen space reflections".

When I turn that feature off in Firestorm the specularity works correctly,  just like in the Linden Lab viewer.


Link to comment
Share on other sites

I do have SSR turned on, Coby--  I activated it intentionally at some point in the past, because I liked the effect it gave during photo shoots, then never turned it off again because there didn't seem to be a need to.  Now that I know it's what creates the issue, I'll be turning it off for sure.

I might have discovered all this sooner, except that outside of those photo shoots, I normally wander around with ALM on, Shadows off and CalWL windlight, conditions under which I don't see many Material reflections.  (In fact, I started experimenting with specular maps in the first place because I have a favorite leather steampunk jacket that becomes bizarrely and unfortunately reflective under normal Windlights due to the bug, and was trying to figure out how to fix it!  :matte-motes-bashful-cute-2:)

Thank you again, everyone, for your assistance and quick replies!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...