Jump to content

Materials & water (environment)


You are about to reply to a thread that has been inactive for 2230 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Im kind of confused after a long time of tweaking, not sure what to go with. Either one of them looks good in dayligth or midnight but not both. (the maps on the following image are the specular alpha).

Glossiness: 255
Environment: 255
(using materials)

 

example.png

Edited by MSTRPLN
Link to comment
Share on other sites

Environment drives how shiny (metallic) a material looks, while its specular map defines how much of the light gets bounced off the surface. How the thing actually shines is defined in the glossiness parameter, which you can drive using the normal map's alpha

  • Like 1
Link to comment
Share on other sites

Yes i've done the normal's alpha too (the water is 255 glossiness on there), the only proiblem i had was without environment on you wouldn't see a thing of the the water if there wre no lights so yeah. And i've tested it with multiple windlights and sky presets (the one on the right, the fully white meaning 255) and it makes sence, it's reflecting the sky and the default sky isn't that pretty so it look's akward since it only reflects the light and not for example the clouds etc. With darker skies (ie: the default midnight) they look rather dark/black.

Thank you :)

Link to comment
Share on other sites

10 hours ago, OptimoMaximo said:

Environment drives how shiny (metallic) a material looks, while its specular map defines how much of the light gets bounced off the surface. How the thing actually shines is defined in the glossiness parameter, which you can drive using the normal map's alpha

Totally wrong...

4 Parameters...

2 Numbers, an image map and a colour picker

The first number Spec/Gloss (depending on which viewer you use is SPECULAR TIGHTNESS, how tight and focused or loose and soft edged the highlights are, it has NOTHING to do with the strength of the highlights or looking 'metallic'.

The second number is the strength of the fake env reflections, nothing at all to do with 'metallic' finishes.

The Image map, multiplied by the colour picker (tinting)  controls the strength and colour of the highlights, and can be used to fake 'metallic' materials by setting an apropriate specular colour. 'Plastic' surfaces have white/grey highlights, 'metallic' surfaces have highlights tinted by the diffuse colour.



 

Link to comment
Share on other sites

36 minutes ago, MSTRPLN said:

So the Specular diffuse doesn't affect the amount of reflection? Because theres a noticable difference between 100% white and 50% grey when it comes to the amount of specular (how opaque)

The specular map and specular colour are multiplied by each other... same as tinting a diffuse texture...

The colour/strength of a specular highlight is determined by the result...

In ANY specular system, if your specular highlight colour is DARKER than the diffuse colour, you might as well not bother, this is a CLASSIC render-noob mistake from the days of poser and daz studio.

Most specular maps are simply TOO DAMN DARK.

For water, you do NOT need an alpha in the normal map, simply set a value for the fake env map reflections say 100-150 ish, Spec to 175-200 ish

In fact you don't need alpha channels on any of the 3 maps, set the alpha on the diffuse with the numbered parameter on the texture tab, specular colour should be white, the specular map should be white or pale grey as an average colour, anything darker than an average rgb of 192, just wont look right.

Then use a script with setprimparamsfast to slide all three maps in sync with each other for moving ripples, and it should work

 

Edited by Klytyna
Link to comment
Share on other sites

From the wiki

Texture Channel Encoding

How the renderer will treat each color value in a texture image channel
Parameter Red Green Blue Alpha
Diffuse Map Red Green Blue selectable

see Alpha Mode

Normal Map Normal X Axis Normal Y Axis Normal Z Axis Specular exponent
Specular Map Red Green Blue Environment intensity

 

As you can see the Specular exponent is controlled by the alpha channel of the normal map, and the Environment intensity by the alpha channel of the specular map.  So adding an alpha channel to the normal map won't have any effect on the reflectiveness, only the glossiness of the object (and having a solid white alpha channel is pointless, you may as well use a 24 bit image instead of 32 bit and control the specular and environment strength using the values in the edit window).

In the case of water there's no need for a specular exponent or environment intensity map, since the surface properties of water are uniform and don't tend to vary unless you're dealing with whitewater (aka waterfalls, rapids, etc).  When dealing with objects that do require  specular exponent and environment intensity maps once you have them set up properly you should be able to ignore the values in the edit window (just set each to 255 and rely on the alpha channels of the specular and normal maps to adjust the values on a per-pixel basis).  The same goes for the specular color picker in the edit window, if your specular map is set up correctly there should be no need to mess with the color picker since the RGB channels of the specular map are already doing the same job at a per pixel level.

 

4 hours ago, Klytyna said:

Then use a script with setprimparamsfast to slide all three maps in sync with each other for moving ripples, and it should work

No need to use setprimparamsfast, settextureanim works on all three maps simultaneously, and since its client side not server side will give much smoother results without all the extra lag setprimparamsfast would create.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

20 hours ago, MSTRPLN said:

Im kind of confused after a long time of tweaking, not sure what to go with. Either one of them looks good in dayligth or midnight but not both. (the maps on the following image are the specular alpha).

Glossiness: 255
Environment: 255
(using materials)

 

example.png

After studying the image you posted for a minute or two it occurred to me that texture animation isn't really an option since you seem to have the land and the water as a single object so animating the texture is going to slide the puddles of water around rather than just animating the surface of the water.

You could consider adding a single flat plane at water level and then putting a separate water texture on that which would allow you to have an animated water surface that people could walk "into" rather than on (assuming that the object you're using isn't just a flat plane of course), then you could dispense with the specular exponent and environment intensity channels but if you're intent on having a single object for both land and water then yes you would of course need alpha channels for your normal and specular maps.

Unfortunately when it comes to reflective things in SL the environment map is pretty basic and doesn't really work well on large flat surfaces, you'll most likely achieve a more realistic and aesthetically pleasing effect using a separate plane so that you can have an animated normal map to disrupt the waters surface and scatter the reflection a little.

As for which of the two specular alphas in your image works best, I guess that's just a matter of personal preference, mine would be the one on the left, since the one on the right makes the water look a little too light during daytime, but then that's probably going to depend on windlight settings as much as anything else.

Link to comment
Share on other sites

7 hours ago, Klytyna said:

In ANY specular system, if your specular highlight colour is DARKER than the diffuse colour, you might as well not bother, this is a CLASSIC render-noob mistake from the days of poser and daz studio.

This is totally wrong. depends on the shad model you're working on Blinn and Phong materials REQUIRE black diffuse to define metals, and its color being transferred to the specular color, whereas PBR embeds these 2 parameters in the basecolor texture, defining the metallness using the metalness texture.

You don't even seem to grasp the difference between a specular map and a specular highlight, but i guess it's due to the use of photoshop or such, that you say so. A specular highlight is a render pass that shows the rendered specular effect given by the specular intensity map, but the 2 are totally different from each other.

Please don't shoot sentences that can very easily confuted :) 

  • Thanks 1
Link to comment
Share on other sites

glossiness.gif.76a881a2326b792e513b387a11063732.gif

This is a quick material i made, flooded cobblestones. Not a finished one, but enough to show what i was pointing out earlier. Defaultnight mode, only one floating prim set as point light. The specular intensities need some tweaking yet

As you can see, the specular exponent aka glossiness is embedded in the normal map as alpha channel, and its areas are definitely being differently affected by it. The specular map aka spec intensity and color has just 2 slightly different tones of grey, one for the stone and one for the water, and an environment map featuring a 0.04 as per non metallic materials reflectance at normal value, aka f0.

 

So to recap: 

the specular map defines intensity and color. The color is for metals, as per Blinn phong model, whereas all non/metals aka dielectric material always share a grey color. Their values define the intensity, or amount of light being reflected off the surface. Its alpha channel defines how much of the environment get reflected, and an environmental reflection is possible only on polished metals. Reflection is meant as mirror effect.

the normal map's alpha (i don't need to explain what a normal map is) embeds a vital information for the specularity look: how rough a surface is. Glossiness is just the grey scale inversion of a roughness map. The same amount of light being reflected off a surface, will do this in different ways, depending on how smooth/rough a surface is; where on a smooth surface, the specular highlights will look well defined and sharp, a rougher surface will blur these highlights, because the light was scattered around more because it hit an irregular surface.

 

 

Edited by OptimoMaximo
  • Thanks 1
Link to comment
Share on other sites

Welll okay let me explain. I used to have the puddles on a seperate layer but that didn't look as good as this one (example)
The one i have now is using the road's normal &specular. The reason for the Specular alpha (enviromental) i that else, without lights there would be no water visable.
i fixed it with setting enviironmental to 100.

as for the glossiness, have the setting at max (255) however, colors in the normal map alpha are set to water (255) and road (100).
The way the sky was reflecting on the water did it make look weird, using different sky presets fixed it somehow. However, 255 was too extreme so 100 looks more acceptable.
Or even 50.

17 hours ago, Klytyna said:

In fact you don't need alpha channels on any of the 3 maps, set the alpha on the diffuse with the numbered parameter on the texture tab, specular colour should be white, the specular map should be white or pale grey as an average colour, anything darker than an average rgb of 192, just wont look right.
 

I do, because the glossiness on the road would be softer than on the water, so the normal alpha is essential. Else everything would have the same glossiness, this would kill the feel of materials (IE: sand, metal, stone, wood, water etc) Nothing has the same glossiness/reflectivity etc.

17 hours ago, Klytyna said:

Then use a script with setprimparamsfast to slide all three maps in sync with each other for moving ripples, and it should work

 

The puddles are static, i have however a Layer on top that has a ripple animation:
b46c8acfb5d722a8aa7ce5228601f2e7.gif.8619c7397fd33261c883c3fa96ca3dd4.gif

 

10 hours ago, OptimoMaximo said:

This is totally wrong. depends on the shad model you're working on Blinn and Phong materials REQUIRE black diffuse to define metals, and its color being transferred to the specular color, whereas PBR embeds these 2 parameters in the basecolor texture, defining the metallness using the metalness texture.

I am familiar with PBR, The black diffuse is usually the case with a Metal/Roughness workflow. Why most cases like SL, Rust use rather Specular/Glossiness (Unless you have a good pbr engine, which SL really doesn't).

 

Okay one more Question:

Are normal maps broken? Below is a example of both a Y-Flipped Nromal and a regular one, however on the mesh they look the same.
Does SL flip on it's own or? it has to be the inverted to show the correct normal. Not sure what's going on here.

downloads.thumb.png.aa7b88c1cca05e88ff88dc1f5b3e666f.png

Edited by MSTRPLN
Link to comment
Share on other sites

1 hour ago, MSTRPLN said:

I am familiar with PBR, The black diffuse is usually the case with a Metal/Roughness workflow. Why most cases like SL, Rust use rather Specular/Glossiness (Unless you have a good pbr engine, which SL really doesn't).

The black diffuse is specific to the Specular/Glossiness workflow, and it's the same as it was with Blinn and Phong materials. SL has no PBR renderer and the legacy diffuse color textures would go broken if they fully implemented a shader like that. So i think they went for a hybrid, using the legacy diffuse color as a PBR's base color channel, resorting to the environment map in order to define metallic areas. But it still uses a blinn-like shader, so it uses Specular and Glossiness which work like in a Spec/Gloss setup. As i said, i see it as an hybrid, and i'm quite satisfied of how my materials look, making them as i explained in the earlier posts from PBR software.

  • Thanks 1
Link to comment
Share on other sites

Exactly, the road is rougher than the water, therefore a softer reflection.

After long time (and i really mean a long time) experimenting and tweaking to get things looking slightly better (currently using the default night) i managed to get this result:Example.thumb.png.eb313e3ab07827d0dd652c3662636365.png 

Wet settings:
Glossiness: 255
Environment: 100


Dry Settings:
Glossiness: 100
Environment: 100

  • Like 3
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2230 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...