PDA

View Full Version : Specular Highlights



medzo
01-10-2014, 05:53 AM
Hi!

Is it possible to get reflection of sun on material without using specular input and glossiness, just from reflection and reflection blurring input?

Thanks!

3DGFXStudios
01-10-2014, 06:59 AM
Yes! If your sun is a 3D model or the newly added Ngon light type.

medzo
01-10-2014, 07:37 AM
That sucks :)
So on every materials we must use specular...
Thanks

djwaterman
01-10-2014, 07:45 AM
Of course, just don't use specular or glossy, have something in the scene that represents the sun and you will get sun reflected in your surfaces. It cold be a HDRI or an actual sun object or what ever you decide it should be, it won't be your actual light, that won't show up in reflections (that shows up in specular, but you won't be using that), so you have to put something in the scene that will be the sun and be reflected.

medzo
01-10-2014, 01:14 PM
Dp sunsky does not have that kind of option, right?

gerardstrada
01-10-2014, 03:58 PM
Just in case, DP Sunsky is reflected on surfaces.



Gerardo

prometheus
01-10-2014, 04:01 PM
Dp sunsky does not have that kind of option, right?

The Dp sunsky reflects in reflective surfaces,you can increase reflection over 100 if you want to get more like specular values, but it reflects even without specular.
throw in a sphere, make it 100-110 reflective, add sunsky, swith sun to sk_sunlight, and use manual mode to control it with standard rotation values.

sunsky has no options for clouds or anything like that, youīd have to use hypervoxels, or a combination with sunsky and cloudbackdrop images, in textured environent for example.

Michael

medzo
01-11-2014, 08:35 AM
Hi

The effect using just fresnel with inverted diffuse is really hardly noticeable, meanwhile with delta material - reflection of the sun is much clearer. 119226119227

prometheus
01-11-2014, 11:05 AM
Hi

The effect using just fresnel with inverted diffuse is really hardly noticeable, meanwhile with delta material - reflection of the sun is much clearer. 119226119227

what type of effect or surface reflection are you after? delta is a somewhat translucent material. for more metal look, use conductor, check reflection blurring and control it with roughness.

you also got the brdf shader in the shaders tab to give you anisotropic specular shading, also available in nodes, but you got to have specular value on for standard brdf shader to work.

Michael

Tobian
01-11-2014, 11:39 AM
Of course it's possible, you just need to ramp up the power of the thing you're trying to reflect. In nature, the sun is ridiculously bright, in lightwave terms tens of thousands of %, which if you handle it as reflection blur, will result in splotchy blotchy sparkly sprinkles.. :) This is where a mix of reflection and spec is the best combination. personally I boost the specular produced by Delta, using DB&W's material tweaker node. I go into my workflow here, http://www.andrewcomb.com/pluto_station/the-lightwave-users-group-webinar/ , and you can download some sample materials, which will work correctly using either lights/spec or using HDR environments.

As a note, Delta has 'specular' as well as 'reflection' in a combined shader, but the specular power is usually way too weak, hence i boost it, after applying the Fresnel response. DP Sunsky is not really any different to how normal lights behave: You both need to boost, massively, the intensity of the sun-disk in the shader, and boost the specular in your materials.

prometheus
01-11-2014, 11:43 AM
Of course it's possible, you just need to ramp up the power of the thing you're trying to reflect. In nature, the sun is ridiculously bright, in lightwave terms tens of thousands of %, which if you handle it as reflection blur, will result in splotchy blotchy sparkly sprinkles.. :) This is where a mix of reflection and spec is the best combination. personally I boost the specular produced by Delta, using DB&W's material tweaker node. I go into my workflow here, http://www.andrewcomb.com/pluto_station/the-lightwave-users-group-webinar/ , and you can download some sample materials, which will work correctly using either lights/spec or using HDR environments.

As a note, Delta has 'specular' as well as 'reflection' in a combined shader, but the specular power is usually way too weak, hence i boost it, after applying the Fresnel response. DP Sunsky is not really any different to how normal lights behave: You both need to boost, massively, the intensity of the sun-disk in the shader, and boost the specular in your materials.

I donīt think the intensity of the sun_disk in the dp sunsky reacts at all unfortunatly, not from what I have seen, or maybe it just donīt work with vpr and only final render, lightwave chrashed when testing right now.

Michael

gerardstrada
01-12-2014, 08:03 PM
Hi

The effect using just fresnel with inverted diffuse is really hardly noticeable, meanwhile with delta material - reflection of the sun is much clearer.
Reason why you are getting a much clearer sun reflection with Delta material (or other materials) is because you have "Affect Specular" option enabled in your sun light, and materials are taking specular highlights into account, while when using only reflection parameter, specular highlights are ignored.

In order to work with more correct diffuse and reflections values, we need to disable the Inv. Exp. Exposure parameter. D50 adapted color system versions can be used for a correct color reproduction when previewing directly in computer monitors. Use later DP Linear Tonemap (no Exposed Render) in DP Node Image Filter to appropriately expose the render.

http://s29.postimg.org/yulqw8hzr/dpsunsky.gif
(Reflection&Diffuse-only test)



Gerardo

medzo
07-25-2014, 02:59 AM
Hi

I am reviving this thread because the question is related to the topic.

When using specularity (highlights), for physical correct output, do I need to multiply the input with fresnel?

I am attaching two examples for my leaves material, which one is 'more' correct when it comes to specular input?

123233
123234

Tobian
07-25-2014, 03:49 AM
Specular should be the exact same value as reflection, a simple low-value fresnel, but then multiplied by an amount to boost it to realistic values: between 20 and 50. This may result in unwanted noise issues, but it's closer to reality.

As a note, translucency and diffuse should be equal to the remainder of fresnel, as they are both forms of transmission, albeit faking thin sss for this :-)

djwaterman
07-25-2014, 04:58 AM
Reason why you are getting a much clearer sun reflection with Delta material (or other materials) is because you have "Affect Specular" option enabled in your sun light, and materials are taking specular highlights into account, while when using only reflection parameter, specular highlights are ignored.

In order to work with more correct diffuse and reflections values, we need to disable the Inv. Exp. Exposure parameter. D50 adapted color system versions can be used for a correct color reproduction when previewing directly in computer monitors. Use later DP Linear Tonemap (no Exposed Render) in DP Node Image Filter to appropriately expose the render.

http://s29.postimg.org/yulqw8hzr/dpsunsky.gif
(Reflection&Diffuse-only test)



Gerardo


I'm needing clarification, what is the "Inv. Exp. Exposure parameter" referred to here?

gerardstrada
07-26-2014, 08:27 PM
I'm needing clarification, what is the "Inv. Exp. Exposure parameter" referred to here?
http://s30.postimg.org/fxajsi2q9/IEE.png
It makes A LOT of difference!



Gerardo

djwaterman
07-28-2014, 10:11 AM
Well here I'm getting an obvious sun reflection in my Conductor material using Sunsky, so there's no specular at all just reflection.

http://i1210.photobucket.com/albums/cc401/djwaterman/sunsky_zpsf267fcdf.jpg (http://s1210.photobucket.com/user/djwaterman/media/sunsky_zpsf267fcdf.jpg.html)

But look at my Sunsky menu, it is missing the distance input, the open GL checkbox and the model reference thing underneath that, and if I set the exposure setting to 0 the whole sky blows out to white. So I'm still not getting it. I've never used Sunsky before but I'd like to start using it more.

gerardstrada
07-28-2014, 01:06 PM
But look at my Sunsky menu, it is missing the distance input, the open GL checkbox and the model reference thing underneath that, and if I set the exposure setting to 0 the whole sky blows out to white. So I'm still not getting it. I've never used Sunsky before but I'd like to start using it more.
Your DP Sunsky version looks very old. Are you using the last version?


Hi

I am reviving this thread because the question is related to the topic.

When using specularity (highlights), for physical correct output, do I need to multiply the input with fresnel?

I am attaching two examples for my leaves material, which one is 'more' correct when it comes to specular input?

123233
123234
As far as I know, LW native specular has no fresnel effect, so you can multiply the specular value by the fresnel effect in such case. If I remember well, DP Cook Torrance C (in DP Light Group node) already include a fresnel effect if you are interested. Nice thing about DP Cook Torrance C and A is that these specular shaders behaves like a normalized specular function, so if specsize increases, specular reflection intensity dimmers; and if specsize decreases, specular reflection intensity boosts.


http://s13.postimg.org/t15vidkvr/reflect1.jpg http://s2.postimg.org/rrbtuxbq1/spec1.jpg
Pretty cool, eh?

Think these DP specular models are useful to mix/substitute with/instead raytrace blurred reflections to configure physically plausible shaders.



Gerardo

medzo
07-28-2014, 02:16 PM
Thank you all :)

@Tobian: Can you please explain what exactly do you mean by 'translucency and diffuse should be equal to the remainder of fresnel'?

spherical
07-28-2014, 04:15 PM
If I parse that correctly, it is the inverse relationship between the reflection curve and diffuse curve, as influenced by incidence angle. When one increases, the other decreases, so the net result is always 100; minus of course losses. After a ray interacts with a surface, nothing is 100%; something is always bled off.

Tobian
07-28-2014, 05:05 PM
Ok a number of points to address...

1) DJ, yes it's quite possible to get a nice solar disk spot in the environment if you do a chrome-ball - however as you know yourself from using the HDR Lighting studio the spot actually needs to be orders of magnitudes brighter to work in a PBRT environment/ contribute to lighting. In the lightwave paradigm this creates a problem. Picking an arbitrary number, if you make the sun disk 10,000% bright then it should start to reflect properly in realistic car-paint shaders (i.e. the clear coat, which has very low reflectivity at facing). The next issue is that the sun has only got an angular size of 0.52 degrees (or a radius of 0.26 in the input) this means the 'specular' spot is really tiny. For specular reflection, this means anything other than a 0% blur is going to have an issue with miss chances and huge noise on larger blurs, as the larger the contrast ratio (10k to 1) the more noise you introduce... For radiosity, if you do interpolated, you'll get weird massive blotches all over the place, and you'll get MASSIVE grain issues for non-interpolated. Feel free to try it yourself, and experience whey I don't use this for sun-disks... This is due to a function that LW 11 does not have, known as multi-importance-sampling, which is a solution to help with such scenarios other renderers use to deal with that, for radiosity and specular reflections.

My preferred method is to use the normal 'materials' - such as car paint, Delta and Dielectric, but boost the spec, using DB&W's material tweaker, to about 5000% This then overcomes the rather weak looking spec on the default materials. Using spec means that I can much easier control what contributes photons to the radiosity solution (using tools like DB&W's schlicks approximation) to help mitigate horrific blotchy noise issues.

Ideally, you would ditch 'spec' but in practical reality, in 'current' Lightwave, without any kind of multiple importance sampling, and without infinite time to ramp up my samples, yeah, I use spec...

2) Gerrardstrada - yes this is another issue with the reflectance/spec models, they don't fully, realistically to the spread of light round the 'hotspot' - LW needs more sampling distribution methods, which currently I have no idea how to 'fake' using nodes, certainly not for reflection, possibly layering several spec models, for a spec-hit, it's currently how Zap does this in MR's MIA materials, but likewise he can do squat for reflection blur, as it needs a more complex model.

3) Medzo.. Ok basic energy conserving physics here... All light which hits the surface is either 1) reflected or 2) absorbed
In the case of all materials the amount of light which is reflected is governed by the Fresnel equations. 'metals' have a very high IOR, glass, plastic, wood, and other 'dielectrics, have a lower IOR (ignore most metal IOR's they are not right)

Ok so any light which is 'absorbed' does a number of things...
In the case of metals, it is simply absorbed. Pure metals do not have any diffuse reflectance
In the case of (most) dielectrics, the light is either transmitted (glass), scattered (sss, such as wax or skin) or diffusely bounced right back out (lambertian diffuse) with some of that light absorbed, depending on the material, such as coloured materials, absorbing some wavelenths but not others...

Complex materials have a mix of different transparent, translucent, scattering and diffuse terms, but we usually just do a simplified model and mix them together in percentages, or using texture maps. But still remember that this 'absorbed' light is whatever is the remainder of the 'reflection' amount. So basically all of these values added up together is less than 100% and less than the inverse fresnel...

So: (diffuse amount x absorption colour) + (translucency amount x absorption colour) + (transparency amount x absorption colour) < 100% x inverse Fresnel
So you might have say 55% diffuse + 40% transluceny + 5% transparency. Each tinted by texture maps and then multiplied by the inverse Fresnel... as an example of how to define some leaves.. Of course most 'materials' do a lot of donkey work for you here, but there isn't a 'thin sss material', which there probably should be, to simulate leaves, like this.

Tobian
07-28-2014, 05:29 PM
Quick example of how I did a leaf material. I forget who uploaded this model to FB a while ago, so sorry for the lack of credits here...

I used a basic delta. Then, after slightly massaging the leaf colour, I feed it into both the delta colour and a translucency node. I use the Schlicks to generate the (simple) Fresnel term, into Delta and the inverse into the translucency ammount.

I then mix the the translucency with the diffuse of the Delta material, using the 'Material booster' from DB&W, which I just use a simple % value ( think I went with 35%) but you could use a texture, to add more control. I also boosted the spec, as I mentioned earlier. You could also set the translucency node to 180% mode, if you wanted even softer leaves, and tweak the ratio... The point though is not to ADD translucency to diffuse as then you may end up with 200% of the light reflecting, which makes no sense at all :)

gerardstrada
07-29-2014, 09:09 PM
The next issue is that the sun has only got an angular size of 0.52 degrees (or a radius of 0.26 in the input) this means the 'specular' spot is really tiny.
Consider that most of the visual perception of the sun size comes from the glare/glow (a scattering effect) which may considerably increase the size perception of the solar disk. For mimic this effect within Sunsky, we don't need to increase so much the sun intensity, but rather the glow intensity.


For specular reflection, this means anything other than a 0% blur is going to have an issue with miss chances and huge noise on larger blurs, as the larger the contrast ratio (10k to 1) the more noise you introduce... For radiosity, if you do interpolated, you'll get weird massive blotches all over the place, and you'll get MASSIVE grain issues for non-interpolated. Feel free to try it yourself, and experience whey I don't use this for sun-disks... This is due to a function that LW 11 does not have, known as multi-importance-sampling, which is a solution to help with such scenarios other renderers use to deal with that, for radiosity and specular reflections.
Agree. Just in case, another way to overcome noisy results for radiosity and blurred reflections is by rendering in low contrast and then getting back the original contrast:

http://s1.postimg.org/g2qz6yoen/LCR.jpg
Surely not viable for all cases but might help some people don't aware about this method.


My preferred method is to use the normal 'materials' - such as car paint, Delta and Dielectric, but boost the spec, using DB&W's material tweaker, to about 5000% This then overcomes the rather weak looking spec on the default materials. Using spec means that I can much easier control what contributes photons to the radiosity solution (using tools like DB&W's schlicks approximation) to help mitigate horrific blotchy noise issues.
I also prefer the keylight-mix for animations, but in order to not break the physically plausible shading (per each compromised surface), I find more simpler just solve the issue with volumetric lighting. The light keeps its correct intensity for diffuse and specular components and the volumetric parameter takes charge about the blurred reflections:

http://s28.postimg.org/40zexpea5/VKL.jpg

Volumetric light is seen by reflections and avoiding pre-tonemaping in Sunsky prevents unrealistic contrast ratios. Render is made with normal contrast threshold.


yes this is another issue with the reflectance/spec models, they don't fully, realistically to the spread of light round the 'hotspot'
Just in case, my previous post was not about the spread of the specular highlight but about the energy conservation in the specular lobe (corresponding to the spread of energy of the specularity) which always sums 1.0 in those DP LightGroup specular models.

Common specular shaders doesn't behave in that way:

http://s18.postimg.org/h99qivz55/commonspec.jpg

As for realism of LW reflection blur, well, ILM's reflection blur doesn't look any better:

http://s1.postimg.org/c1ehf1lhr/ILMref.jpg

In such case you might want to try Pom's Gaussian reflection node:

http://s9.postimg.org/cgcl23lq7/reflect2.jpg

There's also a trick when using mBlur, and haven't tried but looks like Weepul's method (http://forums.newtek.com/showthread.php?63725-New-node-pack-for-LW9&p=576661&viewfull=1#post576661) might be useful also for more customized distribution.



Gerardo

p.d. sorry for some images compression but it seems postimage is re-compressing some of them.

Tobian
07-30-2014, 03:49 AM
Check out the Disney shaders, to see what I mean Gerardo, they do a much better 'specular' hit, and that is also reflection blur, as in a modern PBRT engine specular and reflection are handled the same, or should be. http://blog.selfshadow.com/publications/s2012-shading-course/ Thanks for weepul's post, I will check it out.

With regards to intensity, there's a number of factors.. Yes, physical 'bloom' also affects our perception, I totally agree, and wish LW had some more 'realistic' Fraunhoffer diffraction based lens effects, however, it's also the way in which even micro-blur materials should exhibit a 'halo' of light spread around the light hit which is almost never handled properly in most render engines. The only reason I don't do the under-light method is simply because I am often using more than one light/luminous object in a scene, so I would have to modify them all, and it severely reduces visual feedback in VPR etc. Sure I agree, as a pipeline thing, it's a solution though, you just have to modify all your lights. In any kind of realistic scenario though 'sun' light should be overpowering the scene, you then adjust the exposure/tonemapping, to suit, but yes, because of Lightwave's sampling issues with very bright pixels it's, probably best to do it your way, till we get a better sampling engine.

Not tried the volumetric lighting effect in DP's sunsky, sounds interesting, I may have to try it. I'd personally love a generalised 'medium' for Lightwave, but in the current render paradigm, that would be hideously prohibitive, in terms of speed :D

djwaterman
07-30-2014, 07:55 AM
Volumetric lights? You mean those lights for creating sun beams and stained glass window effects? Or some other kind of light I'm not aware of? And I want to know the correct way to use those DP Cook torrance C Light group node input for proper specular, like where does it feed into on a material, the correct outputs from the node and so on.

Tobian
07-30-2014, 11:56 AM
DJ, the 'materials' all have linked reflection blur and spec, which works well in conjunction, in terms of shape and softness, with a slightly modified version of the cook-torrence shader. The only downside with it is while the shape is correct, the intensity of the spec hit is far too low, which is why I just modify them, using the material tweaker.

Anyway here's the render of that tree, the model breaks down if you look at it, but I am pleased with how the shading looks. Better textures and leaves would make this better :)

Tracking back, I found the original thread I got it from http://forums.newtek.com/showthread.php?123357-Nodes-and-translucency-again/page4

gerardstrada
07-31-2014, 02:34 AM
Check out the Disney shaders, to see what I mean Gerardo
I had already seen those. They use different microfacet distribution than LW. Curious their metallic and specular reflections are driven by Schlick Fresnel like any other approach out there. What I find interesting in their approach is that everything is contained in a single shader/material and all consistent with energy conserving laws. That looks pretty handy.


they do a much better 'specular' hit
Yes, their specular distribution (GGX) trying to approximate chrome highlights is doing a good job, but I think we can do better by playing with the specular function:

http://s22.postimg.org/msyytdsbl/phong.jpg

This is the difference in more complex geometry:

http://s3.postimg.org/cf1v1g743/phong_test.jpg
Guess we could have more control over blurred reflections if it could be there a function input for the blur parameter. (?)


Thanks for weepul's post, I will check it out.
Indeed! it looks interesting.


With regards to intensity, there's a number of factors.. Yes, physical 'bloom' also affects our perception, I totally agree, and wish LW had some more 'realistic' Fraunhoffer diffraction based lens effects, however, it's also the way in which even micro-blur materials should exhibit a 'halo' of light spread around the light hit which is almost never handled properly in most render engines.

Just in case, I was referring to the effect produced by sunlight scattered in the atmosphere, not in the lens. I think it's a phenomena related with Mie scattering, which is solved with a different formula depending on the sky model we use in DP Sunsky.


The only reason I don't do the under-light method is simply because I am often using more than one light/luminous object in a scene, so I would have to modify them all, and it severely reduces visual feedback in VPR etc. Sure I agree, as a pipeline thing, it's a solution though, you just have to modify all your lights. In any kind of realistic scenario though 'sun' light should be overpowering the scene, you then adjust the exposure/tonemapping, to suit, but yes, because of Lightwave's sampling issues with very bright pixels it's, probably best to do it your way, till we get a better sampling engine.
If by "under-light method" you mean the no tonemap exposure method, I really encourage you to use it if you pursue a PBRT approach with Sunsky. Otherwise your shading solutions won't be physically plausible. Other lights in scene and VPR are not reason that prevents us to use it. Main reason is because we don't need to stop of using those. There are several ways to go in such case:

1. You can use an exposure card - which is bassically the same method used here (http://forums.newtek.com/showthread.php?136662-LightWave-and-Wide-Gamut-monitors&p=1337325&viewfull=1#post1337325) for proofing colors to monitor and preview in VPR. Instead of using SG_CCTools (or additionally) use DP Linear ToneMap Node.

2. Instead of using DP Sunsky Environment, add a Textured Environment, and within that, set up the Layer as Procedural Texture and pick the Node Editor. Within the Node Editor, Add a Color Layer, within this Color Layer, set Procedural Texture and pick Sunsky. Then Connect the Color Layer to DP Linear ToneMap and you are ready to go.

3. Instead of using DP Sunsky Environment, add a Textured Environment, and within that, set up the Layer as Procedural Texture and pick Sunsky. Adjust the Intensity of this layer opacity until you find the correct middle exposure.

With method 2 and 3 you don't need to change intensities of other lights if you are working in an old scene. It's possible also to tie the layer opacity and lights intensity to a MC and control the whole lighting with an slider.


Volumetric lights? You mean those lights for creating sun beams and stained glass window effects?

Not tried the volumetric lighting effect in DP's sunsky, sounds interesting, I may have to try it.
Yep. The volumetric lighting option (Sprite Mode) just adds one second to render time.


the 'materials' all have linked reflection blur and spec, which works well in conjunction, in terms of shape and softness, with a slightly modified version of the cook-torrence shader. The only downside with it is while the shape is correct, the intensity of the spec hit is far too low, which is why I just modify them, using the material tweaker.
Indeed. For some reason Cook-Torrance shader and specular shading in Materials are clamped. The curious thing is that specular and reflection in Materials don't follow the energy conservation laws. They sum up, which seems wrong since specular is a quick reflection fake, so they would have to be mixed (50%-50%) in order to output the correct reflectance value. So this adjustment needs to be taken into account when using db&w MaterialTweaker or TA's SplitMaterial or any other solution used to fine-tune the material.



Gerardo

Tobian
08-05-2014, 04:12 AM
That's a very attractive modification of Phong Gerardstrada, but it doesn't solve the issue of reflection sampling distribution, which really should marry together with the specular hotspot.

Alas the mie atmospheric scattering thing is only of certain use in very specific scenarios, and not really related to specular, or reflection, it just makes some renders look a bit more pretty... and I am doubtful it will always be so fast, depends on the complexity of the scene I suspect.

I do believe that there is no longer a clamp in the native cook-torrence, that was in an older version of LW, antti fixed that error throughout materials and the c-t shader.

I am not sure what you mean about an error with reflection + spec... Of course they should sum up?! 'specular' (lightwave language) is a reflection of an imaginary disk in the scene, and then softened according to a simplified model (phong, blinn, c-t etc) depending on the 'glossiness' or 'roughness' parameters. Reflection (which is just specular reflection) reflects the scene as is. Since the specular is reflecting an imaginary disk, which does not exist within the scene, it is added together with reflection. If you pair a light to a bounce-card or use an HDR then you don't need to use 'specular' because there is something to reflect... However, because of a flaw with the model for specular (in a pbrt context) with current LW specular is a little too weak to show correctly, on physically modelled surfaces, hence I boost it. LWG are aware of this and working on it. The other thing to note is that in the case of most HDR's they do not have enough f-stop exposures for the 'sun' (it's usually fine for artificial lights) as the sun is usually orders of magnitudes brighter than the sky: this is why HDR's of sunny skies often look way too blue (also because of a lack of multi-importance sampling to weight the solar disk more) because of a lack of intensity, and why 'specular' highlights from the solar disk look weak when only using HDR's in conjunction with PBRT materials (such as delta or car paint, used correctly) Hence why I also use a light and boost it's spec to help compensate for this.

spherical
08-05-2014, 04:34 PM
The other thing to note is that in the case of most HDR's they do not have enough f-stop exposures for the 'sun' (it's usually fine for artificial lights) as the sun is usually orders of magnitudes brighter than the sky: this is why HDR's of sunny skies often look way too blue (also because of a lack of multi-importance sampling to weight the solar disk more) because of a lack of intensity, and why 'specular' highlights from the solar disk look weak when only using HDR's in conjunction with PBRT materials (such as delta or car paint, used correctly) Hence why I also use a light and boost it's spec to help compensate for this.

Often wondered about this. Makes much more sense now. Thanks!

Tobian
08-05-2014, 06:16 PM
It's the catch 22 of using HDR's for environmental lighting.. If you had 'realistic' brightness levels, then most engines cannot cope properly with the contrast ratio of the solar hotspot, and you get huge noise issues for radiosity and reflection solutions, which sometimes never clean up properly... Multi-importance sampling is a very new-fangled trick but makes a huge difference in helping the engine put samples where they are needed, sort of like a global portal light :) Helps to stop the noise issues and allow for sharper shadows from pure HDR lighting... Bluring the HDR for the radiosity solution is the old-fi method of solving this, but this means you get very soft shadowing, if nicer 'fill' lighting from the dome, with less noise/blotch issues...

gerardstrada
08-06-2014, 05:23 PM
That's a very attractive modification of Phong Gerardstrada, but it doesn't solve the issue of reflection sampling distribution, which really should marry together with the specular hotspot.
Thanks, yes, that's why I said if blur parameter could have something like a function input, a similar approach could be used for reflections too. And seems it's somehow possible.

This is the normal reflection blur:

http://s4.postimg.org/ws04kspr1/normalblurtest.jpg

This is the modified reflection blur with blur:

http://s29.postimg.org/puzuxgfjr/modifiedblurtest.jpg

Normal reflection blur on a more complex model:

http://s8.postimg.org/rpb70idlx/normalblur.jpg

The modified reflection blur:

http://s30.postimg.org/j67k6czz5/modifiedblur2.jpg

modified reflection blur with incidence angle:

http://s29.postimg.org/bzjnfe8jb/modifiedblur1.jpg

We can use other criteria for the modifications as well.


Alas the mie atmospheric scattering thing is only of certain use in very specific scenarios, and not really related to specular, or reflection, it just makes some renders look a bit more pretty... and I am doubtful it will always be so fast, depends on the complexity of the scene I suspect.
Nope. When I said "I think it's a phenomena related with Mie scattering, which is solved with a different formula depending on the sky model we use in DP Sunsky." I was referring to the Glow parameter, not the Mie scattering itself, since the circumsolar ring is produced by Mie scattering and present (in varying degree) in any scenario where sun is there, and it's very related with the size of the reflected sun as shown in the previous samples where, without glow, the size of the sun disk is just a quarter, if not less.


I do believe that there is no longer a clamp in the native cook-torrence, that was in an older version of LW, antti fixed that error throughout materials and the c-t shader.
Sure! old bug.


I am not sure what you mean about an error with reflection + spec... Of course they should sum up?! 'specular' (lightwave language) is a reflection of an imaginary disk in the scene, and then softened according to a simplified model (phong, blinn, c-t etc) depending on the 'glossiness' or 'roughness' parameters. Reflection (which is just specular reflection) reflects the scene as is. Since the specular is reflecting an imaginary disk, which does not exist within the scene, it is added together with reflection. If you pair a light to a bounce-card or use an HDR then you don't need to use 'specular' because there is something to reflect... However, because of a flaw with the model for specular (in a pbrt context) with current LW specular is a little too weak to show correctly, on physically modeled surfaces, hence I boost it. LWG are aware of this and working on it.
From a flexibility point-of-view, I agree with you, but from the energy conservation laws point-of-view, the fact that reflection and specularity sum up, still seems wrong. Specularity (specular highlights) is by definition a faked reflection feature (it can be a disk, but also other shapes). These specular highlighs come from 3D lights which actually exist within the scene. We can even fake soft reflection with specularity by using IBL light rigs. Specularity is in fact a legacy feature to produce the visual appearance of specular reflections in times when ray traced reflections were not viable in 3D packages (soft reflections were even less viable). Then, as fake of "real" reflection, in a physically plausible context, it should not sum up, otherwise we should be adding reflactance component twice. The fact that specularity is faked reflection doesn't mean it should not behave in a plausible physically way. Not only by itself (as the energy conservation in the specular lobe shown before) but also when playing with other surface properties, like reflection, mainly in Materials context.

The mixture between specularity and reflection for faking some anisotropic effects in metals is not uncommon, since we can speed up render times (up to 32x) by diminishing the roughness in real reflections and increasing it in specular highlights, and results will be even smoother:

http://s30.postimg.org/cdhb4blsx/mixedrefspec.jpg

Guess a checkbox that ties or unties specularity and reflections could be useful depending on the case.


The other thing to note is that in the case of most HDR's they do not have enough f-stop exposures for the 'sun' (it's usually fine for artificial lights) as the sun is usually orders of magnitudes brighter than the sky: this is why HDR's of sunny skies often look way too blue (also because of a lack of multi-importance sampling to weight the solar disk more) because of a lack of intensity, and why 'specular' highlights from the solar disk look weak when only using HDR's in conjunction with PBRT materials (such as delta or car paint, used correctly) Hence why I also use a light and boost it's spec to help compensate for this.
In such case the addition of reflection and specularity is totally justified. If the sun-light covers the missing luminance in both diffuse (ambient) and specular (reflection), values for specular highlights are physically correct. If an overcompensation is necessary in your case, could be due to the specular model used.



Gerardo

mewnow
05-01-2017, 04:25 AM
Yes, their specular distribution (GGX) trying to approximate chrome highlights is doing a good job, but I think we can do better by playing with the specular function:

http://s22.postimg.org/msyytdsbl/phong.jpg

This is the difference in more complex geometry:

http://s3.postimg.org/cf1v1g743/phong_test.jpg
Guess we could have more control over blurred reflections if it could be there a function input for the blur parameter. (?)


The re-modeled phong looks great, does it consistent with energy conserving laws? Did you do that with a single specular shader?

I tried to play with the specular function with a single specular shader, but don't get a good spread of the specular highlight, how do you do that?




Thanks, yes, that's why I said if blur parameter could have something like a function input, a similar approach could be used for reflections too. And seems it's somehow possible.

This is the normal reflection blur:

http://s4.postimg.org/ws04kspr1/normalblurtest.jpg

This is the modified reflection blur with blur:

http://s29.postimg.org/puzuxgfjr/modifiedblurtest.jpg

Normal reflection blur on a more complex model:

http://s8.postimg.org/rpb70idlx/normalblur.jpg

The modified reflection blur:

http://s30.postimg.org/j67k6czz5/modifiedblur2.jpg

modified reflection blur with incidence angle:

http://s29.postimg.org/bzjnfe8jb/modifiedblur1.jpg

Also, thers is not a function input in reflection shader, how do you re-modeled the reflection blur?

gar26lw
10-06-2017, 06:41 PM
I too would be interested in setups