PDA

View Full Version : Reflection blur realism



Tobian
12-07-2009, 08:52 AM
One of the biggest problems with using blurry reflections in LW (all versions) is they don't work correctly at glancing angles. This problem is magnified if you work in a linear workflow.

My mate did up these images as an example.. the standard reflections give a horrible bloated look, whereas if you use the old 'microbump' trick the reflections work correctly. The problem is microbump takes a LOT longer to smooth out properly (AA has to be set to ridiculous levels to refine it).

Pomm's Gaussian reflection blur node comes close to doing these types of reflection properly, but it doesn't quite work (the normals become flipped sometimes, reflecting light from weird places).

Anyone else notice this flaw before? It would be nice if they gave us a realistic reflection sampling method (can't be as slow as microbump! :D) or a reflection shader nodally which could do it. Maybe in Core? :)

IRML
12-07-2009, 08:54 AM
Maybe in Core? :)FAILURE

we wants it now tehbian, NOW!

I can't believe more people haven't complained about this tbh, I mean look how bloody awfull the standard reflections are

jameswillmott
12-07-2009, 09:22 AM
Nice catch, fog that one right away.

Tobian
12-07-2009, 10:11 AM
The weird thing is it sort of works correctly if you have a non-biassed anisotropy reflection shader, but as you get closer to glancing angles it does really weird things, like giving a strange double reflection.. So close, but not close enough! :D

Mike_RB
12-07-2009, 10:25 AM
The weird thing is it sort of works correctly if you have a non-biassed anisotropy reflection shader, but as you get closer to glancing angles it does really weird things, like giving a strange double reflection.. So close, but not close enough! :D

I would just drive the glossiness of the reflections with incidence. Solved.

Tobian
12-07-2009, 10:51 AM
I never said I did any such thing.. I am taking about a fixed angle reflection blur amount... Here take a look at this.. including a (very simple) sample scene, try it out yourself.

Ok and unbiassed anisotropy (set to linear 20 / 20) from a higher angle it looks great... lower the angle and URGHHH. If you move the centre of the effect it stops the double-reflection weirdness, but the reflection blur slopes, and it depends where you put it, so you;d have to alter your surface per render, which is stupid!

NOT SOLVED!

Mike_RB
12-07-2009, 11:04 AM
I am taking about a fixed angle reflection blur amount...

I'm saying that the angle of blur relates to the viewing angle of the surface. At glancing even blurry surface reflect mirror reflections. You can simulate this by driving the roughness/glossyness with incidence.

IRML
12-07-2009, 11:15 AM
that doesn't make much sense, at glancing angles the amount of reflection increases, so you would drive it with a fresnel incidence yes, but the roughness doesn't decrease, it stays the same, but if anything it appears to get higher if the reflections are done properly, as you can see it smears away from the surface far more at shallow angles

so you can't turn blurry reflections into sharp reflections to fix the problem, it would look strange

Mike_RB
12-07-2009, 11:32 AM
that doesn't make much sense, at glancing angles the amount of reflection increases, so you would drive it with a fresnel incidence yes, but the roughness doesn't decrease, it stays the same, but if anything it appears to get higher if the reflections are done properly, as you can see it smears away from the surface far more at shallow angles

so you can't turn blurry reflections into sharp reflections to fix the problem, it would look strange

Walk up to any eggshell finished painted white wall and stick your head right next to it and look down along it. All of a sudden the diffuse reflections of that big white wall get sharper and sharper the closer your viewing angle matches the glancing angle.

IRML
12-07-2009, 11:35 AM
I find it completely the other way around - stick your head next to the wall and they smear more and more (at least they appear to as there's less and less surface for them to reflect in)

you might be confusing the fact that you can see them more clearly at shallow angles with them getting sharper

jgatter
12-07-2009, 11:58 AM
I was able to get good results with the anso from all angles with these settings...

IRML
12-07-2009, 12:14 PM
yeah but what happens when you start using that on a curvy surface

Tobian
12-07-2009, 12:18 PM
Nope tried that setting.. does the same double reflection problem!

Actually making some progress with mike's incidence angle test: You're wrong about the glancing angle issue, but it actually seems to help with that bug, by lowering the value using a falloff gradient.. Continuing to investigate...

jgatter
12-07-2009, 12:20 PM
yeah but what happens when you start using that on a curvy surface

Dont know : )

Poms node works pretty good too... What problem are you having with that tobian? I have used it in a few scenes and haven't noticed any errors... how is it breaking?

IRML
12-07-2009, 12:23 PM
for me personally, using the node on complex models I've noticed reflections comming from places they just shouldn't be, so there's some sort of inaccuracy somewhere

but another reason I prefer not to use it is I'd rather get it done with native tools, as I always find things work out better that way

Tobian
12-07-2009, 12:26 PM
Yeah Pomms node seems to suffer from an issue whereby when the normal becomes too extreme, it flips, causing it to see reflections of objects which are on the other side of the scene.

jgatter, I tried those exact settings on an extreme low angle render, and I got the double reflection bug.. No idea why, I just did. Try out those settings with the plane at an extreme angle, and you will see them too...

jgatter
12-07-2009, 12:28 PM
for me personally, using the node on complex models I've noticed reflections comming from places they just shouldn't be, so there's some sort of inaccuracy somewhere

but another reason I prefer not to use it is I'd rather get it done with native tools, as I always find things work out better that way

Yeah... I agree. His node is ok, but it breaks the previews and no fprime. One from NT would be most welcome. I would think that this could be built in nodes...right?

jgatter
12-07-2009, 12:32 PM
Yeah Pomms node seems to suffer from an issue whereby when the normal becomes too extreme, it flips, causing it to see reflections of objects which are on the other side of the scene.

jgatter, I tried those exact settings on an extreme low angle render, and I got the double reflection bug.. No idea why, I just did. Try out those settings with the plane at an extreme angle, and you will see them too...

yep... below 50cm from the ground they show up. If you lower the U they go away though...but that still isnt ideal

IRML
12-07-2009, 12:36 PM
Yeah... I agree. His node is ok, but it breaks the previews and no fprime.the wierd thing is the first few passes in fprime render very well, then it fails after that, so surely it's not much of a stretch to get that fully working


One from NT would be most welcome.it certainly would, reflections are pretty fundamental, and it's hard to believe one of the supposed big hitters like lightwave can't do them properly, I hope someone from NT is reading this


I would think that this could be built in nodes...right?so far with all my experiments the best option is using microbumps, but as you can see from the renders in the first post they're very noisy and slow to render, I've been trying to get something to work with aniso reflections but so far it hasn't responded well enough in all situations to be a realistic replacement

Tobian
12-07-2009, 12:49 PM
Here's where I am at.. got an assortment of objects in the scene.. The aniso reflections render much smoother and only slightly slower (to get the noise of out that micrubump would probably increase the render x 10 :D) But there are things wrong... The reflections should smear down the whole object, and there's a slight perspective shift, caused by the anisotropy, which there shouldn't be. The anisotropy node is just SO close, but not quite working correctly.

jgatter
12-07-2009, 01:09 PM
It may be worth trying to tie the u/v to incidence angle...

Tobian
12-07-2009, 01:12 PM
Ok here's another test, this time using the gaussian reflections node, vanilla set to 20%

there's 2 problems with this... 1) there are mystery reflection smears which don't show up on either of the other 2 renders and 2) the other renders took about 3 minutes.. This took 20, and it's still grainy (same render settings)

Tobian
12-07-2009, 01:19 PM
It may be worth trying to tie the u/v to incidence angle...

I did, that's how I got the above render.... Without tying the UV to an incident angle, I get this..... Which is complete fail, with the double barrelled reflections and wide smearing.. albeit a LOT faster than Pomms nodes... Fast is no use if it's not accurate!

jgatter
12-07-2009, 01:26 PM
Also... You can plug the microbump into the reflection shader normal so it only effects the ref. I just tried that and it worked good. You can even use a combo of both blur and bump to try and smooth it out...

IRML
12-07-2009, 01:31 PM
You can even use a combo of both blur and bump to try and smooth it out...tried that already, it works in some situations but not all, it depends on the scale of things, but when it does work even as little as 0.1% blur will help smooth the reflections without ruining the shape of the smearing - at the cost of a bit extra render time, but not as much as it would be to get it smooth without the extra blur, just annoying it doesn't work at all scales

personally I prefer to leave the bump active on the diffuse as well as the reflections, because that way you simulate proper surface roughness - no need to mess with oren nayer nodes or the materails, and no need to worry about messing with your fresnel nodes

in fact if I could get away with a better reflection node I'd probably still leave the microbump active on everything else, because it's faster with these and the physical accuracy is much better than what you can do with LW materials

Tobian
12-07-2009, 01:31 PM
For contrast, here's the anisotropy set to 20% (the latter was 100) - you can see that it's right, except there's anomalous double layered reflections.. it's weird, it's a bug and it's annoying....

Yeah we have tried that.. it results in 2 issues. Microbump is inherently slow. LW is not so good at multisampling on the higher AA passes, so it can result in epic-slow renders, and 2) it initially seems to help, but using the reflection blur node's multisampling ultimatelly leads to yet longer render times, than without, and not any render speed up! :)

These are really simple scenes, without much recursion.. beyond this it can lead to horrible issues and slowness!

Marshun
12-07-2009, 01:40 PM
Some of these computerized pics seem questionable to me as realistic. Something isn't coming through. I'm gonna see if I can find two different metallic, or so, surfaces to snap pictures of to see how real things reflect and blur. It's raining now. Could use two different car bodies for that.

IRML
12-07-2009, 01:48 PM
I'd recommend something better than a car seeing how sharp they normally reflect

you say it's raining? if you've got a street lamp near you take a picture of the road surface facing towards it, that should work nicely

Marshun
12-07-2009, 02:01 PM
If one of the selections reflect too sharply I'll check to see if distance might remedy such. I'll be out-and-about shortly here. I want to see how real reflections show up. I've considered realism only with motion effects before this and I do think this a programmer's dilemma. You're doing the best with what you've got. Nothing like workarounds? Maybe a plugin.

Tobian
12-07-2009, 02:07 PM
I think you're missing the point. It's not that I have set up a realistic shader here.. it's the way in which light smears on low-incidence surfaces. Maybe it's because I live in britain.. but I am often walking down the road, when it's raining, and cars drive by... the reflections of the car headlights smear down the road a HUGE ammount, because I see the road in low incidence.. If you use an actual 'specular' shader, they smear correctly at low angles.. it's the reflection shaders which don't work properly The gaussian reflections node works the closest, but is still slightly broken.

IRML
12-07-2009, 02:17 PM
You're doing the best with what you've got. Nothing like workarounds? Maybe a plugin.really the best workaround is moving to XSI or something

I've got a mate who uses vray, and the amount of crap I have to do to get a render looking as good as his does by default is ridiculous

bad reflections.... no linear colour space.... two of many fundamental things that have left me quite disillusioned with LW

jgatter
12-07-2009, 02:29 PM
really the best workaround is moving to XSI or something

I've got a mate who uses vray, and the amount of crap I have to do to get a render looking as good as his does by default is ridiculous

bad reflections.... no linear colour space.... two of many fundamental things that have left me quite disillusioned with LW

I agree... NT has no quality control. They build a tool and stick it in the program if it works or not. It is getting verrrrry old!!! It up to the users to find bugs in the program. If not many people really test it... you get a reflection shader that works wrong...bake camera that doesn't work properly... The list goes on and on!

Tobian
12-07-2009, 02:38 PM
Thing is, in a way I don't mind... This isn't something you immediately always notice in renders.. It's just in these special circumstances. If they created a special 'better reflections' node and put that in, and it was a bit slower, Or there was a render switch, which used a different but slower and more accurate reflection shading, people could then choose.

Using the anisotropic or regular reflections node, and comparing them with the gaussian reflections, there's a HUGE speed difference. They are quite fast and efficient, (though they could aways be faster!) The anisotropic node almost works too, but it's just... odd, for this context (not actually being used for anisotropy)

jgatter
12-07-2009, 02:58 PM
This may be worth looking at

http://www2.informatik.hu-berlin.de/~goetsch/AmbOccNode/

Tobian
12-07-2009, 03:03 PM
Tried it, it fails, it's exactly the same as the LW reflections.

jgatter
12-07-2009, 03:11 PM
Tried it, it fails, it's exactly the same as the LW reflections.

Yeah... I just found that out. I do think that the effect is a type of anisotropy due to surface imperfection...

Tobian
12-07-2009, 03:15 PM
Yes, which is why I think the anisotropy node is so close, it just has the weird artefacts. Anisotropy is caused by micronoise along U stretching out reflections along V.. I think this effect is caused by a facet of the same thing, since perspective will squash the turbulence of an object, making it wider than it is high towards the vanishing point, thus causing the same effect... Exactly how this is achieved in a shader I sadly have no idea haha :)

jgatter
12-07-2009, 03:19 PM
Yes, which is why I think the anisotropy node is so close, it just has the weird artefacts. Anisotropy is caused by micronoise along U stretching out reflections along V.. I think this effect is caused by a facet of the same thing, since perspective will squash the turbulence of an object, making it wider than it is high towards the vanishing point, thus causing the same effect... Exactly how this is achieved in a shader I sadly have no idea haha :)


Pom knows... Lets hope he reads this thread and gets an urge to improve his node.

Marshun
12-07-2009, 05:30 PM
Hey it's raining here. Think I'll go walk into some traffic ;)


I think you're missing the point. It's not that I have set up a realistic shader here.. it's the way in which light smears on low-incidence surfaces. Maybe it's because I live in britain.. but I am often walking down the road, when it's raining, and cars drive by... the reflections of the car headlights smear down the road a HUGE ammount, because I see the road in low incidence.. If you use an actual 'specular' shader, they smear correctly at low angles.. it's the reflection shaders which don't work properly The gaussian reflections node works the closest, but is still slightly broken. I think your first impression of my response is correct. Do those headlight "smears" change, a bit or a lot, one from another? I'd think maybe getting an even better control on physically manipulating the softwares are in need for this problem. If anyone could come up with a plugin that could do this MAYBE you'd get better, or closer to being the best, results.

Even though I'm late here are some pics I took regarding my understanding of those prior software results:

obviously these are the results using an ordinary 150 watt light bulb at 7 feet distance on a finished wooden table:

Tobian
12-07-2009, 05:40 PM
The thing is the main thing you see there is the umbra and penumbra of the shadow of the object. That isn't an issue, as LW shadows work reliably and fine for the most part. However the parts of the reflection where you can see it smear smears accross the surface towards the observer. If you were to do that with conventional LW reflection blur you would get little fat blobs.. see the first images. Because the surface has perterbation it's hard to separate out the diffuse and specular reflection there, but then that's part of why microbumps work properly, as they affect the whole surface, not just reflections.. it's just sometimes you have to accept compromise, as using them adds tonnes to the render times (10x as long). Also, how bright the object being reflected is affects how long the smear is: As with the example we gave, car headlights are REALLY bright compared to wet roads at night, and a road surface is VERY rough, so the smear is quite long!

IRML
12-07-2009, 05:52 PM
hmm yeah it's hard to separate shadow from reflection with those images

Marshun
12-07-2009, 06:05 PM
The thing is the main thing you see there is the umbra and penumbra of the shadow of the object. That isn't an issue, as LW shadows work reliably and fine for the most part. However the parts of the reflection where you can see it smear smears accross the surface towards the observer. If you were to do that with conventional LW reflection blur you would get little fat blobs.. see the first images. Because the surface has perterbation it's hard to separate out the diffuse and specular reflection there, but then that's part of why microbumps work properly, as they affect the whole surface, not just reflections.. it's just sometimes you have to accept compromise, as using them adds tonnes to the render times (10x as long). Also, how bright the object being reflected is affects how long the smear is: As with the example we gave, car headlights are REALLY bright compared to wet roads at night, and a road surface is VERY rough, so the smear is quite long!

Yes, bright and glaring. I've always considered myself as one using the hobbyist approach as I won't try to get things as realistic as possible. I mean we got cameras for that. I'll just wind up testing one slight interface tool-change a bit at a time to see what I get. Even nodes that aren't designed to each other will alter pics ... from time to time. If the result is all over the place and I think it looks neat I'll keep it. Otherwise, realism is in a different camp until I'm better. This here is good for learning what a single software format is capable of, C++ or not. Nonending. I'm gonna keep this in mind as I go from one to the other.

Oh one thing, you sound like you've done some astronomy, optics, and/or spectroscopy. Something with "light". Interesting :)

"Light" is a major contributor to imaging along with shading and texturing. All of which I have a lot to get familiar with. I hope you get what you're looking for, Tobian.

Tobian
12-07-2009, 07:09 PM
I do have a big interest in astronomy, but yes as a student of 3D rendering you become an expert of technical terms and learn to truly observe what light should be doing: and that's why I know these reflection blurs are wrong, because I can observe they are not doing as they should. Most surfaces you will ever need are simply those which reflect light, both diffuse reflection and specular reflection. In LW diffuse reflection is handled by lights, and by radiosity, both of which work as they should, if sometimes blotchy, but specular reflections are a bit of a let down :(

Marshun
12-07-2009, 07:51 PM
I do have a big interest in astronomy, but yes as a student of 3D rendering you become an expert of technical terms and learn to truly observe what light should be doing: and that's why I know these reflection blurs are wrong, because I can observe they are not doing as they should. Most surfaces you will ever need are simply those which reflect light, both diffuse reflection and specular reflection. In LW diffuse reflection is handled by lights, and by radiosity, both of which work as they should, if sometimes blotchy, but specular reflections are a bit of a let down :(

It can be a problem when you're getting more and more technical. Well, a problem of sorts, as it were. While watching the movie UP all I could do was go "...that could have been better ... that too ... oh that was terrible...". My friend was telling me to shut up. Be technical, then stand away from yourself ... from time to time (I must tell myself). I'm not that good technically with softwares but I'll get technical. What'll happen to me when I do get further on down the road?? Gasp... I think it's exciting though... :thumbsup:

adk
12-08-2009, 07:56 PM
... not sure if this is close to what you're looking for Tobian but I took a few hints out of all the things posted & found Pom's Gaussian Reflections seemed to work best (to my untrained eye anyway) but with a slight tweak. There's still a hint of that distortion but not as extreme as in your renders, they smear quite ok from both cam angles & no double reflections.

Apologies for the quick & dirty cam match :D

adk

Tobian
12-08-2009, 08:03 PM
Yeah pomms node is the most accurate, though in my example took more than 5x as long to render, and had weird bonus reflections showing up (with more scene complexity you see more of them!) The gradient method just isn't realistic. It helped to fix the double-reflection wierdness of the aniso node, but it looks wrong. Feeding a gradient into the Gaussian node like that just makes it look similar to the aniso trick, which sadly is physically wrong :(

adk
12-08-2009, 08:29 PM
... actually on much closer inspection of your pics I see one issue on mine that's not right - they don't smear away from the camera :foreheads

I don't get those bonus reflections however that show up in yours ? Could be the scene / glancing angle combinations.

... I tried layering the effect but that took so long that it's definitely a no go zone. And excuse my nodal understanding / setups as I still consider myself a nodal newbie. I like them tho :)

gerardstrada
12-09-2009, 08:08 PM
Before you go to buy those expensive workarounds (XSI or 3DMax + Vray or...), you might want to consider a bit cheaper option:

Same LW Ani-Reflections node:

http://imagic.ddgenvivo.tv/forums/srwa.png
...and almost same render time.

The workaround:

http://imagic.ddgenvivo.tv/forums/srwaconfig.png

There's a similar problem related with Normals and Cook-Torrance specular model - and solution is the same. Hope it gets solved in the next LW release.

Btw1, we can speed up render times for micro-bumps by taking advantage of the mBlur trick.
Btw2, there's other way to solve blurred reflections in post. Even within LW (DP_FNE).
Btw3, for the guy that says LW have no linear color space (?!) LW indeed works in linear space. It's not automated, but hey! consider there are problems with fixed gamma corrections too. If you want to try the classic linear workflow in LW, give it a try to the SG_CCTools - it works with simple gamma corrections, but it works also with real color spaces, not only gamma toys like other 'workarounds' :D plus, you get automatic gamma correction for picked colors with any gamma exponent, sRGB or Rec709. plus, it's free http://forums.cgsociety.org/images/smilies/smile.gif



Gerardo

Tobian
12-09-2009, 08:28 PM
Out of curiosity Gerardo, what scalar value did you use? I had to use quite a high scalar on the very low angle, but then if you flip to a high angle, the blur is quite weak, so you'd again have to drive it by a gradient to work right... which makes the thing work wrong. Also, the smear shouldn't clip at the z depth of the object it's reflecting, which is exactly what happens with the gradient trick we tried earlier, so it's still wrong. Also I found that if you increased the U/V values, the double reflections came back, prompting an even higher scalar value. Annoying! :)

gerardstrada
12-09-2009, 09:01 PM
None of those problems here with more cenithal or glazing angles. If I remember well, I used a value of 3. The multiplicative value should be adjusted according to the U/V values at the more glazing angle. U/V values are not a problem since these are commonly fixed values. Similar thing happens with Cook-Torrance node (http://www.newtek.com/forums/showpost.php?p=903644&postcount=22), where we need to adjust the multiplicative value according to the specular intensity (again, not a problem since this is commonly a fixed value). It's not a perfect solution, I know. It's a workaround. a cheaper one at least http://forums.cgsociety.org/images/smilies/smile.gif



Gerardo

gerardstrada
12-10-2009, 02:31 AM
Just in case the blur appears too short in zenithal angles, this is an enhanced setup:

http://imagic.ddgenvivo.tv/forums/srwaconfig2.png
What we are doing there is correcting the normals in the angles range that it's needed only (from about 45). Scalar range goes from 3.5 for the most glazing angle (0) to 1.0 for a zenithal angle (45). After 45 everything works well.

http://imagic.ddgenvivo.tv/forums/anisotesty.gif



Gerardo

Tobian
12-10-2009, 04:10 AM
That looks pretty gerardo, but as it approaches facing the blur should be spreading out more. If you disable that node setup from the normal you will see what I mean. Maybe by flattening out that gradient to add nothing on facing angles?

IRML
12-10-2009, 05:31 AM
Btw3, for the guy that says LW have no linear color space (?!) LW indeed works in linear space. It's not automated, but hey! consider there are problems with fixed gamma corrections too. If you want to try the classic linear workflow in LW, give it a try to the SG_CCTools - it works with simple gamma corrections, but it works also with real color spaces, not only gamma toys like other 'workarounds' :D plus, you get automatic gamma correction for picked colors with any gamma exponent, sRGB or Rec709. plus, it's free http://forums.cgsociety.org/images/smilies/smile.gifsure it has linear colour space, but only for those who understand it well enough to do it manually, there's a ton of LW users getting poor renders because they simply don't know about it

and then you can't antialiase at the output gamma, so you get really dodgy renders unless you put it up high

I consider this a bug, not a missing feature, I think it should be included 9.6.1 seeing as it's already been implemented for the HC build

I'm interested in this speeding up of microbumps with motion blur, because I've tried some motion blur tricks on it and I found it no different, maybe you know something I don't?

jameswillmott
12-10-2009, 06:27 AM
Ok, I've done some nodal work. Here's what I'm pretty sure is going on.

To calculate the reflection angle off a specular surface, you use dot product between the incoming ray and the normal ray... [some more maths] ... which gives you an outgoing ray.

You have to perturb this outgoing ray to get blurry reflections, yes?

No. That's the problem.

If you perturb the outgoing ray you get fuzzy balls in your reflections. You need to perturb the normal before applying it to the reflection calculation. Obvious when you think about it but when I tried making a nodeflow for fuzzy reflections I got it wrong the first time too.

Thanks guys for showing what's wrong, now we have the solution.

Attached is the corrected nodeflow in an object and some sample images. the third image perturbs the outgoing ray so you can see it looks the same as LW's result.

It uses microbumps for the blurriness, but you have to use motion blur with it.

IRML
12-10-2009, 06:37 AM
I see some turbulence in there, is this basically a complicated microbump trick? or do you get the speed increases of the standard blurry reflections?

the problem with the micobump is you don't get the multisampling that standard reflections have, and without that it's really slow to refine, if you've overcome that then this is the most genius post I've ever read on these forums

*edit* - sorry I've just seen you've amended your post

jameswillmott
12-10-2009, 06:43 AM
I see some turbulence in there, is this basically a complicated microbump trick? or do you get the speed increases of the standard blurry reflections?

the problem with the micobump is you don't get the multisampling that standard reflections have, and without that it's really slow to refine, if you've overcome that then this is the most genius post I've ever read on these forums

It uses microbumps for the blurriness, yes, just a bumptrick; you have to use motion blur with it to get multisampling. No genius here. ( A 'Random" node would probably work nicely though... )

The main thrust of the post was to demonstrate why LW's reflections are blobby, rather than to provide a workaround for them...

IRML
12-10-2009, 06:58 AM
ah ok fair enough

Tobian
12-10-2009, 07:21 AM
Ahhhh right this makes sense too, because the anisotropy node does exactly that, it's just it's doing.... anisotropy :D not standard blurry reflections! :) Well now at least we know why it's not working! :D

Dpont has a random node.. it has a min/max value too, which you could use as the input value for blur amount.

gerardstrada
12-10-2009, 02:56 PM
That looks pretty gerardo, but as it approaches facing the blur should be spreading out more. If you disable that node setup from the normal you will see what I mean. Maybe by flattening out that gradient to add nothing on facing angles?

3.5 is the value for the more glazing angle. Less than that doesn't look good. At least is preferable this result:

http://imagic.ddgenvivo.tv/forums/sr1.png
Which works good in animations

Than this one:
http://imagic.ddgenvivo.tv/forums/sr2.png


sure it has linear colour space, but only for those who understand it well enough to do it manually, there's a ton of LW users getting poor renders because they simply don't know about it

Yes, an automated linear workflow would be great, but even in that way, any user - from any package - should know how to do it manually, since currently, all automated tools for this purpose work with a fixed gamma value. If we don't know the principles behind it, what would we do if for example we need to integrate a CG element with an HDTV footage correctly? Results would be wrong with a fixed gamma value in that case (and in several others). Guess this knowledge is necessary even with an automated tool.


and then you can't antialiase at the output gamma, so you get really dodgy renders unless you put it up high
Sure, this needs to be corrected, but there's a workaround... where we gamma correct the render at pixel level before AA is applied, after that we linearize again to apply other optical effects. It doesn't work with AS though.


I consider this a bug, not a missing feature, I think it should be included 9.6.1 seeing as it's already been implemented for the HC build
Yes, the aniso problem is a bug, the same as the Cook-Torrance issue. Hope it gets solved in the next release.


I'm interested in this speeding up of microbumps with motion blur, because I've tried some motion blur tricks on it and I found it no different, maybe you know something I don't?
Idea is basically to move the micro-procedural texture to get a softer result in the same render time. AA settings will probably need to be re-adjusted, too. There's an old post about something like this here (http://www.spinquad.com/forums/showthread.php?t=7003).


It uses microbumps for the blurriness, yes, just a bumptrick; you have to use motion blur with it to get multisampling. No genius here. ( A 'Random" node would probably work nicely though... )

The main thrust of the post was to demonstrate why LW's reflections are blobby, rather than to provide a workaround for them...
Interesting reverse engineering of LW tools, James :thumbsup: Guess that if we'd want to avoid the mblur trick, we could use a Random node in micro-procedural position input and a Pom's Take Samples node at the end of your nodal network.



Gerardo

Marshun
12-10-2009, 03:01 PM
First one's got that one by a long shot...

Tobian
12-10-2009, 04:19 PM
Gerardo, can you show how you'd build that shader please.. (the take sample one) I didn't have much success with my aniso nodes in animation, they smear all over the place for me! and the value seems to be related only to that value of anisotropy.. increase the size and you need to increase the number, and it's not an inteligable number relationship that I can see!

gerardstrada
12-10-2009, 06:29 PM
A simple setup could be something like this:

http://imagic.ddgenvivo.tv/forums/MCTSconfig.png

We can adjust the samples value according to our AA settings.

Nice thing is different micro-procedurals provide different results:

http://imagic.ddgenvivo.tv/forums/microprecedurals.gif



Gerardo

Tobian
12-10-2009, 06:55 PM
Haha I was just experimenting, and that's more or less the setup I had :D Just had a look at POmms manual, and I figured it out myself, no idea what all those extra functions do :D

Tobian
12-11-2009, 01:45 PM
I suspected as much, but I thought I would put this node tree into use.. It's probably slowed down by the use of a reflection node, even though reflection blur is not in use, so I could try James' setup, but my experience is the more nodes you add to a shader in a complex scene, the more bogged down it gets..

Anyway here's a swatch of an interior environment which has a LOT of reflection blur, so it's slow to render as it is, and not especially smooth... So I added the node tree to the brushed metal surface, and hit render... and gave up after 20 mins :D That render looked like it would take about 400 years to complete, for a tiny little region render.. So yeah back to LW's blobby inaccurate but at least not glacially slow reflection blurs for the time being! :D

gerardstrada
12-12-2009, 04:11 PM
Just in case, consider the micro-procedural texture needs to be very tiny (100um-10um or even less) to get a softer finishing, and the random value needs to be very low (0.001 or so). Consider also the Use Bump option in GI panel could increase the render time with the micro-procedural trick.

You might want to try also with the enhanced workaround posted previously (http://www.newtek.com/forums/showpost.php?p=958153&postcount=51), it should give you a similar time than your faster render time.



Gerardo

Tobian
12-12-2009, 06:34 PM
Ok.. I had both the scale and the movement of the texture to be tiny, and the random value also very small, and only 15% bump on the turbulence..... and I also had 'use bump' disabled. I could try and tweak the settings more but it was looking to be epic slow...

I tried your workaround, but I found depending on the amount of blur you needed different values in your scalar, and it was quite a variable amount, that I would have to experiment per-surface, which is a bit laboriously slow... Also some experiments I did with the aniso-node and it did quite anisotropic things, even if you used it non-biassed, which is a bit of a problem, when you don't want it too!

gerardstrada
12-13-2009, 06:22 PM
Well, it's difficult to say why the radiosity calc is taking so much time in your particular scene, but other way is by using the previous node setup (the take samples one) but without the Takes Samples node, decreasing the AA settings and applying a denoiser node setup to the reflection buffer (DP_IFNE). This could be solved in a comp. app as well.

About the workaround, yes, 3.5 works well to fix an anisotropic value of 20% but we need to increase this value in the first parameter of the gradient if we increase the U/V percentage.



Gerardo

Captain Obvious
12-13-2009, 08:03 PM
In order for the multisample reflection technique to render quickly, I recommend using the spot info node to figure out...

A) if the incoming ray is a 'sampled' ray, and...
B) which recursion level the incoming ray is

Basically, reduce the number of samples in the 'use samples' node based on the two above point. Otherwise, if you have a 'use samples' node with 100 samples reflecting off all rays onto the same material, you end up having to trace 10 000 rays even with just two levels of recursion, for a single pixel. And one million*rays with three levels. It increases exponentially, and so does your rendering times. So you need to limit the number of samples.


Also, the reason the radiosity is taking so long to calculate is because it also has to calculate as many reflection rays as 'use samples' is telling it to. D'oh! If you also reduce the number of samples based on whether or not it's during the prepass, you increase performance further.

Tobian
12-14-2009, 05:27 AM
Capitain obvious... I already aggressively optimise my reflections, using the spot node, by clamping the recursions and stopping them after N rays, I am aware of the child-rays issue in LW.. none of that helped LOL, though I do have to say that the spot-node ray-stopping trick is limited, because while you can tell it to stop after the first bounce, if you have the material behind glass, as it is in that scene, then you have to have at least 3 spot's which again is too unacceptably high.

How do you stop a material multi-sampling during a prepass? I never quite got how to stack logic nodes like that?

gerardstrada
12-14-2009, 04:27 PM
Have you tried by connecting the sampling optimization in the samples input of Take Samples node? Though I don't think the finishing would be the same.



Gerardo

Captain Obvious
12-14-2009, 06:11 PM
How do you stop a material multi-sampling during a prepass? I never quite got how to stack logic nodes like that?
Basically like this:

edit:

Have you tried by connecting the sampling optimization in the samples input of Take Samples node? Though I don't think the finishing would be the same.
Yes, that's basically what I'd recommend. Reduce the samples based on the incoming.

Tobian
12-14-2009, 06:14 PM
Now my head hurts :D

Tobian
12-14-2009, 06:42 PM
Seriously though, can you do a quick sample scene with that in operation, so I can get what's it's doing? :)

Captain Obvious
12-15-2009, 03:52 AM
Actually, now that I think about it... You only need one of those logic nodes! The output for everything except "Bounces" is a boolean, anyway — true or false, 0 or 1. So you only need the logic node for the recursion level. The other three you can plug straight into "Max" nodes.

Exception
01-17-2010, 03:52 PM
Has a dev been pointed to this thread?
Seems like there's a lot of room for improvement in the built in shading model for this...

Tobian
01-17-2010, 05:16 PM
Yes, and it's been fozzbugged too :)

dpont
02-03-2010, 08:19 AM
I added a Reflection node shader in the x32 version of DP Kit,
"Blur" is calculated by bending normal before bounced reflection,
this is of course slower than bending the reflected ray,
this node has also a "Glancing Stretch" parameter for accentuation of
stretching blur at glancing angles.
Not fully tested yet.
http://pagesperso-orange.fr/dpont/plugins/nodes/Additionnal_Nodes_2.html

Denis.

Tobian
02-03-2010, 08:28 AM
WOAH Awesome Denis, I shall have a look at it! :)

jameswillmott
02-03-2010, 08:38 AM
Beautiful Denis, looks pretty good.

Gregg "T.Rex"
02-03-2010, 09:45 AM
this is of course slower than bending the reflected ray...

Not that slower and it's looking perfectly accurate!
Thanks so much, Denis...

T.Rex

Tobian
02-03-2010, 09:58 AM
Denis, is it possible to include a ray depth parameter (for per surface ray recursion) and a reflection blur depth parameter?

I can still use my node trick(As discussed here http://www.lightwiki.com/Optimising_Reflection_blur) using a spot node, but the problems with using a spot node is it's calculated from the camera, not the surface, so if, for example, you see a blurry surface through a transparent one, you have to up the depth, for the whole surface, which causes the render time to spike again. That and more nodes in a surface always slow it down :)

Tobian
02-03-2010, 10:22 AM
Actually also, and this is probably ridiculously complex to implement, as NT hasn't, but I notice that if you enable blurry reflections (the standard one, not a reflection node) then the radiosity pre-pass doesn't calculate reflection blurs, it sets them to off, which makes the radiosity calculate faster, and doesn't visually affect the final render (it might if you were calculating 'montecarlo' caustics, [bi-direction light transport] but then I rarely do!). It could also help to speed up the render time by a lot!

Your samples also don't seem to map to LW one's (the LW one's are an abstract number, but I know what they 'mean' now :)). The 'Glancing stretch' is also defaulted to 50% - is that a good default or should it be 100% Or is that just a 'to taste' thing ? :)

dpont
02-03-2010, 10:22 AM
In this reflection node, blur amount is decreased
approximatly by 2 at each bounce.
Preprocess blur has one sample,
don't know what the best for sampled rays.

Denis.

Tobian
02-03-2010, 10:39 AM
Oh dear, something is going horribly wrong :D

The reflection node is on the walls and floor of that render, and it's at about 10% blur, with the default 50% stretching and the standard 27 samples.

The render size was 1280 x 1024, but that is just a small 10% sized region render of part of it, and as you can see the render time was jumping through to infinity :D That would take about 30 mins with standard reflections.

dpont
02-03-2010, 10:57 AM
as I said above, sampled ray was fully evaluated,
I updated the x32 version,
saampled rays samples are now decreased
(divided) by 3.
So Blur amount is reduced for bounces,
Samples number reduced for sampled rays and preprocess.

I think that more reduction stuff is not
something to do in the node itself, the depth
of the ray is not looking the same with
various focales. There are a lot of things
to tweak only for specific content.


Denis.

Captain Obvious
02-03-2010, 11:29 AM
Actually also, and this is probably ridiculously complex to implement, as NT hasn't, but I notice that if you enable blurry reflections (the standard one, not a reflection node) then the radiosity pre-pass doesn't calculate reflection blurs, it sets them to off, which makes the radiosity calculate faster, and doesn't visually affect the final render (it might if you were calculating 'montecarlo' caustics, [bi-direction light transport] but then I rarely do!). It could also help to speed up the render time by a lot!

Should be a snap. If prepass = 1, then blur samples = 1.

Tobian
02-03-2010, 01:56 PM
Trying the new version, but it seems a little unstable, it crashed layout twice when I added it - oops :) Trying with the 1 setting, see if it happens in a realistic timeframe.

Tobian
02-03-2010, 04:25 PM
Ok this took just over an hour, so not that fast, but not terrible. Could you lower the ray quality again, as this was set to '1' it seems a little bit too silky smooth for the lowest possible quality setting haha :)

Tobian
02-05-2010, 06:02 AM
Been doing a couple of tests, and I noticed something quite odd. If you increase the 'glancing stretch' it actually decreases the effect, so maybe rename it? :) I was increasing it trying to get the smearing to be more pronounced, and it was having the opposite effect :D

Also - I've noticed in Modeler the preview doesn't seem to work, and sometimes doesn't in layout too, just giving you a 'black' preview.

gerardstrada
02-06-2010, 11:52 PM
Not that slower and it's looking perfectly accurate!
Thanks so much, Denis...

T.Rex

:agree:

http://imagic.ddgenvivo.tv/forums/DP_Reflection_test.jpg

Thank you, Denis! :thumbsup:



Gerardo

Captain Obvious
02-07-2010, 07:30 AM
Denis, seriously, you're awesome! I'll see if this works with Kray when I'm back at the office tomorrow. If there are issues, would you be willing to talk to Grzegorz about solving them? Most of the Kray users are arch viz artists, and soft reflections are quite important to us. This shader could definitely help out with realism! :)

Tobian
02-07-2010, 07:48 AM
Odd, I thought Kray already did realistic reflections? Renders I've seen seem to be doing the smearing thing correctly?

Captain Obvious
02-07-2010, 08:43 AM
Odd, I thought Kray already did realistic reflections? Renders I've seen seem to be doing the smearing thing correctly?
Nope. Kray's soft reflections don't look exactly the same as Lightwave's (unless you use a node-based shader), but it's still distorting the outgoing reflection vector, rather than the surface normal used to calculate said reflection vector.

Weepul
02-09-2010, 07:02 AM
> Unit weepul ...
> Standby ... ... ... reconfiguring.

Gosh, it's been a while.

I just thought I'd drop a couple insights.

Pom's Gaussian Blur node was made at my request and design, and uses largely the same principles as discussed in this thread - it disturbs the surface normal with a roughly gaussian distribution of random vectors and then calculates the reflection ray vector. And yes, just as you guys were thinking about doing, I prototyped the method using a node tree with Pom's Take Samples node... :)

I'm not sure what reflection problems you guys are seeing, although there was a problem with rays being sent into the surface with large blur amounts and shallow viewing angles, and I don't remember if I ever sent him the fix for that. :o (Also, he hasn't posted since about a year ago...but then, neither have I!)

Gerard, could you render another version of that scene using Pom's Gaussian Blur? I'm curious to see how it holds up.

Cheers to Denis for another awesome and flexible node, BTW.

P.S. Gerard, thanks for pointing out that hack to get aniso and Cook-Torrance to behave. I'd also been vexed by its clipped highlights. Who'd have thought?

Tobian
02-09-2010, 07:23 AM
Yeah that's the one Weepul, it seems to often take samples from seemingly random places, most likely from the normal becoming flipped, from my tests and observations. The Gaussian node is the closest we previously came, but it only works properly in 'simple' scenes, and breaks in complex ones.

The 'take samples' node method was REALLY slow in complex recursion scenes, so it's good to see that the gaussian node is at least faster, shame he couldn't fix the bugs :)

Captain Obvious
02-09-2010, 07:46 AM
P.S. Gerard, thanks for pointing out that hack to get aniso and Cook-Torrance to behave. I'd also been vexed by its clipped highlights. Who'd have thought?
Wait, I must've missed this! How?

Weepul
02-09-2010, 08:11 AM
Wait, I must've missed this! How?

Here (http://newtek.com/forums/showpost.php?p=958055&postcount=48) (aniso) and here (http://www.newtek.com/forums/showpost.php?p=903644&postcount=22) (Cook-Torrance). He said he used a scalar of about 3. BTW, I've figured out the right correction for the scalar value - the multiplier for the normal raised to a power of 3. The scalar can then be arbitrarily high (100 should probably be more than enough.)

Captain Obvious
02-09-2010, 08:39 AM
Here (http://newtek.com/forums/showpost.php?p=958055&postcount=48) (aniso) and here (http://www.newtek.com/forums/showpost.php?p=903644&postcount=22) (Cook-Torrance). He said he used a scalar of about 3. BTW, I've figured out the right correction for the scalar value - the multiplier for the normal raised to a power of 3. The scalar can then be arbitrarily high (100 should probably be more than enough.)
Huh, weird.

Tobian
02-09-2010, 08:55 AM
This is where grouped nodes would come in really handy, so you could just package that lot up into a neat group, with a texture and spec and glossiness input and a spec shader output :)

gerardstrada
02-10-2010, 12:27 AM
Weepul, this is a test with Pom's Gaussian Reflections by trying to approximate the same grade of diffused reflection below the furniture area:

http://imagic.ddgenvivo.tv/forums/PGR1.jpg

To approximate the area of curtains reflection, I used an incidence angle gradient into Blur parameter.


http://imagic.ddgenvivo.tv/forums/PGR2.jpg

I just 'talked' with Pomfried the last week, it seems he's doing very well! Hope he has some time to improve even more his tools and develop some new ones.

Thanks also for sharing the right correction for the scalar value and for suggesting and designing so useful tools.



Gerardo

Tobian
02-10-2010, 05:56 AM
What did you put the incidence angle gradient in there for? Looks quite similar, but As we said it causes the normal flipping problem.

Great to hear Pomm is talking about improving his nodes and back again! :)

That trick with Cook Torrence would probably also work with 'Materials' too, though I am not that fussed a I usually prefer to mix up my own these days :)

gerardstrada
02-10-2010, 11:15 AM
Idea was to get more sharper reflections in grazing angles. Maybe difference is more notorious with an animgif:

http://imagic.ddgenvivo.tv/forums/PGRcomparison.gif

Just to clarify, I said (let's) hope he has some time to improve even more his tools and develop some new ones, but Pomfried has not talked about this.

Btw, Michael Wolf's Material Blender is able to override any shading of a given material with an input FG shading, so we can indeed have more control over the specular/reflection shading in that way, too.



Gerardo

Tobian
02-10-2010, 11:19 AM
True, but if you know how to build an energy conserving shader, it's fairly pointless to use the materials, as using systems like the materials mixer REALLY slows down rendering, and materials are generally slower than using built shaders with the same data.

gerardstrada
02-10-2010, 11:55 AM
Guess it depends on the material and shaders setups (node setups for realistic carpaint shaders can be slower than the material solution), but the slows down rendering you are referring with material blenders are commonly due to duplicated evaluations of a value connected to a node input. To prevent it, we may use the new db&w's Cache node.

The usage of a customized energy-conserving shader can be advantageous by depending on lighting setup as well, since energy-conserving shaders doesn't take into account the paradigm ambience lighting/diffuse lighting-reflection/specular shading. In such cases, a starting point for an energy conserving shader could be something like this (http://www.newtek.com/forums/showpost.php?p=902706&postcount=24).



Gerardo

Tobian
02-10-2010, 12:14 PM
Well making the exact same shader using standard shaders renders faster than the 'material' equivalent, the only exception being if you use the interpolated reflections/refractions as they are faster; but since this is a thread about ditching LW standard reflections, that's fairly moot :D I also happen to like the results of the dielectric material, as recreating a beers-law absorbtion is faffy at best (though I wish it had a depth parameter to help scale the absorbtion to your model). When I routinely do renders which take 3+ hours on this poor computer any time saving is VITAL!

I'd be interested in your thoughts on reproducing the Oren-Nayer / 'rough' Diffuse falloff gradient effect in such a similar method, as Oren-Nayer doesn't work with radiosity-based lighting at all. Currently the only solution is to just use a microbump, but it's not ideal! :D (huge render time hog again!)

Gregg "T.Rex"
02-10-2010, 04:25 PM
Speaking on building manually an energy conserving shader...

Can anyone (Gerardo? :) ) share some node tips on how to create multiple reflections on a single shader, which i can control independently of each other? For example, one soft heavily blurred reflection, a "clear-coat" type colored reflection and another one, crisp for capturing strong HDRI's highlights...

Cheers....

Tobian
02-10-2010, 06:20 PM
Ok here's a (very) quick and dirty example of how you'd do that..

Now normally you should leave your reflection shader 'untainted' by the fresnel, and put that in the 'reflection input'.

However, when you are making a 'brdf' where you are mixing several layers of reflection, make your reflection 100% and make use of the tint reflection function of reflections. Make your 'base' paint by multiplying your base colour and your Fresnel value of the metallic underpaint. then use a mixer node to use another Fresnel value, to mask in the 'gloss' coat, a low gloss, 100% reflective and low blur reflection shader. Feed that lot into the Reflection shader input.

The trick then is to do the exact inverse for the Diffuse channel.. invert your paint Fresnel, then, again, mask your 'gloss coat' Fresnel onto it, and feed that into your diffuse input.

If you want 'sprinkles' Use a combination of normal noise in the 'paint' layer (a normal input only into that shader, not the global shading), and some masked Fresnel inputs mixed with the main paint Fresnel, using the same technique. Always remember that your 'gloss coat' Shader has to override the paint layer shader, so on glancing angles you shouldn't see the sprinkles as strongly, because of the Fresnel masking.

I did such a shader a while back
http://www.presetcentral.com/preset/419/

Probably needs tweeking, but it's set up with sprinkles, a metalic paint layer, and a gloss coat, and in Linear Colour Space...

The attached example is a bit simpler, and using Dponts new node! :D

(edited)

Here's the original thread on Spinquad where I was testing out the shader, using a friend's model. The Sprinkles are really subtle, but they are there! :D http://www.spinquad.com/forums/showthread.php?t=26240

Gregg "T.Rex"
02-10-2010, 08:49 PM
I fear my brain is getting old...
I was messing with incoming rays, sampled rays, equations, bending normals and all the "easy" stuff and obviously i was missing the one simple node that saves the day; Mixer... :foreheads
Sometimes the solution is right under our nose and still we can't see it...:D

Tobian, thanks! :beerchug:

Tobian
02-10-2010, 08:57 PM
Hehe, no problem :) Yeah in the past i did things additively, or with complex maths, but sometimes the simplest solution is the best, and especially when you are working in Linear mode, 'cheats' show up like neon hehe. It's why you need to be careful with 'old-fi' tricks and tips with modern 'realistic' shading methods. :)

gerardstrada
02-10-2010, 09:50 PM
Well making the exact same shader using standard shaders renders faster than the 'material' equivalent, the only exception being if you use the interpolated reflections/refractions as they are faster; but since this is a thread about ditching LW standard reflections, that's fairly moot :D I also happen to like the results of the dielectric material, as recreating a beers-law absorbtion is faffy at best (though I wish it had a depth parameter to help scale the absorbtion to your model). When I routinely do renders which take 3+ hours on this poor computer any time saving is VITAL!

I'd be interested in your thoughts on reproducing the Oren-Nayer / 'rough' Diffuse falloff gradient effect in such a similar method, as Oren-Nayer doesn't work with radiosity-based lighting at all. Currently the only solution is to just use a microbump, but it's not ideal! :D (huge render time hog again!)

Yes, for simple materials, standard node shaders are faster, but some multilayering materials/mixes with material blenders can be faster than node shaders only (without even considering interpolated reflections/refractions). A curious thing is that the linked node setup (http://www.newtek.com/forums/showpost.php?p=902706&postcount=24) has no equivalent as material. The classic concept for a material is to suppose there's no connection between specular shading and reflection shading or between diffuse lighting and ambience lighting or there's no option of these to co-exist. But most of the times (mainly with IBL solutions) that's not the case. We mix ambience lighting (HDRI) and diffuse lighting (CG lights), or specular shading (faster cheat) and reflection shading (RT/Backdrop).
Guess that an energy-conserving shader node that takes this lighting paradigm into account would be useful. But that's off-topic http://forums.cgsociety.org/images/smilies/smile.gif

As for your inquiry about reproducing the Oren-Nayar shading, (that's even more off-topic), I recently shared in HDRI3D magazine a way to easily re-model the Lambert shading to accurately approximate any other diffuse shading model. It could be useful for DP_Shadows node, or DP_LightGroup node, or MW_Single_Light_Lambert or any other node that uses a lambertian model. However it works only with diffuse lighting. For ambient lighting there are some other ways, but the most practical one that I've found so far for GI is to use an incidence angle gradient and a Gamma Function to approximate a given diffuse model. The basic concept would be like this:

http://imagic.ddgenvivo.tv/forums/OrenNayar/ORNconcept.png

Though a Warp Function can be used too, the above way offers a more similar result. Based on that, we can easily add a node setup to adjust the strength of our customized OrenNayar shading as we do with the native OrenNayar node, by packing all in a Pom's Group node and using it as any other diffuse shading model.

A single light can be used to adjust the proper values. We only need to make this once. It can be really quite similar:

http://imagic.ddgenvivo.tv/forums/OrenNayar/ONDS.gif

This is how it behaves with Global Illumination:

http://imagic.ddgenvivo.tv/forums/OrenNayar/ONGI.gif

Other diffuse shading models can be approximated in the same way.



I fear my brain is getting old...
Gregg, I don't think your brain is getting old if what you initially asked was to be able to control each reflection shading independently (what implies their intensities too) by keeping the energy-conserving principle among them and also between diffuse shading. That's indeed not so simple as one could think at first sight. http://forums.cgsociety.org/images/smilies/smile.gif



Gerardo

Gregg "T.Rex"
02-11-2010, 06:58 AM
Gregg, I don't think your brain is getting old if what you initially asked was to be able to control each reflection shading independently (what implies their intensities too) by keeping the energy-conserving principle among them and also between diffuse shading. That's indeed not so simple as one could think at first sight. http://forums.cgsociety.org/images/smilies/smile.gif
Gerardo

Yes, that's what i'm trying to figure out eventually, though the "mixer" node concept had slipped from my mind at all... :bangwall:

I really enjoyed reading your article on latest HDRI, Gerardo. :thumbsup:
What a monster article was that!

Cheers....

Tobian
02-11-2010, 08:36 AM
Well it's my thread so i can take it off topic if I like :p Anyway 'diffuse' is a form of reflected light :D

That's quite a good approximation, I had wondered if there was a more, you know, scientific approach hehe, but for a visually similar hack it's good :D Functions are indeed very cool!

Without using the mixer node you would simply have used the same logic, and could for a more unified approach: Subtract the gloss-coat Fresnel from the paint Fresnel and mix that output with the paint colour to derive the Paint reflection. Likewise use the gloss Fresnel to colour-tint the 'gloss' reflection shader, and then 'add' both reflection shaders together (using a vector add, to mix 3 colours) and put that in reflection. Much the same effect.

gerardstrada
02-11-2010, 02:31 PM
Yes, that's what i'm trying to figure out eventually, though the "mixer" node concept had slipped from my mind at all... :bangwall:

I really enjoyed reading your article on latest HDRI, Gerardo. :thumbsup:
What a monster article was that!

Cheers....

Gregg, yes, the usage of Mixer node indeed helps to mix two Reflection shaders in normal mode (which doesn't sum values but replace them), but if I understand correctly what you want to achieve, it wouldn't help to adjust the intensities of the three shaders individually by keeping inversely proportional relationships among them. Keeping inversely proporcional relantionships between two values are relatively simple (with an Inverse node), but things get complicated with a third value that should be inversely proportional with the other two - at the same time. If I understand well, all three should have inversely proportional values and this proportion it's not static but dynamic, that is to say, we need to be able to adjust any of them, at any time, and keep the energy-conserving principle among them. Am I getting this right? Wondering if it would be better to adjust the value of a shader by affecting its proportion relationship among the other 2 shaders equally, or if it would be better if we could adjust the relationship of the other two individually as well.

Btw, I enjoyed your Real World Production Series a lot. They have been really helpful and interesting. Looking forward to your next article! :beerchug:



Well it's my thread so i can take it off topic if I like Anyway 'diffuse' is a form of reflected light

That's quite a good approximation, I had wondered if there was a more, you know, scientific approach hehe, but for a visually similar hack it's good Functions are indeed very cool!

Without using the mixer node you would simply have used the same logic, and could for a more unified approach: Subtract the gloss-coat Fresnel from the paint Fresnel and mix that output with the paint colour to derive the Paint reflection. Likewise use the gloss Fresnel to colour-tint the 'gloss' reflection shader, and then 'add' both reflection shaders together (using a vector add, to mix 3 colours) and put that in reflection. Much the same effect.


Ok. considering diffuse as a form of reflected light we are still on-topic :D

As for a more 'cientific approach', you could use a graphic representation (http://upload.wikimedia.org/wikipedia/commons/1/16/Oren-nayar-vase4.jpg) to guide your calcs in similar way it can be done with fresnel effect (http://www.newtek.com/forums/showpost.php?p=763397&postcount=17).

But even when a cientific base is necessary for developers of generic diffuse models, let's consider these diffuse models are assumptions, approximations, predictions, replicas, generalizations of the roughness of a surface. The OrenNayar equation is even specified by using a probability function for the distribution of facet slopes (which is assummed to be lambertian). So in this context, we might approximate more accuratelly a real surface roughness with an incident angle gradient and a Gamma/Bias Function than with the fixed OrenNayar solution. In fact, I've been able to approximate a real middle-gray ball with this hack more accuratelly that with OrenNayar model below a IBL lights rig. This is just because real materials have not roughness distributed evenly. So we have further control with this method in the same way that we have further control with incidence angle gradients over fresnel shaders. As long as you have your LCS workflow and CM workflow set up properly, relax and enjoy the hacks :D



Gerardo

Matt
02-13-2010, 05:25 PM
Whoah, just read through this thread. Just when you think you know a reasonable amount, a thread like this comes along and makes you feel really stupid!

I just don't understand all this 'ray' talk, I see the options in the Spot Info node and other third party nodes, but have no idea how to utilise them!

Tobian
02-13-2010, 06:19 PM
A 'spot' is simply the intersect of a ray being fired from the camera with the evaluating surface. If you have radiosity or reflection then the rays can be modified by a spot based on it's number. So say you wanted to desaturate a radiosity solution, you could feed a gradient into a 'hue saturation' input of a colour node, and use the 'bounces' as an input to the gradient. Have position 0 (the first ray hit) be 1, and position 2 be 0.5, so then all bounced rays beyond the first seen by the camera, will only have 50% saturation. That's how I did my reflection blur technique.

I wish I understood half of it, I don't :D

Mr Rid
02-13-2010, 06:24 PM
A 'spot' is simply the intersect of a ray being fired ...

...eyes begin to glaze over...


...camera with the evaluating surface....rays can be modified by a spot based on it's number....feed a gradient...use the 'bounces' as input... position 0 be 1, and position 2 be 0.5, so then all bounced rays beyond the first seen by the camera,...



8~ Somebody make a big, brightly colored 'BLUR' button already.

Tobian
02-13-2010, 06:30 PM
Well it feels nice to know something you don't... I've seen some stuff you do that I would have no idea how to do :D

There are those who could explain it better than me, and I barely know it, just enough to do a few tricks :D There's probably a dozen uses I've never thought up yet :D

Mr Rid
02-13-2010, 06:35 PM
Well it feels nice to know something you don't... I've seen some stuff you do that I would have no idea how to do :D

There are those who could explain it better than me, and I barely know it, just enough to do a few tricks :D There's probably a dozen uses I've never thought up yet :D

You are explaining it fine. I am just turning into an old dog. My brain does not get anything about nodes, math, scripts, or tech explanations. Gimme a steering wheel and an accelerator, I could care less what's under the hood or 'why' it goes. I dont care to experiment with stringing a spiderweb of node pipes everywhere trying to vary blur. I need big buttons to push. I just wanna see things pop and zing across my monitor.

Tobian
02-13-2010, 06:40 PM
Oh totally, most tools I use because they have a 'visual' logic.. once it becomes high-maths or programming logic then my brain becomes crossed and implodes. That's why I do like nodes, because once you get the visual flow of what is doing what where, it is quick and simple to do complex things, that you would either need to do a) loads of programming or b) dozens of layers per channel.

That's part of the problem. I can conceptualise it in a visual sense, so I can do it. it's just hard trying to explain it 'words' :D More pictures as examples would help probably :D

Matt
02-13-2010, 08:44 PM
You know what would be great, if someone could run through the Spot Info (and similar) terminology, and explain in English what they mean, and where they sit in the whole calculation process, preferably with nice diagrams too!

:)

Okay, I'll do the diagrams if someone can explain it to me!

probiner
02-13-2010, 08:46 PM
Okay, I'll do the diagrams if someone can explain it to me!

Hooraahh! :D

Matt
02-13-2010, 08:52 PM
Hooraahh! :D

This has nothing to do with it, but something like this for these more technical nodes would be awesome!

Captain Obvious
02-13-2010, 09:06 PM
Maybe one of these days I'll rebuild my Cook Torrance specular node shading network. It was effectively THIS formulae (http://en.wikipedia.org/wiki/Specular_highlight#Cook.E2.80.93Torrance_model). Unfortunately, because there is no node where you can just enter an equation, it took a good 40 nodes to represent the whole thing.

serge
02-14-2010, 06:47 AM
You know what would be great, if someone could run through the Spot Info (and similar) terminology, and explain in English what they mean, and where they sit in the whole calculation process, preferably with nice diagrams too!

:)

Okay, I'll do the diagrams if someone can explain it to me!
Not sure if you've seen this, but Weepul put an explanation of the Spot Info node on Lightwiki (http://www.lightwiki.com/More_Spot_Info_Info).

It helped me a great deal in understanding the basics.

And it seems that Weepul is back (he posted a few pages back), so perhaps he's willing to help you making those diagrams.

3dWannabe
03-04-2010, 07:17 PM
:agree:

http://imagic.ddgenvivo.tv/forums/DP_Reflection_test.jpg

Thank you, Denis! :thumbsup:

Gerardo

Any chance of posting the node setup to get that reflection?

I've installed DP_Reflection and hooked up some inputs (as shown in included image), but there's really no method to my madness as I don't understand what goes where and why?

I didn't see any examples in the DP examples file?

Tobian
03-04-2010, 07:49 PM
What on earth are you trying to do there?! :D

You just need a simple dielectric energy conserving flow like this (not sure how Gerrardo did the wood floor, texture or procedural) but in terms of reflection bluriness.. Err just put in a value into the blurriness amount... solved :D That's the POINT of the shader, it should do it properly automatically, and you can ignore the stretch setting, it's kind of weird in that the more you add the less smeary it gets? :D

3dWannabe
03-04-2010, 08:42 PM
Tobian - I was able to duplicate your setup, except I couldn't find Planks (but did find Panks2d).

I didn't know the values for Planks or fresnel, but I put a refraction index into fresnel of 1.5 and set the colors of Planks to black, and duplicated your values for the reflection.

I've got a black floor - and using your technique (that you discarded for DP_Reflection) I was able to get a very nice blurred reflection.

Using this new DP_Reflection setup, I don't get any reflection and the render time is at least 4x.

So - I'm obviously making some obvious and stupid mistake?

Tobian
03-05-2010, 04:51 AM
Sorry that's a Dpont texture, part of Rman collection. http://pagesperso-orange.fr/dpont/plugins/Textures.htm

Yes I used a Fresnel value of 1.5

As to a getting no reflections? HUH? No idea, works fine for me, sorry, and yes, it is slow, hence I lower the samples to 9, or even as low as 1, depending on the scene. Sure my other techniques will yield blurry reflections... but they will be 'wrong'. If you're happy with wrong then go for it :D

You could maybe send me the file and I can mess with it? I can't see anything obviously wrong?

gerardstrada
03-05-2010, 07:49 AM
Any chance of posting the node setup to get that reflection?

I've installed DP_Reflection and hooked up some inputs (as shown in included image), but there's really no method to my madness as I don't understand what goes where and why?

I didn't see any examples in the DP examples file?

Yep. Setup is similar to Tobian's. I converted the bump output with DP_Bump Normal node and plugged it into Normal input of DP_Reflections. You need something to reflect, btw.



Gerardo

Tobian
03-05-2010, 08:04 AM
Yeah I wasn't sure if he meant the preview didn't work, but then I notice it doesn't which is a bit of a shame, it used too in the first beta version :) But he said he'd test rendered it. Could be it's broken again. I will do a quick test :)

Tobian
03-05-2010, 10:01 AM
Ok here's the DP and LW reflections side by side...

With a quick and dirty wood texture courtesy of DP's planks node, and set up in LCS, for realistic lighting... I put a dome light up top, just to give a bit more light to the scene, as otherwise it was a bit dull :D Both are set to 80% blur...

The LW reflections have a much wider spread, and slightly shorter, more apparent the further from the source they are. The DP reflections and smearing down and not nearly as wide, which is much more realistic.. That said both versions do look nice, but from experience, the LW one's will not look very good under a lot of circumstances.

3dWannabe
03-05-2010, 10:51 AM
Sorry that's a Dpont texture, part of Rman collection. http://pagesperso-orange.fr/dpont/plugins/Textures.htm

Yes I used a Fresnel value of 1.5

As to a getting no reflections? HUH? No idea, works fine for me, sorry, and yes, it is slow, hence I lower the samples to 9, or even as low as 1, depending on the scene. Sure my other techniques will yield blurry reflections... but they will be 'wrong'. If you're happy with wrong then go for it :D

You could maybe send me the file and I can mess with it? I can't see anything obviously wrong?

Tobian - Here are two scene files, one using your original method (reflection_old.lws), and one using DP_Reflection (reflection_new.lws).

I just changed the nodes for the paraliso surface for reflection_new.lws)

While creating these tests, I noticed that the reflections for DP_Reflection are WORKING - but ... they are a lot dimmer.

I'd like to be able to make them brighter, and figure a way to cut down the render time.

The render time increased from 1:19 to 7:28 per frame, which seems a bit much?

I included 3 images for render times.

Thanks for your help, I think I'm on the path to figuring this out!

Tobian
03-05-2010, 02:12 PM
Ok there's a whole lot of issues in that scene...

1) You're using classic camera, which for heavy ray work is usually slower. use perspective or other advanced cameras.

2) You have 3 area lights...

3) You have 3 area lights... Just thought I'd say that again :p

4) Using a Fresnel of 1.5 will only create correctly bright reflections if you are working in a Linear Gamma Workflow... Which is a whole other kettle of fish to explain :D

5) You had your ray recursions set to 16.. Ok nothing much was recusring, but that never helps :D You also have a whole lot of things like raytrace refractions on, which didn't need to be in that scene.

5) the higher your blur, the slower it is.. you had it set to 80, like I did, but that is quite a high value. Lowering that, and your samples will speed things up.

Here's the render with some optimisations, and converted to linear workflow, so the reflections work right. There's also an old reflections version too, so you can compare. Both took about 4-5 mins on my system, though the LW reflection shader is faster...

That's a pretty weird looking scene! :D

3dWannabe
03-05-2010, 02:20 PM
Ok there's a whole lot of issues in that scene...

1) You're using classic camera, which for heavy ray work is usually slower. use perspective or other advanced cameras.

2) You have 3 area lights...

3) You have 3 area lights... Just thought I'd say that again :p

4) Using a Fresnel of 1.5 will only create correctly bright reflections if you are working in a Linear Gamma Workflow... Which is a whole other kettle of fish to explain :D

5) You had your ray recursions set to 16.. Ok nothing much was recusring, but that never helps :D You also have a whole lot of things like raytrace refractions on, which didn't need to be in that scene.

5) the higher your blur, the slower it is.. you had it set to 80, like I did, but that is quite a high value. Lowering that, and your samples will speed things up.

Here's the render with some optimisations, and converted to linear workflow, so the reflections work right. There's also an old reflections version too, so you can compare. Both took about 4-5 mins on my system, though the LW reflection shader is faster...

That's a pretty weird looking scene! :D

Thanks for your detailed analysis!

Yeah, I've got a lot to learn, but it almost looks interesting when the frog's tongue nearly hits my dancing fairy [ not included in the scene].

Any chance of uploading a zip so that I can look at all the optimizations you did?

Tobian
03-05-2010, 02:29 PM
Sure, but I added DB&W's simple colour corrector, which you may not have ...

and you probably won't get some of the changes I made if you don't do LCS :)

3dWannabe
03-05-2010, 02:43 PM
Tobian - thanks so much! If it's something you use - I should probably buy it!

Now I've got to dig into finding out about linear workflows, testing HDRI radiosity lighting, etc.

The rabbit hole keeps getting deeper and deeper!

Onward thru the fog ....

Tobian
03-05-2010, 02:46 PM
Nope, http://www.db-w.com/content/view/137/ Very cool set of tools by DB&W, for free! :)

have fun with the fog!

Tobian
03-05-2010, 02:52 PM
Ramped up the AA on that test pic I did.. shame I can't figure out how to make the grain bumpy on the procedural :) But with a lot more AA this came out silky smooth at not huge orders of magnitude slower hehe, doubled the render time :)

Worth it! :)

3dWannabe
03-05-2010, 08:53 PM
Nope, http://www.db-w.com/content/view/137/ Very cool set of tools by DB&W, for free! :)

have fun with the fog!

I was able to render your scene modification and noticed that fprime no longer matches the render (fprime is now much darker), but everything renders much faster (changing the camera type seemed to be most important).

Do I lose fprime functionality if I use your linear workflow?

Tobian
03-05-2010, 09:10 PM
Yeah, Fprime isn't capable of matching the gamma adjusted Lightwave render, unfortunately, though, if you save out the image in a 32bpp format, (such as EXR) and open it in Photoshop (or similar) you will find it looks correct (and likewise the LW one is way too bright, and it's gamma has to be brought back down).

LW could really use a display gamma adjustment (and I believe does in the LWHC edition) though again, I suspect this won't adjust Fprime either.

I apply the simple colour correcter in the pixel filter stage, so that the image is anitaliased in 2.2 (native) gamma space, because LW doesn't correctly AA 1.0 gamma renders. This does cause some issues, such as exr's being saved out as 2.2 gamma images, but for testing and display purposes in the LW viewport, it looks good, and it's easy enough to apply a 0.4545 gamma in Photoshop. (If you save them out in 8bpp mode, then you can leave them just as they are :))

erikals
03-05-2010, 09:11 PM
Ramped up the AA on that test pic I did.. shame I can't figure out how to make the grain bumpy on the procedural :) But with a lot more AA this came out silky smooth at not huge orders of magnitude slower hehe, doubled the render time :)

Worth it! :)

smooth! but what's the render time ?

Tobian
03-05-2010, 09:13 PM
That was about 40 minutes, and the first renders were about 20. The thing is though, the scene doesn't have recursion, which is the killer, for reflection.

Captain Obvious
03-06-2010, 06:59 AM
I apply the simple colour correcter in the pixel filter stage, so that the image is anitaliased in 2.2 (native) gamma space, because LW doesn't correctly AA 1.0 gamma renders. This does cause some issues, such as exr's being saved out as 2.2 gamma images, but for testing and display purposes in the LW viewport, it looks good, and it's easy enough to apply a 0.4545 gamma in Photoshop. (If you save them out in 8bpp mode, then you can leave them just as they are :))
Another thing you can do is apply the gamma correction of 2.2 as a pixel filter, and then another one of 1/2.2 as an image filter, bringing back down to linear!

Tobian
03-06-2010, 07:06 AM
Yep, very true, but then sometimes you just want to view it in the LW viewer :D

3dWannabe
03-06-2010, 08:52 AM
Yeah, Fprime isn't capable of matching the gamma adjusted Lightwave render, unfortunately, though, if you save out the image in a 32bpp format, (such as EXR) and open it in Photoshop (or similar) you will find it looks correct (and likewise the LW one is way too bright, and it's gamma has to be brought back down).

LW could really use a display gamma adjustment (and I believe does in the LWHC edition) though again, I suspect this won't adjust Fprime either.

I apply the simple colour correcter in the pixel filter stage, so that the image is anitaliased in 2.2 (native) gamma space, because LW doesn't correctly AA 1.0 gamma renders. This does cause some issues, such as exr's being saved out as 2.2 gamma images, but for testing and display purposes in the LW viewport, it looks good, and it's easy enough to apply a 0.4545 gamma in Photoshop. (If you save them out in 8bpp mode, then you can leave them just as they are :))

Would it be possible for Fprime to add a gamma input field to their real-time render display so that it could be 'corrected' to look like something close to the final output - or am I missing something very basic?

Tobian
03-06-2010, 08:54 AM
Yes it would be possible, of course it's possible.. but not without Worley doing it, as Fprime doesn't support LW filters etc :)

Captain Obvious
03-06-2010, 11:09 AM
Yep, very true, but then sometimes you just want to view it in the LW viewer :D
Mm, ain't that the truth. I think modo does a decent good job with it: display-independent gamma. Basically, even though the images that are rendered are saved in linear, they can be displayed in whatever gamma you want. If it applied to the OpenGL viewports and such as well, it would be even better. I'd love to see something like that in LW at some point.

Intuition
03-06-2010, 11:36 AM
I was able to render your scene modification and noticed that fprime no longer matches the render (fprime is now much darker), but everything renders much faster (changing the camera type seemed to be most important).

Do I lose fprime functionality if I use your linear workflow?

Well, just that F-Prime is displaying in 1.0 gamma all the time so it will not see the new colorspace in LWF. Would be nice if worley implemented it.

3dWannabe
03-06-2010, 11:47 AM
Well, just that F-Prime is displaying in 1.0 gamma all the time so it will not see the new colorspace in LWF. Would be nice if worley implemented it.

I sent him a request earlier today.

Might be nice if a few folks who really understand the issues linked him also?

Mattoo
03-06-2010, 04:01 PM
Sorry, I haven't read the entire discussion here, but you can use G2 Master Control to add 2.2 gamma for previewing in FPrime.

I just turn it off for final renders to EXR.

Captain Obvious
03-06-2010, 04:57 PM
Sorry, I haven't read the entire discussion here, but you can use G2 Master Control to add 2.2 gamma for previewing in FPrime.

I just turn it off for final renders to EXR.

Which is a great solution if you have G2, but I'm not particularly interested in spending that kind of money just for such a limited feature set. Most of the shading features in G2 are not really necessary for me anyway, what with nodal shading...

edit: Matt, by the way, do you still have the same mobile number as before?

Mattoo
03-06-2010, 05:34 PM
Which is a great solution if you have G2, but I'm not particularly interested in spending that kind of money just for such a limited feature set. Most of the shading features in G2 are not really necessary for me anyway, what with nodal shading...

edit: Matt, by the way, do you still have the same mobile number as before?

You still hitting your head against that node limit eh? A nasty business that. I have no time for nodes with this sort of work, G2 smooths over the Lightwave bumps for me.

Yeah, my number's still the same, I'd say give me a call but I'm up to my eyeballs right now... optimistic deadlines etc!! :cursin:

IRML
03-06-2010, 05:54 PM
yeah I'd also like to see a gamma option with fprime

3dWannabe
03-06-2010, 06:43 PM
Is there any way to add gamma using nodes for fprime display, where it could be disabled or set to another value for final render?

Worley did respond with:

"Our G2 tool ( http://www.worley.com/E/Products/g2/g2.html ) does image correction (including 4-channel gamma). It renders and interactively previews inside of FPrime as well."

But I'm just now learning to use fprime, and seem to be having some issues with it on 9.6.1 - so I'm not very anxious to buy more tools at this moment.

But it certainly would impress me if they would add that for a user request, and could certainly point me in the direction of buying more if I thought they were continuing to develop and quickly respond to user requests [I have no reason to think they are not, they did reply quickly].

Captain Obvious
03-07-2010, 03:41 AM
You still hitting your head against that node limit eh? A nasty business that. I have no time for nodes with this sort of work, G2 smooths over the Lightwave bumps for me.

Yeah, my number's still the same, I'd say give me a call but I'm up to my eyeballs right now... optimistic deadlines etc!! :cursin:
No time for nodes, no time for telephones? :D

I never hit the node limit anymore. I never need to build *that* complex shaders at Cityscape. I've made a few fake reflection shaders and sometimes I add AO, but that's pretty much it...

Tartiflette
03-07-2010, 07:41 AM
I never hit the node limit anymore. I never need to build *that* complex shaders at Cityscape. I've made a few fake reflection shaders and sometimes I add AO, but that's pretty much it...
Hehe, the Digi-Guys madness is long gone now ? :D
So you're back to Cityscape ? Archviz renders are cool and more "predictable", i guess ! ;)
And you also don't have to endure Philippe's moqueries anymore, so that's a win/win situation ! :dance:


Cheers,
Laurent aka Tartiflette :)

Captain Obvious
03-07-2010, 09:35 AM
And you also don't have to endure Philippe's moqueries anymore, so that's a win/win situation !
Except when we go clubbing, and he's whining about the poor quality of the wine! :D

I'm sort of back at Cityscape. I'm freelancing for them, but it's been pretty much full time work for a couple of months now.

Tartiflette
03-07-2010, 12:25 PM
Except when we go clubbing, and he's whining about the poor quality of the wine! :D
Why doesn't that surprise me ? :D

I'm sort of back at Cityscape. I'm freelancing for them, but it's been pretty much full time work for a couple of months now.
It's the same old story : full time freelance ! ;)


Cheers,
Laurent aka Tartiflette :)

gerardstrada
03-08-2010, 12:58 PM
Is there any way to add gamma using nodes for fprime display, where it could be disabled or set to another value for final render?

Worley did respond with:

"Our G2 tool ( http://www.worley.com/E/Products/g2/g2.html ) does image correction (including 4-channel gamma). It renders and interactively previews inside of FPrime as well."

But I'm just now learning to use fprime, and seem to be having some issues with it on 9.6.1 - so I'm not very anxious to buy more tools at this moment.

But it certainly would impress me if they would add that for a user request, and could certainly point me in the direction of buying more if I thought they were continuing to develop and quickly respond to user requests [I have no reason to think they are not, they did reply quickly].

The G2 setup for a 2.2 gamma correction is not so obvious at first sight since you need to compensate the gamma value with its brightness value.

A cheaper way you might want to try with FPrime is to place a card in front of your camera (0% diffuse, 100% luminosity) and connect a Refraction Node to a Gamma corrector node and this output to Color channel. Then, enable Raytrace Refraction in order to make it "transparent". It works like a way of a camera filter for gamma correction and should be removed before rendering. If I remember well, this trick was posted by Red_Oddity some time ago.



Gerardo

3dWannabe
03-08-2010, 01:33 PM
The G2 setup for a 2.2 gamma correction is not so obvious at first sight since you need to compensate the gamma value with its brightness value.

A cheaper way you might want to try with FPrime is to place a card in front of your camera (0% diffuse, 100% luminosity) and connect a Refraction Node to a Gamma corrector node and this output to Color channel. Then, enable Raytrace Refraction in order to make it "transparent". It works like a way of a camera filter for gamma correction and should be removed before rendering. If I remember well, this trick was posted by Red_Oddity some time ago.

Gerardo
Wow - to butcher a quote from Jerry Maquire, you lost me at 'cheaper'!

But, your instructions sound clear - so I'll give it a try.

In the gamma correction node, I'd use a value of ?2.2 - or am I "de-gamma ing" the image.

I wish I'd gotten that very early issue of HDRI3D that went into this workflow a bit. I'm starting to understand from the generous tutorials and pdfs I found.

Could certainly be the basis for a new article, yes?

Captain Obvious
03-08-2010, 06:41 PM
A cheaper way you might want to try with FPrime is to place a card in front of your camera (0% diffuse, 100% luminosity) and connect a Refraction Node to a Gamma corrector node and this output to Color channel. Then, enable Raytrace Refraction in order to make it "transparent". It works like a way of a camera filter for gamma correction and should be removed before rendering. If I remember well, this trick was posted by Red_Oddity some time ago.
I've been doing that ever since FPrime 3 was out :p It does work, but... it's incredibly slow, and it breaks visibility options, compositing, etc. It's kind of useful as a quick preview, but little else.




In the gamma correction node, I'd use a value of ?2.2 - or am I "de-gamma ing" the image.
Use whichever gamma that your monitor is set to. Normally, this would be 2.2. Your monitor has a gamma*of 2.2, so you need to apply a gamma correction of 2.2 to bring it back up to linear.

Tobian
03-08-2010, 06:45 PM
Plus it also causes problems for any scenes which suffer from slowness due to recursion, so you've turned it down to a minimum :)

3dWannabe
03-08-2010, 06:54 PM
I've been doing that ever since FPrime 3 was out :p It does work, but... it's incredibly slow, and it breaks visibility options, compositing, etc. It's kind of useful as a quick preview, but little else.


So, in order to get fprime to work in linear (where the main function of fprime is a fast 'realtime' render), you have to make fprime 'incredibly slow'?

Wow - I really hope a few fprime users with a bit more experience under their belt than I have will pester them for a different solution than buying G2!

gerardstrada
03-09-2010, 03:49 PM
Wow - to butcher a quote from Jerry Maquire, you lost me at 'cheaper'!

But, your instructions sound clear - so I'll give it a try.

In the gamma correction node, I'd use a value of ?2.2 - or am I "de-gamma ing" the image.

I wish I'd gotten that very early issue of HDRI3D that went into this workflow a bit. I'm starting to understand from the generous tutorials and pdfs I found.

Could certainly be the basis for a new article, yes?

Yep, it would be 2.2 gamma correction. There are 2 articles covering the linear workflow in hDRI3D. One was an excellent insight written by Wes McDermott (Issue# 14) and the other that I wrote about 3 LCS workflows and a CM workflow (Issue# 18) which has the basis for the SG_CCTools article (Issue# 19). Guess I would have to update that article with an enhanced color flow :)


I've been doing that ever since FPrime 3 was out :p It does work, but... it's incredibly slow, and it breaks visibility options, compositing, etc. It's kind of useful as a quick preview, but little else.
Sure, it also obstructs buffers (LW renderer). But I don't use it. I use G2 when using FPrime, which I don't use since LW 9.6 :)


Other option with FPrime might be using something like Gamma Panel, though you'd need to disable it when picking colors.



Gerardo

Pavlov
03-10-2010, 12:02 PM
Tobian, i'm missing your point, referring to post 127, where you say "it should do it properly automatically, and you can ignore the stretch setting".
I seem to see it IS the key to get the correct effect. Raising it to high values, even 100%, causes blurriness to fade from gaussian at low glancing angles, to anisotropic (V only) at high glancng angles. Not using stretch parameter seems to give a simple pseudo-gaussian blur, just LW like but less intense.
Am i missing something ?

Paolo

EDIT - i added a comparison: first is DP node + 50% stretch, second is DP node alone, third is plain LW. I agree 2 and 3 are not the same, but i find 1 more convincing. I seem to see that stretch parameter has a key role in tweaking the effect, and it's not something to ignore.

Tobian
03-10-2010, 12:14 PM
I said it was useless, because when i turn up the value it lowers the ammount of glancing stretch, not increase it... So it's somewhat pointless, because if I am using DP's reflections node I WANT it to have stretched reflections! :) The parameter implies it would increase the effect, but it infact reduces it.

Pavlov
03-10-2010, 12:23 PM
Well, raising Stretch just reduces H blur at high glancing angles, keeping it the same at lower angles. So, it "raises" the amount of difference between H blur at 0 and 90 degrees.

Paolo

Tobian
03-10-2010, 12:26 PM
I am not sure I understand, do you have examples to show what you mean?

Pavlov
03-10-2010, 05:13 PM
Maybe i edited my previous post while you were writing, i attached an example.

Paolo

Tobian
03-10-2010, 05:39 PM
Ahh so it seems. Ok I see what you mean.. The blur is stretching in the X, but in my tests it compressed more in the Y the more the 'glancing stretch' was applied. It's hard to see in those pics. So basically by increasing the 'glancing stretch' the more LW-blur like it becomes.

Pavlov
03-11-2010, 01:00 AM
hmmm... i must miss something, in my experiments i see the opposite: no "glancing stretch" means more LW like. I'll try to test in a different scene, but i'd be curious to hear what Denis says about this parameter.

Paolo

dpont
03-11-2010, 01:58 AM
You must consider the angle between the view
and the normal of the surface.
Without the Glancing Stretch parameter:
At a short angle, you get something near to
LW Reflection (large blur),
At larger angle and view almost parallel to the surface
and almost perpendicular to its normal,
DPKit reflection blur effect is less large than
LW node blur.

Glancing Stretch parameter is a gaussian function
for accentuating this effect so blur distribution
is more "stretched" and thiner, but it is still relative
to the view/normal angle, so it doesn't change
so much at short angle (near LW reflection blur).


Denis.

Pavlov
03-11-2010, 02:23 AM
Thanks Denis

Paolo

Pavlov
03-11-2010, 04:40 AM
I'm going a bit OT (not reflection's related), but since a lot of nodal experts are reading here, maybe this can be interesting:

http://www.newtek.com/forums/showthread.php?t=107288

bye
Paolo

Tobian
03-11-2010, 05:12 AM
Thanks Denis. and uh... not a clue how to do that sorry Pavlov. If I could do the really advanced stuff, I'd have made my own reflection shader :D

ShadowMap
08-13-2010, 03:50 PM
Hi there LW-guys ;-)

I found this link by coincidence (I didn't have time yet to read through all of this thread, that would make me insane ;-))))

But nevertheless....I don't know if you all will laugh at me, so forgive me if I'm introducing something you allready know...

...I was looking recently for an article on reflection blurring and found this interesting link:

http://www.lightwiki.com/Optimising_Reflection_blur

The author "Tobian" was so kind to include a sample scene ;-) Many thanks to him ;-)))

Maybe it'll help you guys to further optimize your scenes in LW. It's quite interesting, allthough I can't get my head fully wrapped around the described technique.

Hope you like it and have a nice day

Happy Lightwaving

Cheers,

Steven R

Tobian
08-13-2010, 03:53 PM
Yeah that 'Tobian' fella, not sure who is? :D Sadly a lot of those techniques don't really help with any kind of realism, just render times! :)

ShadowMap
08-13-2010, 04:04 PM
Silly ME....I could have looked a little closer in the thread and should have spotted your nickname....sorry ;-)

In that case I should start reading this thread from beginning, huh? ;-)

But hey, Tobian, thanks for sharing the knowledge on lightwiki anyway!

Tobian
08-13-2010, 07:19 PM
You're welcome, and this thread is quite technical, but the result was DP's excellent reflection shader, which is superb! :)

50one
08-29-2011, 06:08 AM
Sorry for digging out the old thread but is the reflection blur behaviour has been fixed / along with the Cook-Torrance shader? Cause I'm thinking of upgrading my 8.5?

Tobian
08-29-2011, 06:20 AM
Nope, not as of the current build, unless there's a special version I am not privy too :)

The Cook torrence behaviour has been partially fixed, as it no longer clips, though they still have the issue of distant lights hotspots becoming dimmer, and not smaller.

Still that said, the DP reflection shader still works great, if a bit slow sometimes! :)

50one
08-29-2011, 06:42 AM
Thanks for you answer!
Ehhh...what else I can say, kudos to Mr. Denis, if not him than Newtek would be in, well we all know where exactly.

evolross
11-29-2011, 05:58 PM
I believe this issue has been fixed in LW11 as I thought I remember hearing about it or reading something to that effect. Any LW11 owners care to confirm? Thanks in advance.

Pavlov
11-30-2011, 05:20 PM
confirmed. I used DPreflection to get correct blurring, now you get same result without nodes.

Paolo

gerardstrada
11-30-2011, 08:28 PM
Nice! :thumbsup:



Gerardo

erikals
12-01-2011, 12:42 AM
 
so LW11 RB now looks more like this...?
http://imagic.ddgenvivo.tv/forums/DP_Reflection_test.jpg

 

Pavlov
12-01-2011, 02:26 AM
yes. I made a simple interior in LW 10.1, with and without DPreflections. Then i rendered in LW 11 without nodes and it was pretty much the same of 10.1 with node.

Paolo

erikals
12-01-2011, 02:33 AM
Grreeeat!... :]

Amurrell
12-01-2011, 04:36 PM
Kind of like this... don't know if this is a good example.

Out of 11

99970

Pavlov
12-01-2011, 04:53 PM
hmm no, it should be better to show blurring at high glancing angles, i.e. some columns on a reflective floor but not near the camera. One has to see how blur changes while incidence changes. I'm home now and i cant make anything.

paolo

Amurrell
12-01-2011, 09:17 PM
Then something like this? Haven't followed the thread too much since most of it is older.

99973
99974

Not a great representation, but I'm not sure I have anything else better right now. Did this in a minute.

Pavlov
12-03-2011, 08:46 AM
yes, this already shows something imho. Let's see what other say... in case i tried, LW11=DPreflection.

Paolo

Matt
12-03-2011, 04:44 PM
 
so LW11 RB now looks more like this...?
http://imagic.ddgenvivo.tv/forums/DP_Reflection_test.jpg

Yes, and renders faster with the Unified Sampling too.

100023

100024

50one
12-03-2011, 05:00 PM
Awesome!

Gregg "T.Rex"
12-03-2011, 08:09 PM
Yes, and renders faster with the Unified Sampling too.

It seems LW11 is indeed in the right direction, but not quite there yet...

Since, we can't choose the BRDF model for the reflections in LightWave, we are "stuck" with what's hard coded under the hood; in the case of LW11, i suspect a model that looks like a mix of a Phong/Blinn shader, as far as reflections are concerned...

Now, Phong shading method is almost useless, as it's an approximation and not physically correct. Same thing for the Blinn method, which is a cut down version of the Cook-Torrance and it's also not very useful for photo-realistic materials, since again it's an approximation and not physically accurate.

The Cook-Torrance and it's little brother the Ward shading methods are the best choices for photo-realistic materials, as they both support micro-facet distribution with build-in anisotropic functions. Of course, there are more shading methods, even more physically correct and accurate, but that's another topic...

Now, in LW we do have some nice shading models for diffuse and speculars, but not for reflections and we still have to "eyeball" the look we want, which sometimes can be quite time consuming and in the case of LW10.1, totally inaccurate regarding physically accurate representations...

In the case of LW11, anisotropic reflections seem they are hard coded in the reflection shading model, which is a welcome addition and a huge step forward beyond LW10.1. The next step would be to give the user physically accurate shading models for the reflections, as a starting point to build upon...

And here are some examples showing the difference in reflections between LW10.1, LW11 and VRay, using Blinn and Ward shading methods. The camera is resting on the floor, in order to get the extreme angles for the reflections to gaze upon...

http://www.sub-pixel.com/tmp/1.LW10.1.jpg

http://www.sub-pixel.com/tmp/2.LW10.1-DP_Reflection.jpg

http://www.sub-pixel.com/tmp/3.LW11.jpg

http://www.sub-pixel.com/tmp/4.VRay_Blinn.jpg

http://www.sub-pixel.com/tmp/5.VRay_Ward.jpg

Overall, LightWave 11 reflections are in the right path indeed... :)

Cheers,
T.Rex

Matt
12-03-2011, 08:17 PM
It seems LW11 is indeed in the right direction, but not quite there yet...

I don't think the LW11 one too bad in those tests, certainly better than 10.1 and DP Reflections.

Gregg "T.Rex"
12-03-2011, 08:27 PM
I don't think the LW11 one too bad in those tests, certainly better than 10.1 and DP Reflections.

No, not at all...
It's quite good actually...

All we need now is more control over the reflection methods.... :)

dpont
12-04-2011, 12:45 AM
Unified Sampling could improve every kind of shaders
for blurring reflection, refraction or occlusion,
from third party too, since it is fully done and optimized
in the renderer, even if it starts with a 'not so good'
sampling method, further subsamples of antialiasing
grandly improved the final quality of blur, soft-shadows etc..


In the shader itself, whatever the reflection model used,
the correct blurred reflection at glancing angles has nothing to
do with anisotropy, the model is simply applied for every ray
instead of the main primary ray,
I think that it was simplified in the previous shader for acceptable
and faster results at moderated angles.

Anisotropy has more to do with the relief of the surface
like brushed metal or wavy water on a puddle,
DP Reflection has an 'hybrid' function for exagerating
the effect at glancing angle for this kind of material,
faking anisotropy.

Though I don't know if there will be a DPKit 11,
Denis.

Matt
12-04-2011, 01:07 AM
Though I don't know if there will be a DPKit 11

Hope it's not something I said Denis, I was just calling it as I saw it, no offense intended.

:)

dpont
12-04-2011, 02:18 AM
Was just trying to clarify different things,
like Anisotropy, Model and Sampling,
since they are not involved at the same level.


... no offense intended..:)

I heart often, some similar comments these days..
Denis.

dpont
12-04-2011, 09:13 AM
I think that the amount of blur is an arbitrary factor,
can vary internally between different shaders,
and should be adjusted for comparing,
DP Reflection itself need to be doubled (200%)
to match Texture LW Reflection (100%),

100051 100050

Denis.

Tobian
12-05-2011, 11:44 AM
DP matched the 10.1 model more closely (that is to say LW reflection blur going back some time but ending with 10.1). Several people have commented that the same value dialled into LW11 creates a much stronger effect, though I suspect this is to make 0>100 reflect no blurring > diffuse blurring (which was previously more or less impossible in LW). Ramping up the DP shader to 200% to match the new model therefore does make sense.

The Lightwave reflection shading, previously, was largely disparate: Classic blurring didn't match the reflection shaders, and material 'roughness' value also yielded a totally different look, resulting in quite a lot of messing round to get things to be similar, so it's nice they seem to be unifying.

It would be nice to have a range of BSDF shader models, rather than just ray scattering, as has been commented LW, just has a fixed model at the moment (there were numerous diffuse shaders but only 2 reflection ones (and they were for different things). The anisotropic model also had weird artefact issues, with double reflections and dimples (as showcased in this thread). so it would be nice to see models such as blinn, ward, ward anisotropic. It would also be nice to have an easier way to mess about with anisotropic materials, as it's quite tricky to make it do what you want with the current model (better UV tools would no doubt help! :D) and have anisotropic 'materials' too. Still I am not complaining too much, this is a massive improvement, so thanks to Newtek and hopefully I will have it to play with soon...

and it has to be said thanks very much to Denis as I could hardly imagine being without his DP reflections!